diff options
Diffstat (limited to 'src/insn.rs')
-rw-r--r-- | src/insn.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/insn.rs b/src/insn.rs index c02206c..2f80d3d 100644 --- a/src/insn.rs +++ b/src/insn.rs @@ -6,6 +6,7 @@ mod cmovnz; mod cmovz; mod cmp; mod dec; +mod inc; mod jmp; mod jnz; mod jz; @@ -15,6 +16,7 @@ mod pop; mod push; mod ret; mod test; +mod xor; /// Trait for [`add`](https://www.felixcloutier.com/x86/add) instruction kinds. pub trait Add<T, U> { @@ -57,6 +59,12 @@ pub trait Dec<T> { fn dec(&mut self, op1: T); } +/// Trait for [`inc`](https://www.felixcloutier.com/x86/inc) instruction kinds. +pub trait Inc<T> { + /// Emit a increment instruction. + fn inc(&mut self, op1: T); +} + /// Trait for [`jmp`](https://www.felixcloutier.com/x86/jmp) instruction kinds. pub trait Jmp<T> { /// Emit an unconditional jump instruction. @@ -101,3 +109,9 @@ pub trait Test<T, U> { /// `SF`, `ZF`, and `PF` status flags, the result is discarded. fn test(&mut self, op1: T, op2: U); } + +/// Trait for [`xor`](https://www.felixcloutier.com/x86/xor) instruction kinds. +pub trait Xor<T, U> { + /// Emit a xor instruction. + fn xor(&mut self, op1: T, op2: U); +} |