diff options
| author | iximeow <me@iximeow.net> | 2026-06-05 08:21:59 +0000 |
|---|---|---|
| committer | iximeow <me@iximeow.net> | 2026-06-21 16:44:21 +0000 |
| commit | 953054bb2dd86fb54a320123373ba23c7e08c332 (patch) | |
| tree | 2412b59e3814def2578e5d250a3287e3ffddc46f | |
| parent | b6f11f81169d6ee2743d1e696f46ebce98f0067c (diff) | |
fix mnemonics for prefetcht*
| -rw-r--r-- | CHANGELOG | 2 | ||||
| -rw-r--r-- | src/long_mode/display.rs | 6 | ||||
| -rw-r--r-- | src/protected_mode/display.rs | 6 | ||||
| -rw-r--r-- | src/real_mode/display.rs | 6 | ||||
| -rw-r--r-- | test/long_mode/mod.rs | 6 | ||||
| -rw-r--r-- | test/protected_mode/mod.rs | 6 | ||||
| -rw-r--r-- | test/real_mode/mod.rs | 6 |
7 files changed, 20 insertions, 18 deletions
@@ -11,6 +11,8 @@ * fix jrcxz/jecxz/jcxz having "two operands". accessing the "second" operand through `Instruction::operand` is a guaranteed panic. +* fix the mnemonics for some prefetch instructions: prefetcht{0,1,2} were missing the second "t". + the Opcode variants are still spelled incorrectly and will continue to be until a future 3.0. ## 2.1.0 diff --git a/src/long_mode/display.rs b/src/long_mode/display.rs index a00dd22..67e359e 100644 --- a/src/long_mode/display.rs +++ b/src/long_mode/display.rs @@ -710,9 +710,9 @@ const MNEMONICS: &[&'static str] = &[ "lea", "nop", "prefetchnta", - "prefetch0", - "prefetch1", - "prefetch2", + "prefetcht0", + "prefetcht1", + "prefetcht2", // "xchg", "popf", "int", diff --git a/src/protected_mode/display.rs b/src/protected_mode/display.rs index bbb43ab..dc0cb1d 100644 --- a/src/protected_mode/display.rs +++ b/src/protected_mode/display.rs @@ -689,9 +689,9 @@ const MNEMONICS: &[&'static str] = &[ "lea", "nop", "prefetchnta", - "prefetch0", - "prefetch1", - "prefetch2", + "prefetcht0", + "prefetcht1", + "prefetcht2", // " xchg", "popf", "int", diff --git a/src/real_mode/display.rs b/src/real_mode/display.rs index 888b0b1..b90c305 100644 --- a/src/real_mode/display.rs +++ b/src/real_mode/display.rs @@ -691,9 +691,9 @@ const MNEMONICS: &[&'static str] = &[ "lea", "nop", "prefetchnta", - "prefetch0", - "prefetch1", - "prefetch2", + "prefetcht0", + "prefetcht1", + "prefetcht2", // " xchg", "popf", "int", diff --git a/test/long_mode/mod.rs b/test/long_mode/mod.rs index 4d20cf9..0342dd6 100644 --- a/test/long_mode/mod.rs +++ b/test/long_mode/mod.rs @@ -3219,9 +3219,9 @@ mod prefixed_0f { testcase!(&[0x0f, 0x17, 0x00], "movhps qword [rax], xmm0"), testcase!(&[0x0f, 0x18, 0xc0], "nop eax"), // capstone says invalid, xed says nop testcase!(&[0x0f, 0x18, 0x00], "prefetchnta zmmword [rax]"), - testcase!(&[0x0f, 0x18, 0x08], "prefetch0 zmmword [rax]"), - testcase!(&[0x0f, 0x18, 0x10], "prefetch1 zmmword [rax]"), - testcase!(&[0x0f, 0x18, 0x18], "prefetch2 zmmword [rax]"), + testcase!(&[0x0f, 0x18, 0x08], "prefetcht0 zmmword [rax]"), + testcase!(&[0x0f, 0x18, 0x10], "prefetcht1 zmmword [rax]"), + testcase!(&[0x0f, 0x18, 0x18], "prefetcht2 zmmword [rax]"), testcase!(&[0x0f, 0x18, 0x20], "nop zmmword [rax]"), testcase!(&[0x4f, 0x0f, 0x18, 0x20], "nop zmmword [r8]"), testcase!(&[0x0f, 0x18, 0xcc], "nop esp"), diff --git a/test/protected_mode/mod.rs b/test/protected_mode/mod.rs index f6e69cf..f0450b1 100644 --- a/test/protected_mode/mod.rs +++ b/test/protected_mode/mod.rs @@ -2395,9 +2395,9 @@ fn prefixed_0f() { test_display(&[0x0f, 0x17, 0x00], "movhps qword [eax], xmm0"); test_display(&[0x0f, 0x18, 0xc0], "nop eax"); // capstone says invalid, xed says nop test_display(&[0x0f, 0x18, 0x00], "prefetchnta zmmword [eax]"); - test_display(&[0x0f, 0x18, 0x08], "prefetch0 zmmword [eax]"); - test_display(&[0x0f, 0x18, 0x10], "prefetch1 zmmword [eax]"); - test_display(&[0x0f, 0x18, 0x18], "prefetch2 zmmword [eax]"); + test_display(&[0x0f, 0x18, 0x08], "prefetcht0 zmmword [eax]"); + test_display(&[0x0f, 0x18, 0x10], "prefetcht1 zmmword [eax]"); + test_display(&[0x0f, 0x18, 0x18], "prefetcht2 zmmword [eax]"); test_display(&[0x0f, 0x18, 0x20], "nop zmmword [eax]"); test_display(&[0x0f, 0x18, 0xcc], "nop esp"); test_display(&[0x0f, 0x19, 0x20], "nop dword [eax]"); diff --git a/test/real_mode/mod.rs b/test/real_mode/mod.rs index 33ac3d2..a55b823 100644 --- a/test/real_mode/mod.rs +++ b/test/real_mode/mod.rs @@ -188,9 +188,9 @@ fn test_real_mode() { test_display(&[0x0f, 0x16, 0xcf], "movlhps xmm1, xmm7"); test_display(&[0x0f, 0x17, 0x00], "movhps qword [bx + si * 1], xmm0"); test_display(&[0x0f, 0x18, 0x00], "prefetchnta zmmword [bx + si * 1]"); - test_display(&[0x0f, 0x18, 0x08], "prefetch0 zmmword [bx + si * 1]"); - test_display(&[0x0f, 0x18, 0x10], "prefetch1 zmmword [bx + si * 1]"); - test_display(&[0x0f, 0x18, 0x18], "prefetch2 zmmword [bx + si * 1]"); + test_display(&[0x0f, 0x18, 0x08], "prefetcht0 zmmword [bx + si * 1]"); + test_display(&[0x0f, 0x18, 0x10], "prefetcht1 zmmword [bx + si * 1]"); + test_display(&[0x0f, 0x18, 0x18], "prefetcht2 zmmword [bx + si * 1]"); test_display(&[0x0f, 0x18, 0x20], "nop zmmword [bx + si * 1]"); test_display(&[0x0f, 0x18, 0xc0], "nop ax"); test_display(&[0x0f, 0x18, 0xcc], "nop sp"); |
