aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2026-02-22 23:10:09 +0000
committeriximeow <me@iximeow.net>2026-02-22 23:34:15 +0000
commit99a6378389b99784187058adbea6cfca26963d98 (patch)
tree76518cb4e0048ecb34cd879e05c196c907595419 /test
parent1dbe370cb0a740c42e5688724684e363ed5bd92e (diff)
correct push-immediate memory access sizeHEADno-gods-no-
Diffstat (limited to 'test')
-rw-r--r--test/long_mode/operand.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/long_mode/operand.rs b/test/long_mode/operand.rs
index 0faa1c3..b94d39f 100644
--- a/test/long_mode/operand.rs
+++ b/test/long_mode/operand.rs
@@ -27,6 +27,8 @@ fn memory_widths() {
assert_eq!(mem_size_of(&[0x66, 0x33, 0x00]).size_name(), "word");
assert_eq!(mem_size_of(&[0x33, 0x00]).size_name(), "dword");
assert_eq!(mem_size_of(&[0x48, 0x33, 0x00]).size_name(), "qword");
+ assert_eq!(mem_size_of(&[0x6a, 0x00]).size_name(), "qword");
+ assert_eq!(mem_size_of(&[0x68, 0x00, 0x00, 0x00, 0x00]).size_name(), "qword");
}
#[test]
@@ -45,6 +47,9 @@ fn test_implied_memory_width() {
assert_eq!(mem_size_of(&[0x66, 0x58]), Some(8));
assert_eq!(mem_size_of(&[0xff, 0xf0]), Some(8));
assert_eq!(mem_size_of(&[0x66, 0xff, 0xf0]), Some(2));
+ // push imm
+ assert_eq!(mem_size_of(&[0x6a, 0xaa]), Some(8));
+ assert_eq!(mem_size_of(&[0x68, 0xaa, 0xbb, 0xcc, 0xdd]), Some(8));
// operand-size prefixed call and jump still reads 8 bytes (prefix ignored)
assert_eq!(mem_size_of(&[0x66, 0xff, 0x10]), Some(8));
assert_eq!(mem_size_of(&[0x66, 0xff, 0x20]), Some(8));