From df9f396017f92ad4647697d461bb5475d6596cfb Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 22 Jul 2025 01:39:20 -0400 Subject: oasm: Add encoding logic for "SUB" instruction Signed-off-by: Ian Moffett --- usr.bin/oasm/parse.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'usr.bin/oasm/parse.c') diff --git a/usr.bin/oasm/parse.c b/usr.bin/oasm/parse.c index 6851935..cefe812 100644 --- a/usr.bin/oasm/parse.c +++ b/usr.bin/oasm/parse.c @@ -109,6 +109,7 @@ parse_reg(struct oasm_state *state, struct oasm_token *tok) case TT_DEC: case TT_INC: case TT_ADD: + case TT_SUB: state->last = tok->type; break; default: @@ -152,6 +153,10 @@ parse_tok(struct oasm_state *state, struct oasm_token *tok) state->last = tok->type; emit_osxm64(&emit_state, tok); break; + case TT_SUB: + state->last = tok->type; + emit_osxm64(&emit_state, tok); + break; case TT_DEC: case TT_INC: state->last = tok->type; -- cgit v1.2.3