diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/oasm/emit.c | 2 | ||||
-rw-r--r-- | usr.bin/oasm/include/oasm/emit.h | 2 | ||||
-rw-r--r-- | usr.bin/oasm/parse.c | 15 |
3 files changed, 10 insertions, 9 deletions
diff --git a/usr.bin/oasm/emit.c b/usr.bin/oasm/emit.c index 14078dc..80adba9 100644 --- a/usr.bin/oasm/emit.c +++ b/usr.bin/oasm/emit.c @@ -250,7 +250,7 @@ emit_encode_hlt(struct emit_state *state, struct oasm_token *tok) } int -emit_osxm64(struct emit_state *state, struct oasm_token *tp) +emit_osmx64(struct emit_state *state, struct oasm_token *tp) { struct oasm_token *toknew; diff --git a/usr.bin/oasm/include/oasm/emit.h b/usr.bin/oasm/include/oasm/emit.h index b0a2fd1..d289adb 100644 --- a/usr.bin/oasm/include/oasm/emit.h +++ b/usr.bin/oasm/include/oasm/emit.h @@ -108,6 +108,6 @@ struct emit_state { int emit_init(struct emit_state *state); int emit_destroy(struct emit_state *state); int emit_process(struct oasm_state *oasm, struct emit_state *emit); -int emit_osxm64(struct emit_state *state, struct oasm_token *tp); +int emit_osmx64(struct emit_state *state, struct oasm_token *tp); #endif /* !_EMIT_H_ */ diff --git a/usr.bin/oasm/parse.c b/usr.bin/oasm/parse.c index cefe812..c688e2e 100644 --- a/usr.bin/oasm/parse.c +++ b/usr.bin/oasm/parse.c @@ -125,7 +125,7 @@ parse_reg(struct oasm_state *state, struct oasm_token *tok) } state->last = tok->type; - emit_osxm64(&emit_state, tok); + emit_osmx64(&emit_state, tok); return 0; } @@ -144,23 +144,24 @@ parse_tok(struct oasm_state *state, struct oasm_token *tok) switch (tok->type) { case TT_HLT: state->last = tok->type; - emit_osxm64(&emit_state, tok); + emit_osmx64(&emit_state, tok); + break; case TT_MOV: state->last = tok->type; - emit_osxm64(&emit_state, tok); + emit_osmx64(&emit_state, tok); break; case TT_ADD: state->last = tok->type; - emit_osxm64(&emit_state, tok); + emit_osmx64(&emit_state, tok); break; case TT_SUB: state->last = tok->type; - emit_osxm64(&emit_state, tok); + emit_osmx64(&emit_state, tok); break; case TT_DEC: case TT_INC: state->last = tok->type; - emit_osxm64(&emit_state, tok); + emit_osmx64(&emit_state, tok); break; case TT_IMM: p = tokstr[state->last]; @@ -168,7 +169,7 @@ parse_tok(struct oasm_state *state, struct oasm_token *tok) printf("expected X<n> but got %s\n", p); return -1; } - emit_osxm64(&emit_state, tok); + emit_osmx64(&emit_state, tok); break; default: if (!tok->is_reg) { |