Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: runtime/vm/disassembler_ia32.cc

Issue 20467004: Inline two argument shuffle operations on IA32 and X64. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/disassembler_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/disassembler_ia32.cc
diff --git a/runtime/vm/disassembler_ia32.cc b/runtime/vm/disassembler_ia32.cc
index 49664cc7c28a6f127fa9d54456c8b72b784dd551..5f1131e3b046a4264752acee3920ca6f829c6be7 100644
--- a/runtime/vm/disassembler_ia32.cc
+++ b/runtime/vm/disassembler_ia32.cc
@@ -226,6 +226,10 @@ static InstructionTable instruction_table;
// Returns NULL if the instruction is not handled here.
static const char* F0Mnem(uint8_t f0byte) {
switch (f0byte) {
+ case 0x12: return "movhlps";
+ case 0x14: return "unpcklps";
+ case 0x15: return "unpckhps";
+ case 0x16: return "movlhps";
case 0xA2: return "cpuid";
case 0x31: return "rdtsc";
case 0xBE: return "movsx_b";
@@ -258,6 +262,16 @@ static const char* F0Mnem(uint8_t f0byte) {
}
+static bool IsTwoXmmRegInstruction(uint8_t f0byte) {
+ return f0byte == 0x28 || f0byte == 0x11 || f0byte == 0x12 ||
+ f0byte == 0x14 || f0byte == 0x15 || f0byte == 0x16 ||
+ f0byte == 0x51 || f0byte == 0x52 || f0byte == 0x53 ||
+ f0byte == 0x54 || f0byte == 0x56 || f0byte == 0x58 ||
+ f0byte == 0x59 || f0byte == 0x5C || f0byte == 0x5D ||
+ f0byte == 0x5E || f0byte == 0x5F;
+}
+
+
// The implementation of x86 decoding based on the above tables.
class X86Decoder : public ValueObject {
public:
@@ -1362,22 +1376,6 @@ int X86Decoder::InstructionDecode(uword pc) {
PrintCPURegister(regop);
Print(",cl");
}
- } else if (f0byte == 0x28) {
- // movaps
- Print(f0mnem);
- int mod, regop, rm;
- GetModRm(*data, &mod, &regop, &rm);
- Print(" ");
- PrintXmmRegister(regop);
- Print(",");
- data += PrintRightXmmOperand(data);
- } else if (f0byte == 0x11) {
- Print("movups ");
- int mod, regop, rm;
- GetModRm(*data, &mod, &regop, &rm);
- data += PrintRightXmmOperand(data);
- Print(",");
- PrintXmmRegister(regop);
} else if (f0byte == 0x10) {
int mod, regop, rm;
GetModRm(*data, &mod, &regop, &rm);
@@ -1385,10 +1383,7 @@ int X86Decoder::InstructionDecode(uword pc) {
PrintXmmRegister(regop);
Print(",");
data += PrintRightOperand(data);
- } else if (f0byte == 0x51 || f0byte == 0x52 || f0byte == 0x53 ||
- f0byte == 0x54 || f0byte == 0x56 || f0byte == 0x58 ||
- f0byte == 0x59 || f0byte == 0x5C || f0byte == 0x5D ||
- f0byte == 0x5E || f0byte == 0x5F) {
+ } else if (IsTwoXmmRegInstruction(f0byte)) {
int mod, regop, rm;
GetModRm(*data, &mod, &regop, &rm);
Print(f0mnem);
@@ -1598,6 +1593,22 @@ int X86Decoder::InstructionDecode(uword pc) {
} else {
UNIMPLEMENTED();
}
+ } else if (*data == 0x14) {
+ int mod, regop, rm;
+ GetModRm(*(data+1), &mod, &regop, &rm);
+ Print("unpcklpd ");
+ PrintXmmRegister(regop);
+ Print(",");
+ PrintXmmRegister(rm);
+ data += 2;
+ } else if (*data == 0x15) {
+ int mod, regop, rm;
+ GetModRm(*(data+1), &mod, &regop, &rm);
+ Print("unpckhpd ");
+ PrintXmmRegister(regop);
+ Print(",");
+ PrintXmmRegister(rm);
+ data += 2;
} else {
UNIMPLEMENTED();
}
« no previous file with comments | « no previous file | runtime/vm/disassembler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698