From effbb5ce401d3c8f78ff5465683a1bcd4a68c0b6 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Sun, 27 Jul 2025 23:13:06 -0400 Subject: oasm: Introduce OR mnemonic Implement mnemonic for the OR instruction: -- or x2, #3 ! x2 = x2 | 3 -- 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 523058b..b4bb7be 100644 --- a/usr.bin/oasm/parse.c +++ b/usr.bin/oasm/parse.c @@ -59,6 +59,7 @@ static const char *tokstr[] = { [ TT_MROD ] = "mrod", [ TT_MROQ ] = "mroq", [ TT_AND ] = "and", + [ TT_OR ] = "or", /* X registers */ [ TT_X0 ] = "x0", @@ -171,6 +172,10 @@ parse_tok(struct oasm_state *state, struct oasm_token *tok) state->last = tok->type; emit_osmx64(&emit_state, tok); break; + case TT_OR: + state->last = tok->type; + emit_osmx64(&emit_state, tok); + break; case TT_HLT: state->last = tok->type; emit_osmx64(&emit_state, tok); -- cgit v1.2.3