aboutsummaryrefslogtreecommitdiff
path: root/test/long_mode/operand.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2026-04-12 01:03:47 +0000
committeriximeow <me@iximeow.net>2026-05-25 00:59:27 +0000
commita049351c5d512710f557ffb45ee6391fc86a3dc6 (patch)
tree17040c4c95f9361de271fb1ad874c3a71d2b0e9d /test/long_mode/operand.rs
parent6c32405ca9930f393d8ca45d22df1b5a1c7c8653 (diff)
fix table management instructions' ({l,s}{g,i,l}dt) mem_size
these instructions, it turns out, have fixed operand size based on CPU execution mode and regardless of prefixes. good to know!
Diffstat (limited to 'test/long_mode/operand.rs')
-rw-r--r--test/long_mode/operand.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/long_mode/operand.rs b/test/long_mode/operand.rs
index 09ac5a2..9f594b5 100644
--- a/test/long_mode/operand.rs
+++ b/test/long_mode/operand.rs
@@ -69,4 +69,12 @@ fn test_implied_memory_width() {
assert_eq!(mem_size_of(&[0x0f, 0xa8]), Some(8));
// pop gs
assert_eq!(mem_size_of(&[0x0f, 0xa9]), Some(8));
+ // lidt
+ assert_eq!(mem_size_of(&[0x0f, 0x01, 0x18]), Some(10));
+ // sidt
+ assert_eq!(mem_size_of(&[0x0f, 0x01, 0x08]), Some(10));
+ // lgdt
+ assert_eq!(mem_size_of(&[0x0f, 0x01, 0x10]), Some(10));
+ // sgdt
+ assert_eq!(mem_size_of(&[0x0f, 0x01, 0x00]), Some(10));
}