summaryrefslogtreecommitdiff
path: root/usr.bin/oasm/parse.c
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-07-22 02:42:46 -0400
committerIan Moffett <ian@osmora.org>2025-07-22 02:42:46 -0400
commitfa2bb7b2a5cc01c3c28c9dcd34cf65a499321b9c (patch)
tree56bd3b316a2cc9091b782a34edfc27350e11517c /usr.bin/oasm/parse.c
parentd3f8d2baa9e2cd8d35187d0e22155b5437947bf7 (diff)
oasm: Add encoding logic for "DIV" instruction
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'usr.bin/oasm/parse.c')
-rw-r--r--usr.bin/oasm/parse.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/oasm/parse.c b/usr.bin/oasm/parse.c
index 2b5eb14..9a4dd0e 100644
--- a/usr.bin/oasm/parse.c
+++ b/usr.bin/oasm/parse.c
@@ -111,6 +111,7 @@ parse_reg(struct oasm_state *state, struct oasm_token *tok)
case TT_ADD:
case TT_SUB:
case TT_MUL:
+ case TT_DIV:
state->last = tok->type;
break;
default:
@@ -151,6 +152,10 @@ parse_tok(struct oasm_state *state, struct oasm_token *tok)
state->last = tok->type;
emit_osmx64(&emit_state, tok);
break;
+ case TT_DIV:
+ state->last = tok->type;
+ emit_osmx64(&emit_state, tok);
+ break;
case TT_MOV:
state->last = tok->type;
emit_osmx64(&emit_state, tok);