aboutsummaryrefslogtreecommitdiff
path: root/src/ejit.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-06-25 22:23:23 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-06-25 22:23:23 +0300
commita0a2a92107cb2ef43b9dab7f1f0bf4e3487436f5 (patch)
tree81cfdfbf6e17c99229d87f7881a56c3a4b241b1c /src/ejit.c
parent8f44960246c39845df83464ea9b4bc59220265aa (diff)
downloadejit-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ejit.c b/src/ejit.c
index 69ade9a..9393dc0 100644
--- a/src/ejit.c
+++ b/src/ejit.c
@@ -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};
}