From 36345d8ab93d23d9f94372863e3747a07222b6ce Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Fri, 6 Dec 2024 22:17:01 +0100 Subject: asm: add inc, xor insn and initial support for memory base+idx --- src/insn/inc.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/insn/inc.rs (limited to 'src/insn/inc.rs') 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 for Asm { + fn inc(&mut self, op1: Reg64) { + self.encode_r(0xff, 0, op1); + } +} + +impl Inc for Asm { + fn inc(&mut self, op1: Reg32) { + self.encode_r(0xff, 0, op1); + } +} -- cgit v1.2.3