diff options
author | Ian Moffett <ian@osmora.org> | 2025-07-22 02:34:25 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-07-22 02:34:25 -0400 |
commit | ea521725a7739ec568eb6961edabf71d8169ef9e (patch) | |
tree | 22a61a45448455d16c8c5196bb6cc4101edc9a10 /usr.bin/oasm/emit.c | |
parent | c774776241f7b20ae40b432c11d0d161b75d2e79 (diff) |
oasm: Introduce encoding for MUL instruction
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'usr.bin/oasm/emit.c')
-rw-r--r-- | usr.bin/oasm/emit.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/oasm/emit.c b/usr.bin/oasm/emit.c index 80adba9..83dbe46 100644 --- a/usr.bin/oasm/emit.c +++ b/usr.bin/oasm/emit.c @@ -190,6 +190,10 @@ emit_encode_arith(struct emit_state *state, struct oasm_token *tok) inst_str = "sub"; opcode = OSMX64_SUB; break; + case TT_MUL: + inst_str = "mul"; + opcode = OSMX64_MUL; + break; } /* @@ -329,6 +333,7 @@ emit_process(struct oasm_state *oasm, struct emit_state *emit) break; case TT_ADD: case TT_SUB: + case TT_MUL: curtok = emit_encode_arith(emit, curtok); break; case TT_HLT: |