diff options
author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-06-25 22:23:23 +0300 |
---|---|---|
committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-06-25 22:23:23 +0300 |
commit | a0a2a92107cb2ef43b9dab7f1f0bf4e3487436f5 (patch) | |
tree | 81cfdfbf6e17c99229d87f7881a56c3a4b241b1c /src/ejit.c | |
parent | 8f44960246c39845df83464ea9b4bc59220265aa (diff) | |
download | ejit-a0a2a92107cb2ef43b9dab7f1f0bf4e3487436f5.tar.gz ejit-a0a2a92107cb2ef43b9dab7f1f0bf4e3487436f5.zip |
move branches to have the dest in r0
Diffstat (limited to 'src/ejit.c')
-rw-r--r-- | src/ejit.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -93,7 +93,7 @@ void ejit_patch(struct ejit_func *f, struct ejit_reloc r, struct ejit_label l) { struct ejit_insn i = vect_at(struct ejit_insn, f->insns, r.insn); /** @todo some assert that checks the opcode? */ - i.o = l.addr; + i.r0 = l.addr; vect_at(struct ejit_insn, f->insns, r.insn) = i; } @@ -190,7 +190,7 @@ void ejit_movi(struct ejit_func *s, struct ejit_gpr r0, long o) struct ejit_reloc ejit_bltr(struct ejit_func *s, struct ejit_gpr r0, struct ejit_gpr r1) { size_t addr = vec_len(&s->insns); - emit_insn_i(s, BLTR, r0.r, r1.r, 0); + emit_insn_r(s, BLTR, 0, r0.r, r1.r); return (struct ejit_reloc){.insn = addr}; } |