aboutsummaryrefslogtreecommitdiff
path: root/test/real_mode
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2021-08-21 13:13:26 -0700
committeriximeow <me@iximeow.net>2021-08-21 13:15:46 -0700
commit9687a5af1d712da41992cba8d241ddef8bdc50ec (patch)
treea17d37ad3096c86f7c0247ed08ef2ff5a9f27cf2 /test/real_mode
parentcef4feeaf9c64e03a6728f267750ac2fb32eb9ff (diff)
clarify inaccurate 32/16-bit `call/jmp [mem]` mem_size
Diffstat (limited to 'test/real_mode')
-rw-r--r--test/real_mode/operand.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/real_mode/operand.rs b/test/real_mode/operand.rs
index e037fee..7f2b72e 100644
--- a/test/real_mode/operand.rs
+++ b/test/real_mode/operand.rs
@@ -1,5 +1,4 @@
-use yaxpeax_x86::real_mode::{InstDecoder, Operand, RegSpec};
-use yaxpeax_x86::MemoryAccessSize;
+use yaxpeax_x86::real_mode::{InstDecoder};
#[test]
fn test_implied_memory_width() {
@@ -17,4 +16,8 @@ fn test_implied_memory_width() {
assert_eq!(mem_size_of(&[0x66, 0x58]), Some(2));
assert_eq!(mem_size_of(&[0xff, 0xf0]), Some(2));
assert_eq!(mem_size_of(&[0x66, 0xff, 0xf0]), Some(4));
+ // unlike 64-bit mode, operand-size prefixed call and jump do have a different size: they read
+ // four bytes.
+ assert_eq!(mem_size_of(&[0x66, 0xff, 0x10]), Some(4));
+ assert_eq!(mem_size_of(&[0x66, 0xff, 0x20]), Some(4));
}