diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-12-06 22:17:01 +0100 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-12-06 22:17:01 +0100 |
commit | 36345d8ab93d23d9f94372863e3747a07222b6ce (patch) | |
tree | 9391cfc2149c74d82a551977fed9c8efcb565561 /src/insn/inc.rs | |
parent | 7653ced7e8ce18b9ada2b666c63832007f8becf2 (diff) | |
download | juicebox-asm-36345d8ab93d23d9f94372863e3747a07222b6ce.tar.gz juicebox-asm-36345d8ab93d23d9f94372863e3747a07222b6ce.zip |
asm: add inc, xor insn and initial support for memory base+idx
Diffstat (limited to 'src/insn/inc.rs')
-rw-r--r-- | src/insn/inc.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/insn/inc.rs b/src/insn/inc.rs new file mode 100644 index 0000000..ede780a --- /dev/null +++ b/src/insn/inc.rs @@ -0,0 +1,14 @@ +use super::Inc; +use crate::{Asm, Reg32, Reg64}; + +impl Inc<Reg64> for Asm { + fn inc(&mut self, op1: Reg64) { + self.encode_r(0xff, 0, op1); + } +} + +impl Inc<Reg32> for Asm { + fn inc(&mut self, op1: Reg32) { + self.encode_r(0xff, 0, op1); + } +} |