aboutsummaryrefslogtreecommitdiff
path: root/src/interp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/interp.c')
-rw-r--r--src/interp.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/interp.c b/src/interp.c
index 3395537..059b1d3 100644
--- a/src/interp.c
+++ b/src/interp.c
@@ -26,6 +26,9 @@ union interp_ret ejit_interp(struct ejit_func *f, size_t argc,
[MULR] = &&MULR,
[DIVR] = &&DIVR,
+ [ANDR] = &&ANDR,
+ [ANDI] = &&ANDI,
+
[EQR] = &&EQR,
[LTR] = &&LTR,
@@ -34,6 +37,7 @@ union interp_ret ejit_interp(struct ejit_func *f, size_t argc,
[BLTR] = &&BLTR,
[BNEI] = &&BNEI,
+ [BEQR] = &&BEQR,
[BEQI] = &&BEQI,
[BGTI] = &&BGTI,
@@ -146,6 +150,14 @@ union interp_ret ejit_interp(struct ejit_func *f, size_t argc,
gpr[i.r0] = gpr[i.r1] / gpr[i.r2];
DISPATCH();
+ DO(ANDR);
+ gpr[i.r0] = gpr[i.r1] & gpr[i.r2];
+ DISPATCH();
+
+ DO(ANDI);
+ gpr[i.r0] = gpr[i.r1] & i.o;
+ DISPATCH();
+
DO(EQR);
gpr[i.r0] = gpr[i.r1] == gpr[i.r2];
DISPATCH();
@@ -176,6 +188,12 @@ union interp_ret ejit_interp(struct ejit_func *f, size_t argc,
DISPATCH();
+ DO(BEQR);
+ if (gpr[i.r1] == gpr[i.r2])
+ JUMP(i.r0);
+
+ DISPATCH();
+
DO(BEQI);
if (gpr[i.r1] == i.o)
JUMP(i.r0);