diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-10-29 14:38:33 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2023-10-29 14:38:33 +0200 |
| commit | 5d29afb530ffdaab4b5032b7422da988b31c0867 (patch) | |
| tree | 0135976b951fa4c860a043f07e6d555e40c60d1f /tasm/src/parser.y | |
| parent | 80d78c5589d42f81b04e671b28c103a2112458d1 (diff) | |
| download | tri-5d29afb530ffdaab4b5032b7422da988b31c0867.tar.gz tri-5d29afb530ffdaab4b5032b7422da988b31c0867.zip | |
initial working compiled program on simulator
Diffstat (limited to 'tasm/src/parser.y')
| -rw-r--r-- | tasm/src/parser.y | 4 |
1 files changed, 2 insertions, 2 deletions
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 */ |
