aboutsummaryrefslogtreecommitdiff
path: root/src/long_mode
diff options
context:
space:
mode:
Diffstat (limited to 'src/long_mode')
-rw-r--r--src/long_mode/mod.rs14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs
index 0ffc9f5..f3b4dc0 100644
--- a/src/long_mode/mod.rs
+++ b/src/long_mode/mod.rs
@@ -474,6 +474,9 @@ impl OperandSpec {
fn is_memory(&self) -> bool {
(*self as u8) & 0x80 != 0
}
+ fn is_masked(&self) -> bool {
+ (*self as u8) & 0x40 != 0
+ }
}
/// an `avx512` merging mode.
@@ -6619,8 +6622,15 @@ fn read_operands<
instruction.mem_size = 8;
} else if instruction.opcode == Opcode::RETF {
instruction.mem_size = 10;
+ } else if instruction.opcode == Opcode::POPF {
+ instruction.mem_size = 8;
+ } else if instruction.opcode == Opcode::PUSHF {
+ instruction.mem_size = 8;
+ } else if instruction.opcode == Opcode::LEAVE {
+ instruction.mem_size = 8;
+ } else if instruction.opcode == Opcode::XLAT {
+ instruction.mem_size = 1;
}
- // TODO: leave?
instruction.operands[0] = OperandSpec::Nothing;
instruction.operand_count = 0;
return Ok(());
@@ -7102,6 +7112,8 @@ fn read_operands<
instruction.imm = read_num(words, 1)? as u64;
instruction.operands[0] = OperandSpec::ImmInDispField;
instruction.operands[1] = OperandSpec::ImmU8;
+ // because there is an implied push of the adjusted base pointer
+ instruction.mem_size = 8;
instruction.operand_count = 2;
}
OperandCase::Fw => {