aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/insn
diff options
context:
space:
mode:
Diffstat (limited to 'src/insn')
-rw-r--r--src/insn/cmovnz.rs8
-rw-r--r--src/insn/cmovz.rs8
2 files changed, 16 insertions, 0 deletions
diff --git a/src/insn/cmovnz.rs b/src/insn/cmovnz.rs
new file mode 100644
index 0000000..3e7f21c
--- /dev/null
+++ b/src/insn/cmovnz.rs
@@ -0,0 +1,8 @@
+use super::Cmovnz;
+use crate::{Asm, Reg64};
+
+impl Cmovnz<Reg64, Reg64> for Asm {
+ fn cmovnz(&mut self, op1: Reg64, op2: Reg64) {
+ self.encode_rr(&[0x0f, 0x45], op2, op1);
+ }
+}
diff --git a/src/insn/cmovz.rs b/src/insn/cmovz.rs
new file mode 100644
index 0000000..c49aa35
--- /dev/null
+++ b/src/insn/cmovz.rs
@@ -0,0 +1,8 @@
+use super::Cmovz;
+use crate::{Asm, Reg64};
+
+impl Cmovz<Reg64, Reg64> for Asm {
+ fn cmovz(&mut self, op1: Reg64, op2: Reg64) {
+ self.encode_rr(&[0x0f, 0x44], op2, op1);
+ }
+}