aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG2
-rw-r--r--src/long_mode/display.rs6
-rw-r--r--src/protected_mode/display.rs6
-rw-r--r--src/real_mode/display.rs6
-rw-r--r--test/long_mode/mod.rs6
-rw-r--r--test/protected_mode/mod.rs6
-rw-r--r--test/real_mode/mod.rs6
7 files changed, 20 insertions, 18 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 3850ee6..1c9338c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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");