From 5d29afb530ffdaab4b5032b7422da988b31c0867 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 29 Oct 2023 14:38:33 +0200 Subject: initial working compiled program on simulator --- tasm/src/parser.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tasm/src/parser.y') diff --git a/tasm/src/parser.y b/tasm/src/parser.y index 64418d1..a39c9c1 100644 --- a/tasm/src/parser.y +++ b/tasm/src/parser.y @@ -346,8 +346,8 @@ i emit_i(ctx, OPCODE_OP_IMM, $2, OP_IMM_ADDI, $2, 0);} | li gpr "," imm - {emit_u(ctx, OPCODE_LUI, $2, 0); - emit_i(ctx, OPCODE_OP_IMM, $2, OP_IMM_ADDI, $2, 0);} + {emit_u(ctx, OPCODE_LUI, $2, tri_sr($4, 9)); + emit_i(ctx, OPCODE_OP_IMM, $2, OP_IMM_ADDI, $2, tri_mask($4, 9));} /* stuff like call and ret TBD once I've come up with a proper register * calling convention so we know which register to use as ra */ -- cgit v1.3