From 396b52fd6407e022e380490e6d9a5653d9e77dda Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 19 Apr 2026 16:35:41 +0000 Subject: report memory access size for "monitor" --- CHANGELOG | 1 + src/long_mode/mod.rs | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 9ae9fd9..97f5216 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -20,6 +20,7 @@ is unchanged and uses a 16-bit form for source GPR. * reject 0f0d prefetch/nop with a register operand, which was incorrectly decoded before. * maskmovq and maskmovdqu now have their implicit memory access size reported correctly. +* monitor now reports the memory access size of the monitored dword/qword. ## 2.0.0 diff --git a/src/long_mode/mod.rs b/src/long_mode/mod.rs index 5d7180e..de9a323 100644 --- a/src/long_mode/mod.rs +++ b/src/long_mode/mod.rs @@ -8296,6 +8296,11 @@ fn read_operands< match m { 0b000 => { instruction.opcode = Opcode::MONITOR; + instruction.mem_size = if instruction.prefixes.address_size() { + 4 + } else { + 8 + }; } 0b001 => { instruction.opcode = Opcode::MWAIT; -- cgit v1.1