diff options
Diffstat (limited to 'src/insn')
-rw-r--r-- | src/insn/jmp.rs | 7 | ||||
-rw-r--r-- | src/insn/jz.rs | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/insn/jmp.rs b/src/insn/jmp.rs new file mode 100644 index 0000000..71d1dbc --- /dev/null +++ b/src/insn/jmp.rs @@ -0,0 +1,7 @@ +use crate::prelude::*; + +impl Jmp<&mut Label> for Asm { + fn jmp(&mut self, op1: &mut Label) { + self.encode_jmp_label(&[0xe9], op1); + } +} diff --git a/src/insn/jz.rs b/src/insn/jz.rs new file mode 100644 index 0000000..6563ca2 --- /dev/null +++ b/src/insn/jz.rs @@ -0,0 +1,7 @@ +use crate::prelude::*; + +impl Jz<&mut Label> for Asm { + fn jz(&mut self, op1: &mut Label) { + self.encode_jmp_label(&[0x0f, 0x84], op1); + } +} |