From a0a2a92107cb2ef43b9dab7f1f0bf4e3487436f5 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Tue, 25 Jun 2024 22:23:23 +0300 Subject: move branches to have the dest in r0 --- src/ejit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ejit.c') 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}; } -- cgit v1.2.3