diff options
| -rw-r--r-- | CHANGELOG | 9 | ||||
| -rw-r--r-- | src/long_mode/mod.rs | 2 | ||||
| -rw-r--r-- | src/protected_mode/mod.rs | 2 | ||||
| -rw-r--r-- | src/real_mode/mod.rs | 2 |
4 files changed, 12 insertions, 3 deletions
@@ -1,3 +1,12 @@ +## 2.2.0 + +* `Instruction::invalid()` returns instructions with opcode `Opcode::Invalid`, rather than nop. + decoding an instruction with `opcode == Invalid` was already possible through attempting + to decode invalid opcodes into a `&mut Instruction`; `invalid()` returning a no-operand + nop dates back to initial versions of the library attempting to never return instructions + that did not reflect a decoded x86 instruction. + it has long passed its time. thank you for the patch, @Grond66! + ## 2.1.1 * fix jrcxz/jecxz/jcxz having "two operands". accessing the "second" operand diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index ca2e7cb..b7daa4a 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -3283,7 +3283,7 @@ impl Instruction { pub fn invalid() -> Instruction { Instruction { prefixes: Prefixes::new(0), - opcode: Opcode::NOP, + opcode: Opcode::Invalid, mem_size: 0, regs: [RegSpec::rax(); 4], scale: 0, diff --git a/src/protected_mode/mod.rs b/src/protected_mode/mod.rs index 6a1d19b..64c1c8d 100644 --- a/src/protected_mode/mod.rs +++ b/src/protected_mode/mod.rs @@ -3213,7 +3213,7 @@ impl Instruction { pub fn invalid() -> Instruction { Instruction { prefixes: Prefixes::new(0), - opcode: Opcode::NOP, + opcode: Opcode::Invalid, mem_size: 0, regs: [RegSpec::eax(); 4], scale: 0, diff --git a/src/real_mode/mod.rs b/src/real_mode/mod.rs index f54533c..3a7cbd3 100644 --- a/src/real_mode/mod.rs +++ b/src/real_mode/mod.rs @@ -3240,7 +3240,7 @@ impl Instruction { pub fn invalid() -> Instruction { Instruction { prefixes: Prefixes::new(0), - opcode: Opcode::NOP, + opcode: Opcode::Invalid, mem_size: 0, regs: [RegSpec::ax(); 4], scale: 0, |
