Index: src/x64/disasm-x64.cc |
diff --git a/src/x64/disasm-x64.cc b/src/x64/disasm-x64.cc |
index 4258ab63330428751f94d64f12dfe33614a304e6..bd912cdd221328b717a6b904a395fb808708bd95 100644 |
--- a/src/x64/disasm-x64.cc |
+++ b/src/x64/disasm-x64.cc |
@@ -996,23 +996,44 @@ int DisassemblerX64::TwoByteOpcodeInstruction(byte* data) { |
if (operand_size_ == 0x66) { |
// 0x66 0x0F prefix. |
int mod, regop, rm; |
- get_modrm(*current, &mod, ®op, &rm); |
- if (opcode == 0x6E) { |
- AppendToBuffer("movd %s,", NameOfXMMRegister(regop)); |
- current += PrintRightOperand(current); |
- } else { |
- const char* mnemonic = "?"; |
- if (opcode == 0x57) { |
- mnemonic = "xorpd"; |
- } else if (opcode == 0x2E) { |
- mnemonic = "comisd"; |
- } else if (opcode == 0x2F) { |
- mnemonic = "ucomisd"; |
+ if (opcode == 0x3A) { |
+ byte third_byte = *current; |
+ current = data + 3; |
+ if (third_byte == 0x17) { |
+ get_modrm(*current, &mod, ®op, &rm); |
+ AppendToBuffer("extractps "); // reg/m32, xmm, imm8 |
+ current += PrintRightOperand(current); |
+ AppendToBuffer(", %s, %d", NameOfCPURegister(regop), (*current) & 3); |
+ current += 1; |
} else { |
UnimplementedInstruction(); |
} |
- AppendToBuffer("%s %s,", mnemonic, NameOfXMMRegister(regop)); |
- current += PrintRightXMMOperand(current); |
+ } else { |
+ get_modrm(*current, &mod, ®op, &rm); |
+ if (opcode == 0x6E) { |
+ AppendToBuffer("mov%c %s,", |
+ rex_w() ? 'q' : 'd', |
+ NameOfXMMRegister(regop)); |
+ current += PrintRightOperand(current); |
+ } else if (opcode == 0x7E) { |
+ AppendToBuffer("mov%c %s,", |
+ rex_w() ? 'q' : 'd', |
+ NameOfCPURegister(regop)); |
+ current += PrintRightXMMOperand(current); |
+ } else { |
+ const char* mnemonic = "?"; |
+ if (opcode == 0x57) { |
+ mnemonic = "xorpd"; |
+ } else if (opcode == 0x2E) { |
+ mnemonic = "comisd"; |
+ } else if (opcode == 0x2F) { |
+ mnemonic = "ucomisd"; |
+ } else { |
+ UnimplementedInstruction(); |
+ } |
+ AppendToBuffer("%s %s,", mnemonic, NameOfXMMRegister(regop)); |
+ current += PrintRightXMMOperand(current); |
+ } |
} |
} else if (group_1_prefix_ == 0xF2) { |
// Beginning of instructions with prefix 0xF2. |