SIMD pcmpgtb,w,d,q for x86/x86_64
Rationale:
Enables fast compare gt.
Test: assembler_x86[_64]_test
Change-Id: I0a069649480529f3fec2c2b100e2aaaa2cd79820
diff --git a/disassembler/disassembler_x86.cc b/disassembler/disassembler_x86.cc
index f5c3ad2..e12bcec 100644
--- a/disassembler/disassembler_x86.cc
+++ b/disassembler/disassembler_x86.cc
@@ -574,6 +574,20 @@
load = true;
src_reg_file = dst_reg_file = SSE;
break;
+ case 0x29:
+ opcode1 = "pcmpeqq";
+ prefix[2] = 0;
+ has_modrm = true;
+ load = true;
+ src_reg_file = dst_reg_file = SSE;
+ break;
+ case 0x39:
+ opcode1 = "pcmpgtq";
+ prefix[2] = 0;
+ has_modrm = true;
+ load = true;
+ src_reg_file = dst_reg_file = SSE;
+ break;
case 0x40:
opcode1 = "pmulld";
prefix[2] = 0;
@@ -737,6 +751,24 @@
load = true;
has_modrm = true;
break;
+ case 0x64:
+ case 0x65:
+ case 0x66:
+ if (prefix[2] == 0x66) {
+ src_reg_file = dst_reg_file = SSE;
+ prefix[2] = 0; // clear prefix now it's served its purpose as part of the opcode
+ } else {
+ src_reg_file = dst_reg_file = MMX;
+ }
+ switch (*instr) {
+ case 0x64: opcode1 = "pcmpgtb"; break;
+ case 0x65: opcode1 = "pcmpgtw"; break;
+ case 0x66: opcode1 = "pcmpgtd"; break;
+ }
+ prefix[2] = 0;
+ has_modrm = true;
+ load = true;
+ break;
case 0x6E:
if (prefix[2] == 0x66) {
dst_reg_file = SSE;