From 9c3c3fd923d894d2351eb22129ea693eb98fa8ff Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Sat, 7 Dec 2024 01:59:18 +0100 Subject: bf: add jit compiler and interpreter --- src/insn/cmp.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/insn/cmp.rs b/src/insn/cmp.rs index 835202c..95c513d 100644 --- a/src/insn/cmp.rs +++ b/src/insn/cmp.rs @@ -1,5 +1,11 @@ use super::Cmp; -use crate::{Asm, Imm16, MemOp}; +use crate::{Asm, Imm16, Imm8, MemOp}; + +impl Cmp for Asm { + fn cmp(&mut self, op1: MemOp, op2: Imm8) { + self.encode_mi(0x80, 0x7, op1, op2); + } +} impl Cmp for Asm { fn cmp(&mut self, op1: MemOp, op2: Imm16) { -- cgit v1.2.3