Revision f230a1cf deps/v8/src/x64/disasm-x64.cc
deps/v8/src/x64/disasm-x64.cc | ||
---|---|---|
93 | 93 |
{ 0x39, OPER_REG_OP_ORDER, "cmp" }, |
94 | 94 |
{ 0x3A, BYTE_REG_OPER_OP_ORDER, "cmp" }, |
95 | 95 |
{ 0x3B, REG_OPER_OP_ORDER, "cmp" }, |
96 |
{ 0x63, REG_OPER_OP_ORDER, "movsxlq" },
|
|
96 |
{ 0x63, REG_OPER_OP_ORDER, "movsxl" }, |
|
97 | 97 |
{ 0x84, BYTE_REG_OPER_OP_ORDER, "test" }, |
98 | 98 |
{ 0x85, REG_OPER_OP_ORDER, "test" }, |
99 | 99 |
{ 0x86, BYTE_REG_OPER_OP_ORDER, "xchg" }, |
... | ... | |
1036 | 1036 |
get_modrm(*current, &mod, ®op, &rm); |
1037 | 1037 |
AppendToBuffer("extractps "); // reg/m32, xmm, imm8 |
1038 | 1038 |
current += PrintRightOperand(current); |
1039 |
AppendToBuffer(", %s, %d", NameOfCPURegister(regop), (*current) & 3);
|
|
1039 |
AppendToBuffer(",%s,%d", NameOfXMMRegister(regop), (*current) & 3);
|
|
1040 | 1040 |
current += 1; |
1041 | 1041 |
} else if (third_byte == 0x0b) { |
1042 | 1042 |
get_modrm(*current, &mod, ®op, &rm); |
1043 | 1043 |
// roundsd xmm, xmm/m64, imm8 |
1044 |
AppendToBuffer("roundsd %s, ", NameOfCPURegister(regop));
|
|
1045 |
current += PrintRightOperand(current); |
|
1046 |
AppendToBuffer(", %d", (*current) & 3);
|
|
1044 |
AppendToBuffer("roundsd %s,", NameOfXMMRegister(regop));
|
|
1045 |
current += PrintRightXMMOperand(current);
|
|
1046 |
AppendToBuffer(",%d", (*current) & 3); |
|
1047 | 1047 |
current += 1; |
1048 | 1048 |
} else { |
1049 | 1049 |
UnimplementedInstruction(); |
... | ... | |
1062 | 1062 |
} // else no immediate displacement. |
1063 | 1063 |
AppendToBuffer("nop"); |
1064 | 1064 |
} else if (opcode == 0x28) { |
1065 |
AppendToBuffer("movapd %s, ", NameOfXMMRegister(regop));
|
|
1065 |
AppendToBuffer("movapd %s,", NameOfXMMRegister(regop)); |
|
1066 | 1066 |
current += PrintRightXMMOperand(current); |
1067 | 1067 |
} else if (opcode == 0x29) { |
1068 | 1068 |
AppendToBuffer("movapd "); |
1069 | 1069 |
current += PrintRightXMMOperand(current); |
1070 |
AppendToBuffer(", %s", NameOfXMMRegister(regop));
|
|
1070 |
AppendToBuffer(",%s", NameOfXMMRegister(regop)); |
|
1071 | 1071 |
} else if (opcode == 0x6E) { |
1072 | 1072 |
AppendToBuffer("mov%c %s,", |
1073 | 1073 |
rex_w() ? 'q' : 'd', |
... | ... | |
1081 | 1081 |
AppendToBuffer("mov%c ", |
1082 | 1082 |
rex_w() ? 'q' : 'd'); |
1083 | 1083 |
current += PrintRightOperand(current); |
1084 |
AppendToBuffer(", %s", NameOfXMMRegister(regop));
|
|
1084 |
AppendToBuffer(",%s", NameOfXMMRegister(regop)); |
|
1085 | 1085 |
} else if (opcode == 0x7F) { |
1086 | 1086 |
AppendToBuffer("movdqa "); |
1087 | 1087 |
current += PrintRightXMMOperand(current); |
1088 |
AppendToBuffer(", %s", NameOfXMMRegister(regop));
|
|
1088 |
AppendToBuffer(",%s", NameOfXMMRegister(regop)); |
|
1089 | 1089 |
} else if (opcode == 0xD6) { |
1090 | 1090 |
AppendToBuffer("movq "); |
1091 | 1091 |
current += PrintRightXMMOperand(current); |
1092 |
AppendToBuffer(", %s", NameOfXMMRegister(regop));
|
|
1092 |
AppendToBuffer(",%s", NameOfXMMRegister(regop)); |
|
1093 | 1093 |
} else if (opcode == 0x50) { |
1094 | 1094 |
AppendToBuffer("movmskpd %s,", NameOfCPURegister(regop)); |
1095 | 1095 |
current += PrintRightXMMOperand(current); |
... | ... | |
1214 | 1214 |
} else if (opcode == 0x7E) { |
1215 | 1215 |
int mod, regop, rm; |
1216 | 1216 |
get_modrm(*current, &mod, ®op, &rm); |
1217 |
AppendToBuffer("movq %s, ", NameOfXMMRegister(regop));
|
|
1217 |
AppendToBuffer("movq %s,", NameOfXMMRegister(regop)); |
|
1218 | 1218 |
current += PrintRightXMMOperand(current); |
1219 | 1219 |
} else { |
1220 | 1220 |
UnimplementedInstruction(); |
... | ... | |
1238 | 1238 |
// movaps xmm, xmm/m128 |
1239 | 1239 |
int mod, regop, rm; |
1240 | 1240 |
get_modrm(*current, &mod, ®op, &rm); |
1241 |
AppendToBuffer("movaps %s, ", NameOfXMMRegister(regop));
|
|
1241 |
AppendToBuffer("movaps %s,", NameOfXMMRegister(regop)); |
|
1242 | 1242 |
current += PrintRightXMMOperand(current); |
1243 | 1243 |
|
1244 | 1244 |
} else if (opcode == 0x29) { |
... | ... | |
1247 | 1247 |
get_modrm(*current, &mod, ®op, &rm); |
1248 | 1248 |
AppendToBuffer("movaps "); |
1249 | 1249 |
current += PrintRightXMMOperand(current); |
1250 |
AppendToBuffer(", %s", NameOfXMMRegister(regop));
|
|
1250 |
AppendToBuffer(",%s", NameOfXMMRegister(regop)); |
|
1251 | 1251 |
|
1252 | 1252 |
} else if (opcode == 0xA2) { |
1253 | 1253 |
// CPUID |
... | ... | |
1260 | 1260 |
byte_size_operand_ = idesc.byte_size_operation; |
1261 | 1261 |
current += PrintOperands(idesc.mnem, idesc.op_order_, current); |
1262 | 1262 |
|
1263 |
} else if (opcode == 0x54) { |
|
1264 |
// xorps xmm, xmm/m128 |
|
1265 |
int mod, regop, rm; |
|
1266 |
get_modrm(*current, &mod, ®op, &rm); |
|
1267 |
AppendToBuffer("andps %s,", NameOfXMMRegister(regop)); |
|
1268 |
current += PrintRightXMMOperand(current); |
|
1269 |
|
|
1263 | 1270 |
} else if (opcode == 0x57) { |
1264 | 1271 |
// xorps xmm, xmm/m128 |
1265 | 1272 |
int mod, regop, rm; |
1266 | 1273 |
get_modrm(*current, &mod, ®op, &rm); |
1267 |
AppendToBuffer("xorps %s, ", NameOfXMMRegister(regop));
|
|
1274 |
AppendToBuffer("xorps %s,", NameOfXMMRegister(regop)); |
|
1268 | 1275 |
current += PrintRightXMMOperand(current); |
1269 | 1276 |
|
1270 | 1277 |
} else if (opcode == 0x50) { |
1271 | 1278 |
// movmskps reg, xmm |
1272 | 1279 |
int mod, regop, rm; |
1273 | 1280 |
get_modrm(*current, &mod, ®op, &rm); |
1274 |
AppendToBuffer("movmskps %s, ", NameOfCPURegister(regop));
|
|
1281 |
AppendToBuffer("movmskps %s,", NameOfCPURegister(regop)); |
|
1275 | 1282 |
current += PrintRightXMMOperand(current); |
1276 | 1283 |
|
1277 | 1284 |
} else if ((opcode & 0xF0) == 0x80) { |
... | ... | |
1450 | 1457 |
case SHORT_IMMEDIATE_INSTR: { |
1451 | 1458 |
byte* addr = |
1452 | 1459 |
reinterpret_cast<byte*>(*reinterpret_cast<int32_t*>(data + 1)); |
1453 |
AppendToBuffer("%s rax, %s", idesc.mnem, NameOfAddress(addr));
|
|
1460 |
AppendToBuffer("%s rax,%s", idesc.mnem, NameOfAddress(addr)); |
|
1454 | 1461 |
data += 5; |
1455 | 1462 |
break; |
1456 | 1463 |
} |
... | ... | |
1599 | 1606 |
if (reg == 0) { |
1600 | 1607 |
AppendToBuffer("nop"); // Common name for xchg rax,rax. |
1601 | 1608 |
} else { |
1602 |
AppendToBuffer("xchg%c rax, %s",
|
|
1609 |
AppendToBuffer("xchg%c rax,%s", |
|
1603 | 1610 |
operand_size_code(), |
1604 | 1611 |
NameOfCPURegister(reg)); |
1605 | 1612 |
} |
... | ... | |
1628 | 1635 |
bool is_32bit = (opcode >= 0xB8); |
1629 | 1636 |
int reg = (opcode & 0x7) | (rex_b() ? 8 : 0); |
1630 | 1637 |
if (is_32bit) { |
1631 |
AppendToBuffer("mov%c %s, ",
|
|
1638 |
AppendToBuffer("mov%c %s,", |
|
1632 | 1639 |
operand_size_code(), |
1633 | 1640 |
NameOfCPURegister(reg)); |
1634 | 1641 |
data += PrintImmediate(data, OPERAND_DOUBLEWORD_SIZE); |
1635 | 1642 |
} else { |
1636 |
AppendToBuffer("movb %s, ",
|
|
1643 |
AppendToBuffer("movb %s,", |
|
1637 | 1644 |
NameOfByteCPURegister(reg)); |
1638 | 1645 |
data += PrintImmediate(data, OPERAND_BYTE_SIZE); |
1639 | 1646 |
} |
... | ... | |
1755 | 1762 |
break; |
1756 | 1763 |
|
1757 | 1764 |
case 0x3C: |
1758 |
AppendToBuffer("cmp al, 0x%x", *reinterpret_cast<int8_t*>(data + 1));
|
|
1765 |
AppendToBuffer("cmp al,0x%x", *reinterpret_cast<int8_t*>(data + 1)); |
|
1759 | 1766 |
data +=2; |
1760 | 1767 |
break; |
1761 | 1768 |
|
Also available in: Unified diff