From ea521725a7739ec568eb6961edabf71d8169ef9e Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 22 Jul 2025 02:34:25 -0400 Subject: oasm: Introduce encoding for MUL instruction Signed-off-by: Ian Moffett --- usr.bin/oasm/emit.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'usr.bin/oasm/emit.c') 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: -- cgit v1.2.3