Index: src/ia32/disasm-ia32.cc |
diff --git a/src/ia32/disasm-ia32.cc b/src/ia32/disasm-ia32.cc |
index d7b28d5bf127a21859faaa1d73016d8ea915afc8..057a558e28fbd277acf8054bca0c641bcc5537b1 100644 |
--- a/src/ia32/disasm-ia32.cc |
+++ b/src/ia32/disasm-ia32.cc |
@@ -1042,38 +1042,49 @@ int DisassemblerIA32::InstructionDecode(v8::internal::Vector<char> out_buffer, |
NameOfXMMRegister(regop), |
NameOfXMMRegister(rm)); |
data++; |
- } else if (f0byte == 0x54) { |
+ } else if (f0byte >= 0x53 && f0byte <= 0x5F) { |
+ const char* const pseudo_op[] = { |
+ "rcpps", |
+ "andps", |
+ "andnps", |
+ "orps", |
+ "xorps", |
+ "addps", |
+ "mulps", |
+ "cvtps2pd", |
+ "cvtdq2ps", |
+ "subps", |
+ "minps", |
+ "divps", |
+ "maxps", |
+ }; |
+ |
data += 2; |
int mod, regop, rm; |
get_modrm(*data, &mod, ®op, &rm); |
- AppendToBuffer("andps %s,%s", |
- NameOfXMMRegister(regop), |
- NameOfXMMRegister(rm)); |
- data++; |
- } else if (f0byte == 0x56) { |
+ AppendToBuffer("%s %s,", |
+ pseudo_op[f0byte - 0x53], |
+ NameOfXMMRegister(regop)); |
+ data += PrintRightXMMOperand(data); |
+ } else if (f0byte == 0x50) { |
data += 2; |
int mod, regop, rm; |
get_modrm(*data, &mod, ®op, &rm); |
- AppendToBuffer("orps %s,%s", |
- NameOfXMMRegister(regop), |
+ AppendToBuffer("movmskps %s,%s", |
+ NameOfCPURegister(regop), |
NameOfXMMRegister(rm)); |
data++; |
- } else if (f0byte == 0x57) { |
+ } else if (f0byte== 0xC6) { |
+ // shufps xmm, xmm/m128, imm8 |
data += 2; |
int mod, regop, rm; |
get_modrm(*data, &mod, ®op, &rm); |
- AppendToBuffer("xorps %s,%s", |
- NameOfXMMRegister(regop), |
- NameOfXMMRegister(rm)); |
- data++; |
- } else if (f0byte == 0x50) { |
+ int8_t imm8 = static_cast<int8_t>(data[1]); |
+ AppendToBuffer("shufps %s,%s,%d", |
+ NameOfXMMRegister(rm), |
+ NameOfXMMRegister(regop), |
+ static_cast<int>(imm8)); |
data += 2; |
- int mod, regop, rm; |
- get_modrm(*data, &mod, ®op, &rm); |
- AppendToBuffer("movmskps %s,%s", |
- NameOfCPURegister(regop), |
- NameOfXMMRegister(rm)); |
- data++; |
} else if ((f0byte & 0xF0) == 0x80) { |
data += JumpConditional(data, branch_hint); |
} else if (f0byte == 0xBE || f0byte == 0xBF || f0byte == 0xB6 || |