aboutsummaryrefslogtreecommitdiff
path: root/test/long_mode/mod.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2020-08-02 18:40:15 -0700
committeriximeow <me@iximeow.net>2020-08-09 01:38:57 -0700
commit7c09cd975b9251f633a3adb0b6149ea98d3dcee7 (patch)
treeca4e65d84bc5e515adc653b7336e0d4f26a85de9 /test/long_mode/mod.rs
parent2eebbc76c7185a21bc22e7b78db0e6cbc4bd3de2 (diff)
x87 support, plus several other missing instructions
Diffstat (limited to 'test/long_mode/mod.rs')
-rw-r--r--test/long_mode/mod.rs419
1 files changed, 413 insertions, 6 deletions
diff --git a/test/long_mode/mod.rs b/test/long_mode/mod.rs
index a9a894a..8f041e9 100644
--- a/test/long_mode/mod.rs
+++ b/test/long_mode/mod.rs
@@ -113,6 +113,19 @@ fn test_modrm_decode() {
#[test]
fn test_mmx() {
+ test_display(&[0x4f, 0x0f, 0xf7, 0xc1], "maskmovq mm0, mm1");
+ test_display(&[0x0f, 0xf7, 0xc1], "maskmovq mm0, mm1");
+ test_invalid(&[0x0f, 0xf7, 0x01]);
+
+ test_display(&[0x4f, 0x0f, 0xe7, 0x03], "movntq [r11], mm0");
+ test_display(&[0x0f, 0xe7, 0x03], "movntq [rbx], mm0");
+ test_invalid(&[0x0f, 0xe7, 0xc3]);
+
+ test_display(&[0x4f, 0x0f, 0xc3, 0x03], "movnti [r11], r8");
+ test_display(&[0x66, 0x0f, 0xc3, 0x03], "movnti [rbx], eax");
+ test_display(&[0x0f, 0xc3, 0x03], "movnti [rbx], eax");
+ test_invalid(&[0x0f, 0xc3, 0xc3]);
+
test_display(&[0x4f, 0x0f, 0x7e, 0xcf], "movd r15, mm1");
test_display(&[0x41, 0x0f, 0x7e, 0xcf], "movd r15d, mm1");
test_display(&[0x4f, 0x0f, 0x7f, 0xcf], "movq mm7, mm1");
@@ -1061,9 +1074,6 @@ fn test_prefixes() {
test_display(&[0x66, 0x41, 0x31, 0xc0], "xor r8w, ax");
test_display(&[0x66, 0x41, 0x32, 0xc0], "xor al, r8b");
test_display(&[0x40, 0x32, 0xc5], "xor al, bpl");
-
- // test that WAIT doesn't blow up, at least...
- assert_eq!(InstDecoder::default().decode([0x9b, 0xf8].iter().cloned()).err(), Some(DecodeError::IncompleteDecoder));
}
#[test]
@@ -1173,9 +1183,16 @@ fn test_bitwise() {
#[test]
fn test_misc() {
- // TODO
-// test_display(&[0xf2, 0x0f, 0x38, 0xf0, 0xc1], "crc32 eax, cl");
-// test_display(&[0xf2, 0x0f, 0x38, 0xf1, 0xc1], "crc32 eax, ecx");
+ test_display(&[0xc8, 0x01, 0x02, 0x03], "enter 0x201, 0x3");
+ test_display(&[0xc9], "leave");
+ test_display(&[0xca, 0x12, 0x34], "retf 0x3412");
+ test_display(&[0xcb], "retf");
+ test_display(&[0x66, 0xcf], "iret");
+ test_display(&[0xcf], "iretd");
+ test_display(&[0x48, 0xcf], "iretq");
+ test_display(&[0x66, 0x4f, 0xcf], "iretq");
+ test_display(&[0xf2, 0x0f, 0x38, 0xf0, 0xc1], "crc32 eax, cl");
+ test_display(&[0xf2, 0x0f, 0x38, 0xf1, 0xc1], "crc32 eax, ecx");
test_display(&[0xfe, 0x00], "inc [rax]"); // TODO: inc byte [rax]
test_display(&[0xfe, 0x08], "dec [rax]"); // TODO: dec byte [rax]
test_display(&[0xff, 0x00], "inc [rax]"); // TODO: inc dword [rax]
@@ -1468,6 +1485,10 @@ fn prefixed_0f() {
test_display(&[0x66, 0x45, 0x0f, 0xa4, 0xcf, 0x11], "shld r15w, r9w, 0x11");
test_display(&[0x0f, 0xa5, 0xc0], "shld eax, eax, cl");
test_display(&[0x0f, 0xa5, 0xc9], "shld ecx, ecx, cl");
+ test_display(&[0x0f, 0xac, 0xc0, 0x11], "shrd eax, eax, 0x11");
+ test_display(&[0x66, 0x0f, 0xac, 0xcf, 0x11], "shrd di, cx, 0x11");
+ test_display(&[0x66, 0x45, 0x0f, 0xac, 0xcf, 0x11], "shrd r15w, r9w, 0x11");
+ test_display(&[0x0f, 0xad, 0xc9], "shrd ecx, ecx, cl");
}
#[test]
@@ -1526,6 +1547,12 @@ fn test_svm() {
test_display(&[0x0f, 0x01, 0xda], "vmload rax");
test_display(&[0x0f, 0x01, 0xd9], "vmmcall");
test_display(&[0x0f, 0x01, 0xd8], "vmrun rax");
+ test_display(&[0x0f, 0x78, 0xc4], "vmread rsp, rax");
+ test_display(&[0x0f, 0x79, 0xc5], "vmwrite rax, rbp");
+ test_display(&[0x0f, 0x78, 0x0b], "vmread [rbx], rcx");
+ test_invalid(&[0x66, 0x0f, 0x78, 0x03]);
+ test_display(&[0x0f, 0x79, 0x0b], "vmwrite rcx, [rbx]");
+ test_invalid(&[0x66, 0x0f, 0x79, 0x03]);
}
#[test]
@@ -1591,3 +1618,383 @@ fn test_cmpxchg8b() {
test_display(&[0x0f, 0xc7, 0x0f], "cmpxchg8b [rdi]");
test_display(&[0x4f, 0x0f, 0xc7, 0x0f], "cmpxchg16b [r15]");
}
+
+#[test]
+fn test_x87() {
+// test_display(&[0xd8, 0x03], "fadd st, dword ptr [rbx]");
+ test_display(&[0xd8, 0x03], "fadd st(0), [rbx]");
+// test_display(&[0xd8, 0x0b], "fmul st, dword ptr [rbx]");
+ test_display(&[0xd8, 0x0b], "fmul st(0), [rbx]");
+// test_display(&[0xd8, 0x13], "fcom st, dword ptr [rbx]");
+ test_display(&[0xd8, 0x13], "fcom st(0), [rbx]");
+// test_display(&[0xd8, 0x1b], "fcomp st, dword ptr [rbx]");
+ test_display(&[0xd8, 0x1b], "fcomp st(0), [rbx]");
+// test_display(&[0xd8, 0x23], "fsub st, dword ptr [rbx]");
+ test_display(&[0xd8, 0x23], "fsub st(0), [rbx]");
+// test_display(&[0xd8, 0x2b], "fsubr st, dword ptr [rbx]");
+ test_display(&[0xd8, 0x2b], "fsubr st(0), [rbx]");
+// test_display(&[0xd8, 0x33], "fdiv st, dword ptr [rbx]");
+ test_display(&[0xd8, 0x33], "fdiv st(0), [rbx]");
+// test_display(&[0xd8, 0x3b], "fdivr st, dword ptr [rbx]");
+ test_display(&[0xd8, 0x3b], "fdivr st(0), [rbx]");
+// test_display(&[0xd8, 0xc3], "fadd st, st(3)");
+ test_display(&[0xd8, 0xc3], "fadd st(0), st(3)");
+// test_display(&[0xd8, 0xcb], "fmul st, st(3)");
+ test_display(&[0xd8, 0xcb], "fmul st(0), st(3)");
+// test_display(&[0xd8, 0xd3], "fcom st, st(3)");
+ test_display(&[0xd8, 0xd3], "fcom st(0), st(3)");
+// test_display(&[0xd8, 0xdb], "fcomp st, st(3)");
+ test_display(&[0xd8, 0xdb], "fcomp st(0), st(3)");
+// test_display(&[0xd8, 0xe3], "fsub st, st(3)");
+ test_display(&[0xd8, 0xe3], "fsub st(0), st(3)");
+// test_display(&[0xd8, 0xeb], "fsubr st, st(3)");
+ test_display(&[0xd8, 0xeb], "fsubr st(0), st(3)");
+// test_display(&[0xd8, 0xf3], "fdiv st, st(3)");
+ test_display(&[0xd8, 0xf3], "fdiv st(0), st(3)");
+// test_display(&[0xd8, 0xfb], "fdivr st, st(3)");
+ test_display(&[0xd8, 0xfb], "fdivr st(0), st(3)");
+// test_display(&[0xd9, 0x03], "fld st, dword ptr [rbx]");
+ test_display(&[0xd9, 0x03], "fld st(0), [rbx]");
+ test_invalid(&[0xd9, 0x08]);
+ test_invalid(&[0xd9, 0x09]);
+ test_invalid(&[0xd9, 0x0a]);
+ test_invalid(&[0xd9, 0x0b]);
+ test_invalid(&[0xd9, 0x0c]);
+ test_invalid(&[0xd9, 0x0d]);
+ test_invalid(&[0xd9, 0x0e]);
+ test_invalid(&[0xd9, 0x0f]);
+// test_display(&[0xd9, 0x13], "fst dword ptr [rbx], st");
+ test_display(&[0xd9, 0x13], "fst [rbx], st(0)");
+// test_display(&[0xd9, 0x1b], "fstp dword ptr [rbx], st");
+ test_display(&[0xd9, 0x1b], "fstp [rbx], st(0)");
+// test_display(&[0xd9, 0x23], "fldenv ptr [rbx]");
+ test_display(&[0xd9, 0x23], "fldenv [rbx]");
+// test_display(&[0xd9, 0x2b], "fldcw word ptr [rbx]");
+ test_display(&[0xd9, 0x2b], "fldcw [rbx]");
+// test_display(&[0xd9, 0x33], "fnstenv ptr [rbx]");
+ test_display(&[0xd9, 0x33], "fnstenv [rbx]");
+// test_display(&[0xd9, 0x3b], "fnstcw word ptr [rbx]");
+ test_display(&[0xd9, 0x3b], "fnstcw [rbx]");
+// test_display(&[0xd9, 0xc3], "fld st, st(3)");
+ test_display(&[0xd9, 0xc3], "fld st(0), st(3)");
+// test_display(&[0xd9, 0xcb], "fxch st, st(3)");
+ test_display(&[0xd9, 0xcb], "fxch st(0), st(3)");
+ test_display(&[0xd9, 0xd0], "fnop");
+ test_invalid(&[0xd9, 0xd1]);
+ test_invalid(&[0xd9, 0xd2]);
+ test_invalid(&[0xd9, 0xd3]);
+ test_invalid(&[0xd9, 0xd4]);
+ test_invalid(&[0xd9, 0xd5]);
+ test_invalid(&[0xd9, 0xd6]);
+ test_invalid(&[0xd9, 0xd7]);
+ // undocumented save for intel xed
+// test_display(&[0xd9, 0xdb], "fstpnce st(3), st");
+ test_display(&[0xd9, 0xdb], "fstpnce st(3), st(0)");
+ test_display(&[0xd9, 0xe0], "fchs");
+ test_display(&[0xd9, 0xe1], "fabs");
+ test_invalid(&[0xd9, 0xe2]);
+ test_invalid(&[0xd9, 0xe3]);
+ test_display(&[0xd9, 0xe4], "ftst");
+ test_display(&[0xd9, 0xe5], "fxam");
+ test_invalid(&[0xd9, 0xe6]);
+ test_invalid(&[0xd9, 0xe7]);
+ test_display(&[0xd9, 0xe8], "fld1");
+ test_display(&[0xd9, 0xe9], "fldl2t");
+ test_display(&[0xd9, 0xea], "fldl2e");
+ test_display(&[0xd9, 0xeb], "fldpi");
+ test_display(&[0xd9, 0xec], "fldlg2");
+ test_display(&[0xd9, 0xed], "fldln2");
+ test_display(&[0xd9, 0xee], "fldz");
+ test_invalid(&[0xd9, 0xef]);
+ test_display(&[0xd9, 0xf0], "f2xm1");
+ test_display(&[0xd9, 0xf1], "fyl2x");
+ test_display(&[0xd9, 0xf2], "fptan");
+ test_display(&[0xd9, 0xf3], "fpatan");
+ test_display(&[0xd9, 0xf4], "fxtract");
+ test_display(&[0xd9, 0xf5], "fprem1");
+ test_display(&[0xd9, 0xf6], "fdecstp");
+ test_display(&[0xd9, 0xf7], "fincstp");
+ test_display(&[0xd9, 0xf8], "fprem");
+ test_display(&[0xd9, 0xf9], "fyl2xp1");
+ test_display(&[0xd9, 0xfa], "fsqrt");
+ test_display(&[0xd9, 0xfb], "fsincos");
+ test_display(&[0xd9, 0xfc], "frndint");
+ test_display(&[0xd9, 0xfd], "fscale");
+ test_display(&[0xd9, 0xfe], "fsin");
+ test_display(&[0xd9, 0xff], "fcos");
+// test_display(&[0xda, 0x03], "fiadd st, dword ptr [rbx]");
+ test_display(&[0xda, 0x03], "fiadd st(0), [rbx]");
+// test_display(&[0xda, 0x0b], "fimul st, dword ptr [rbx]");
+ test_display(&[0xda, 0x0b], "fimul st(0), [rbx]");
+// test_display(&[0xda, 0x13], "ficom st, dword ptr [rbx]");
+ test_display(&[0xda, 0x13], "ficom st(0), [rbx]");
+// test_display(&[0xda, 0x1b], "ficomp st, dword ptr [rbx]");
+ test_display(&[0xda, 0x1b], "ficomp st(0), [rbx]");
+// test_display(&[0xda, 0x23], "fisub st, dword ptr [rbx]");
+ test_display(&[0xda, 0x23], "fisub st(0), [rbx]");
+// test_display(&[0xda, 0x2b], "fisubr st, dword ptr [rbx]");
+ test_display(&[0xda, 0x2b], "fisubr st(0), [rbx]");
+// test_display(&[0xda, 0x33], "fidiv st, dword ptr [rbx]");
+ test_display(&[0xda, 0x33], "fidiv st(0), [rbx]");
+// test_display(&[0xda, 0x3b], "fidivr st, dword ptr [rbx]");
+ test_display(&[0xda, 0x3b], "fidivr st(0), [rbx]");
+// test_display(&[0xda, 0xc3], "fcmovb st, st(3)");
+ test_display(&[0xda, 0xc3], "fcmovb st(0), st(3)");
+// test_display(&[0xda, 0xcb], "fcmove st, st(3)");
+ test_display(&[0xda, 0xcb], "fcmove st(0), st(3)");
+// test_display(&[0xda, 0xd3], "fcmovbe st, st(3)");
+ test_display(&[0xda, 0xd3], "fcmovbe st(0), st(3)");
+// test_display(&[0xda, 0xdb], "fcmovu st, st(3)");
+ test_display(&[0xda, 0xdb], "fcmovu st(0), st(3)");
+ test_invalid(&[0xda, 0xe0]);
+ test_invalid(&[0xda, 0xe1]);
+ test_invalid(&[0xda, 0xe2]);
+ test_invalid(&[0xda, 0xe3]);
+ test_invalid(&[0xda, 0xe4]);
+ test_invalid(&[0xda, 0xe5]);
+ test_invalid(&[0xda, 0xe6]);
+ test_invalid(&[0xda, 0xe7]);
+ test_invalid(&[0xda, 0xe8]);
+ test_display(&[0xda, 0xe9], "fucompp");
+ test_invalid(&[0xda, 0xea]);
+ test_invalid(&[0xda, 0xeb]);
+ test_invalid(&[0xda, 0xec]);
+ test_invalid(&[0xda, 0xed]);
+ test_invalid(&[0xda, 0xee]);
+ test_invalid(&[0xda, 0xef]);
+ test_invalid(&[0xda, 0xf0]);
+ test_invalid(&[0xda, 0xf1]);
+ test_invalid(&[0xda, 0xf2]);
+ test_invalid(&[0xda, 0xf3]);
+ test_invalid(&[0xda, 0xf4]);
+ test_invalid(&[0xda, 0xf5]);
+ test_invalid(&[0xda, 0xf6]);
+ test_invalid(&[0xda, 0xf7]);
+ test_invalid(&[0xda, 0xf8]);
+ test_invalid(&[0xda, 0xf9]);
+ test_invalid(&[0xda, 0xfa]);
+ test_invalid(&[0xda, 0xfb]);
+ test_invalid(&[0xda, 0xfc]);
+ test_invalid(&[0xda, 0xfd]);
+ test_invalid(&[0xda, 0xfe]);
+ test_invalid(&[0xda, 0xff]);
+// test_display(&[0xdb, 0x03], "fild st, dword ptr [rbx]");
+ test_display(&[0xdb, 0x03], "fild st(0), [rbx]");
+// test_display(&[0xdb, 0x0b], "fisttp dword ptr [rbx], st");
+ test_display(&[0xdb, 0x0b], "fisttp [rbx], st(0)");
+// test_display(&[0xdb, 0x13], "fist dword ptr [rbx], st");
+ test_display(&[0xdb, 0x13], "fist [rbx], st(0)");
+// test_display(&[0xdb, 0x1b], "fistp dword ptr [rbx], st");
+ test_display(&[0xdb, 0x1b], "fistp [rbx], st(0)");
+ test_invalid(&[0xdb, 0x20]);
+ test_invalid(&[0xdb, 0x21]);
+ test_invalid(&[0xdb, 0x22]);
+ test_invalid(&[0xdb, 0x23]);
+ test_invalid(&[0xdb, 0x24]);
+ test_invalid(&[0xdb, 0x25]);
+ test_invalid(&[0xdb, 0x26]);
+ test_invalid(&[0xdb, 0x27]);
+// test_display(&[0xdb, 0x2b], "fld st, ptr [rbx]");
+ test_display(&[0xdb, 0x2b], "fld st(0), [rbx]");
+ test_invalid(&[0xdb, 0x30]);
+ test_invalid(&[0xdb, 0x31]);
+ test_invalid(&[0xdb, 0x32]);
+ test_invalid(&[0xdb, 0x33]);
+ test_invalid(&[0xdb, 0x34]);
+ test_invalid(&[0xdb, 0x35]);
+ test_invalid(&[0xdb, 0x36]);
+ test_invalid(&[0xdb, 0x37]);
+// test_display(&[0xdb, 0x3b], "fstp ptr [rbx], st");
+ test_display(&[0xdb, 0x3b], "fstp [rbx], st(0)");
+// test_display(&[0xdb, 0xc3], "fcmovnb st, st(3)");
+ test_display(&[0xdb, 0xc3], "fcmovnb st(0), st(3)");
+// test_display(&[0xdb, 0xcb], "fcmovne st, st(3)");
+ test_display(&[0xdb, 0xcb], "fcmovne st(0), st(3)");
+// test_display(&[0xdb, 0xd3], "fcmovnbe st, st(3)");
+ test_display(&[0xdb, 0xd3], "fcmovnbe st(0), st(3)");
+// test_display(&[0xdb, 0xdb], "fcmovnu st, st(3)");
+ test_display(&[0xdb, 0xdb], "fcmovnu st(0), st(3)");
+ test_display(&[0xdb, 0xe0], "feni8087_nop");
+ test_display(&[0xdb, 0xe1], "fdisi8087_nop");
+ test_display(&[0xdb, 0xe2], "fnclex");
+ test_display(&[0xdb, 0xe3], "fninit");
+ test_display(&[0xdb, 0xe4], "fsetpm287_nop");
+ test_invalid(&[0xdb, 0xe5]);
+ test_invalid(&[0xdb, 0xe6]);
+ test_invalid(&[0xdb, 0xe7]);
+// test_display(&[0xdb, 0xeb], "fucomi st, st(3)");
+ test_display(&[0xdb, 0xeb], "fucomi st(0), st(3)");
+// test_display(&[0xdb, 0xf3], "fcomi st, st(3)");
+ test_display(&[0xdb, 0xf3], "fcomi st(0), st(3)");
+ test_invalid(&[0xdb, 0xf8]);
+ test_invalid(&[0xdb, 0xf9]);
+ test_invalid(&[0xdb, 0xfa]);
+ test_invalid(&[0xdb, 0xfb]);
+ test_invalid(&[0xdb, 0xfc]);
+ test_invalid(&[0xdb, 0xfd]);
+ test_invalid(&[0xdb, 0xfe]);
+ test_invalid(&[0xdb, 0xff]);
+// test_display(&[0xdc, 0x03], "fadd st, qword ptr [rbx]");
+ test_display(&[0xdc, 0x03], "fadd st(0), [rbx]");
+// test_display(&[0xdc, 0x0b], "fmul st, qword ptr [rbx]");
+ test_display(&[0xdc, 0x0b], "fmul st(0), [rbx]");
+// test_display(&[0xdc, 0x13], "fcom st, qword ptr [rbx]");
+ test_display(&[0xdc, 0x13], "fcom st(0), [rbx]");
+// test_display(&[0xdc, 0x1b], "fcomp st, qword ptr [rbx]");
+ test_display(&[0xdc, 0x1b], "fcomp st(0), [rbx]");
+// test_display(&[0xdc, 0x23], "fsub st, qword ptr [rbx]");
+ test_display(&[0xdc, 0x23], "fsub st(0), [rbx]");
+// test_display(&[0xdc, 0x2b], "fsubr st, qword ptr [rbx]");
+ test_display(&[0xdc, 0x2b], "fsubr st(0), [rbx]");
+// test_display(&[0xdc, 0x33], "fdiv st, qword ptr [rbx]");
+ test_display(&[0xdc, 0x33], "fdiv st(0), [rbx]");
+// test_display(&[0xdc, 0x3b], "fdivr st, qword ptr [rbx]");
+ test_display(&[0xdc, 0x3b], "fdivr st(0), [rbx]");
+// test_display(&[0xdc, 0xc3], "fadd st(3), st");
+ test_display(&[0xdc, 0xc3], "fadd st(3), st(0)");
+// test_display(&[0xdc, 0xcb], "fmul st(3), st");
+ test_display(&[0xdc, 0xcb], "fmul st(3), st(0)");
+// test_display(&[0xdc, 0xd3], "fcom st, st(3)");
+ test_display(&[0xdc, 0xd3], "fcom st(0), st(3)");
+// test_display(&[0xdc, 0xdb], "fcomp st, st(3)");
+ test_display(&[0xdc, 0xdb], "fcomp st(0), st(3)");
+// test_display(&[0xdc, 0xe3], "fsubr st(3), st");
+ test_display(&[0xdc, 0xe3], "fsubr st(3), st(0)");
+// test_display(&[0xdc, 0xeb], "fsub st(3), st");
+ test_display(&[0xdc, 0xeb], "fsub st(3), st(0)");
+// test_display(&[0xdc, 0xf3], "fdivr st(3), st");
+ test_display(&[0xdc, 0xf3], "fdivr st(3), st(0)");
+// test_display(&[0xdc, 0xfb], "fdiv st(3), st");
+ test_display(&[0xdc, 0xfb], "fdiv st(3), st(0)");
+// test_display(&[0xdd, 0x03], "fld st, qword ptr [rbx]");
+ test_display(&[0xdd, 0x03], "fld st(0), [rbx]");
+// test_display(&[0xdd, 0x0b], "fisttp qword ptr [rbx], st");
+ test_display(&[0xdd, 0x0b], "fisttp [rbx], st(0)");
+// test_display(&[0xdd, 0x13], "fst qword ptr [rbx], st");
+ test_display(&[0xdd, 0x13], "fst [rbx], st(0)");
+// test_display(&[0xdd, 0x1b], "fstp qword ptr [rbx], st");
+ test_display(&[0xdd, 0x1b], "fstp [rbx], st(0)");
+// test_display(&[0xdd, 0x23], "frstor ptr [rbx]");
+ test_display(&[0xdd, 0x23], "frstor [rbx]");
+ test_invalid(&[0xdd, 0x28]);
+ test_invalid(&[0xdd, 0x29]);
+ test_invalid(&[0xdd, 0x2a]);
+ test_invalid(&[0xdd, 0x2b]);
+ test_invalid(&[0xdd, 0x2c]);
+ test_invalid(&[0xdd, 0x2d]);
+ test_invalid(&[0xdd, 0x2e]);
+ test_invalid(&[0xdd, 0x2f]);
+// test_display(&[0xdd, 0x33], "fnsave ptr [rbx]");
+ test_display(&[0xdd, 0x33], "fnsave [rbx]");
+// test_display(&[0xdd, 0x3b], "fnstsw word ptr [rbx]");
+ test_display(&[0xdd, 0x3b], "fnstsw [rbx]");
+ test_display(&[0xdd, 0xc3], "ffree st(3)");
+// test_display(&[0xdd, 0xcb], "fxch st, st(3)");
+ test_display(&[0xdd, 0xcb], "fxch st(0), st(3)");
+// test_display(&[0xdd, 0xd3], "fst st(3), st");
+ test_display(&[0xdd, 0xd3], "fst st(3), st(0)");
+// test_display(&[0xdd, 0xdb], "fstp st(3), st");
+ test_display(&[0xdd, 0xdb], "fstp st(3), st(0)");
+// test_display(&[0xdd, 0xe3], "fucom st, st(3)");
+ test_display(&[0xdd, 0xe3], "fucom st(0), st(3)");
+// test_display(&[0xdd, 0xeb], "fucomp st, st(3)");
+ test_display(&[0xdd, 0xeb], "fucomp st(0), st(3)");
+ test_invalid(&[0xdd, 0xf0]);
+ test_invalid(&[0xdd, 0xf1]);
+ test_invalid(&[0xdd, 0xf2]);
+ test_invalid(&[0xdd, 0xf3]);
+ test_invalid(&[0xdd, 0xf4]);
+ test_invalid(&[0xdd, 0xf5]);
+ test_invalid(&[0xdd, 0xf6]);
+ test_invalid(&[0xdd, 0xf7]);
+ test_invalid(&[0xdd, 0xf8]);
+ test_invalid(&[0xdd, 0xf9]);
+ test_invalid(&[0xdd, 0xfa]);
+ test_invalid(&[0xdd, 0xfb]);
+ test_invalid(&[0xdd, 0xfc]);
+ test_invalid(&[0xdd, 0xfd]);
+ test_invalid(&[0xdd, 0xfe]);
+ test_invalid(&[0xdd, 0xff]);
+// test_display(&[0xde, 0x03], "fiadd st, word ptr [rbx]");
+ test_display(&[0xde, 0x03], "fiadd st(0), [rbx]");
+// test_display(&[0xde, 0x0b], "fimul st, word ptr [rbx]");
+ test_display(&[0xde, 0x0b], "fimul st(0), [rbx]");
+// test_display(&[0xde, 0x13], "ficom st, word ptr [rbx]");
+ test_display(&[0xde, 0x13], "ficom st(0), [rbx]");
+// test_display(&[0xde, 0x1b], "ficomp st, word ptr [rbx]");
+ test_display(&[0xde, 0x1b], "ficomp st(0), [rbx]");
+// test_display(&[0xde, 0x23], "fisub st, word ptr [rbx]");
+ test_display(&[0xde, 0x23], "fisub st(0), [rbx]");
+// test_display(&[0xde, 0x2b], "fisubr st, word ptr [rbx]");
+ test_display(&[0xde, 0x2b], "fisubr st(0), [rbx]");
+// test_display(&[0xde, 0x33], "fidiv st, word ptr [rbx]");
+ test_display(&[0xde, 0x33], "fidiv st(0), [rbx]");
+// test_display(&[0xde, 0x3b], "fidivr st, word ptr [rbx]");
+ test_display(&[0xde, 0x3b], "fidivr st(0), [rbx]");
+// test_display(&[0xde, 0xc3], "faddp st(3), st");
+ test_display(&[0xde, 0xc3], "faddp st(3), st(0)");
+// test_display(&[0xde, 0xcb], "fmulp st(3), st");
+ test_display(&[0xde, 0xcb], "fmulp st(3), st(0)");
+// test_display(&[0xde, 0xd3], "fcomp st, st(3)");
+ test_display(&[0xde, 0xd3], "fcomp st(0), st(3)");
+ test_invalid(&[0xde, 0xd8]);
+ test_display(&[0xde, 0xd9], "fcompp");
+ test_invalid(&[0xde, 0xda]);
+ test_invalid(&[0xde, 0xdb]);
+ test_invalid(&[0xde, 0xdc]);
+ test_invalid(&[0xde, 0xdd]);
+ test_invalid(&[0xde, 0xde]);
+ test_invalid(&[0xde, 0xdf]);
+// test_display(&[0xde, 0xe3], "fsubrp st(3), st");
+ test_display(&[0xde, 0xe3], "fsubrp st(3), st(0)");
+// test_display(&[0xde, 0xeb], "fsubp st(3), st");
+ test_display(&[0xde, 0xeb], "fsubp st(3), st(0)");
+// test_display(&[0xde, 0xf3], "fdivrp st(3), st");
+ test_display(&[0xde, 0xf3], "fdivrp st(3), st(0)");
+// test_display(&[0xde, 0xfb], "fdivp st(3), st");
+ test_display(&[0xde, 0xfb], "fdivp st(3), st(0)");
+// test_display(&[0xdf, 0x03], "fild st, word ptr [rbx]");
+ test_display(&[0xdf, 0x03], "fild st(0), [rbx]");
+// test_display(&[0xdf, 0x0b], "fisttp word ptr [rbx], st");
+ test_display(&[0xdf, 0x0b], "fisttp [rbx], st(0)");
+// test_display(&[0xdf, 0x13], "fist word ptr [rbx], st");
+ test_display(&[0xdf, 0x13], "fist [rbx], st(0)");
+// test_display(&[0xdf, 0x1b], "fistp word ptr [rbx], st");
+ test_display(&[0xdf, 0x1b], "fistp [rbx], st(0)");
+// test_display(&[0xdf, 0x23], "fbld st, ptr [rbx]");
+ test_display(&[0xdf, 0x23], "fbld st(0), [rbx]");
+// test_display(&[0xdf, 0x2b], "fild st, qword ptr [rbx]");
+ test_display(&[0xdf, 0x2b], "fild st(0), [rbx]");
+// test_display(&[0xdf, 0x33], "fbstp ptr [rbx], st");
+ test_display(&[0xdf, 0x33], "fbstp [rbx], st(0)");
+// test_display(&[0xdf, 0x3b], "fistp qword ptr [rbx], st");
+ test_display(&[0xdf, 0x3b], "fistp [rbx], st(0)");
+// test_display(&[0xdf, 0xc3], "ffreep st(3)");
+ test_display(&[0xdf, 0xc3], "ffreep st(3)");
+// test_display(&[0xdf, 0xcb], "fxch st, st(3)");
+ test_display(&[0xdf, 0xcb], "fxch st(0), st(3)");
+// test_display(&[0xdf, 0xd3], "fstp st(3), st");
+ test_display(&[0xdf, 0xd3], "fstp st(3), st(0)");
+// test_display(&[0xdf, 0xdb], "fstp st(3), st");
+ test_display(&[0xdf, 0xdb], "fstp st(3), st(0)");
+ test_display(&[0xdf, 0xe0], "fnstsw ax");
+ test_invalid(&[0xdf, 0xe1]);
+ test_invalid(&[0xdf, 0xe2]);
+ test_invalid(&[0xdf, 0xe3]);
+ test_invalid(&[0xdf, 0xe4]);
+ test_invalid(&[0xdf, 0xe5]);
+ test_invalid(&[0xdf, 0xe6]);
+ test_invalid(&[0xdf, 0xe7]);
+// test_display(&[0xdf, 0xeb], "fucomip st, st(3)");
+ test_display(&[0xdf, 0xeb], "fucomip st(0), st(3)");
+// test_display(&[0xdf, 0xf3], "fcomip st, st(3)");
+ test_display(&[0xdf, 0xf3], "fcomip st(0), st(3)");
+ test_invalid(&[0xdf, 0xf8]);
+ test_invalid(&[0xdf, 0xf9]);
+ test_invalid(&[0xdf, 0xfa]);
+ test_invalid(&[0xdf, 0xfb]);
+ test_invalid(&[0xdf, 0xfc]);
+ test_invalid(&[0xdf, 0xfd]);
+ test_invalid(&[0xdf, 0xfe]);
+ test_invalid(&[0xdf, 0xff]);
+}