Index: src/x87/disasm-x87.cc |
diff --git a/src/x87/disasm-x87.cc b/src/x87/disasm-x87.cc |
index a3f1939b7365693d18118ca592f3b7384707b53a..6fed8bfe28b7db3f2fffb08d6f92258229ead789 100644 |
--- a/src/x87/disasm-x87.cc |
+++ b/src/x87/disasm-x87.cc |
@@ -906,18 +906,34 @@ static const char* F0Mnem(byte f0byte) { |
switch (f0byte) { |
case 0x0B: |
return "ud2"; |
- case 0x18: return "prefetch"; |
- case 0xA2: return "cpuid"; |
- case 0xBE: return "movsx_b"; |
- case 0xBF: return "movsx_w"; |
- case 0xB6: return "movzx_b"; |
- case 0xB7: return "movzx_w"; |
- case 0xAF: return "imul"; |
- case 0xA5: return "shld"; |
- case 0xAD: return "shrd"; |
- case 0xAC: return "shrd"; // 3-operand version. |
- case 0xAB: return "bts"; |
- case 0xBD: return "bsr"; |
+ case 0x18: |
+ return "prefetch"; |
+ case 0xA2: |
+ return "cpuid"; |
+ case 0xBE: |
+ return "movsx_b"; |
+ case 0xBF: |
+ return "movsx_w"; |
+ case 0xB6: |
+ return "movzx_b"; |
+ case 0xB7: |
+ return "movzx_w"; |
+ case 0xAF: |
+ return "imul"; |
+ case 0xA4: |
+ return "shld"; |
+ case 0xA5: |
+ return "shld"; |
+ case 0xAD: |
+ return "shrd"; |
+ case 0xAC: |
+ return "shrd"; // 3-operand version. |
+ case 0xAB: |
+ return "bts"; |
+ case 0xBC: |
+ return "bsf"; |
+ case 0xBD: |
+ return "bsr"; |
default: return NULL; |
} |
} |
@@ -1134,8 +1150,17 @@ int DisassemblerX87::InstructionDecode(v8::internal::Vector<char> out_buffer, |
data += SetCC(data); |
} else if ((f0byte & 0xF0) == 0x40) { |
data += CMov(data); |
+ } else if (f0byte == 0xA4) { |
+ data += 2; |
+ AppendToBuffer("%s ", f0mnem); |
+ int mod, regop, rm; |
+ get_modrm(*data, &mod, ®op, &rm); |
+ int8_t imm8 = static_cast<int8_t>(data[1]); |
+ data += 2; |
+ AppendToBuffer("%s,%s,%d", NameOfCPURegister(rm), |
+ NameOfCPURegister(regop), static_cast<int>(imm8)); |
} else if (f0byte == 0xAB || f0byte == 0xA5 || f0byte == 0xAD) { |
- // shrd, shld, bts |
+ // shrd, shld_cl, bts |
data += 2; |
AppendToBuffer("%s ", f0mnem); |
int mod, regop, rm; |