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

Unified Diff: runtime/vm/disassembler_ia32.cc

Issue 154733002: Fix disassembler crash with profiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | « runtime/vm/code_generator.cc ('k') | 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 150e4517bfdf19709752426953d8343751bd9137..3981bebcb217a8e824f21bdbdcc70a6422d2d117 100644
--- a/runtime/vm/disassembler_ia32.cc
+++ b/runtime/vm/disassembler_ia32.cc
@@ -251,6 +251,7 @@ static const char* F0Mnem(uint8_t f0byte) {
case 0x57: return "xorps";
case 0x58: return "addps";
case 0x59: return "mulps";
+ case 0x5A: return "cvtps2pd";
case 0x5C: return "subps";
case 0x5D: return "minps";
case 0x5E: return "divps";
@@ -262,6 +263,23 @@ static const char* F0Mnem(uint8_t f0byte) {
}
}
+static const char* PackedDoubleMnemonic(uint8_t data) {
+ const char* mnemonic = NULL;
+ if (data == 0xFE) mnemonic = "paddd ";
+ if (data == 0xFA) mnemonic = "psubd ";
+ if (data == 0x2F) mnemonic = "comisd ";
+ if (data == 0x58) mnemonic = "addpd ";
+ if (data == 0x5C) mnemonic = "subpd ";
+ if (data == 0x59) mnemonic = "mulpd ";
+ if (data == 0x5E) mnemonic = "divpd ";
+ if (data == 0x5D) mnemonic = "minpd ";
+ if (data == 0x5F) mnemonic = "maxpd ";
+ if (data == 0x51) mnemonic = "sqrtpd ";
+ if (data == 0x5A) mnemonic = "cvtpd2ps ";
+ ASSERT(mnemonic != NULL);
+ return mnemonic;
+}
+
static bool IsTwoXmmRegInstruction(uint8_t f0byte) {
return f0byte == 0x28 || f0byte == 0x11 || f0byte == 0x12 ||
@@ -269,7 +287,7 @@ static bool IsTwoXmmRegInstruction(uint8_t f0byte) {
f0byte == 0x51 || f0byte == 0x52 || f0byte == 0x53 ||
f0byte == 0x54 || f0byte == 0x56 || f0byte == 0x58 ||
f0byte == 0x59 || f0byte == 0x5C || f0byte == 0x5D ||
- f0byte == 0x5E || f0byte == 0x5F;
+ f0byte == 0x5E || f0byte == 0x5F || f0byte == 0x5A;
}
@@ -1602,11 +1620,11 @@ int X86Decoder::InstructionDecode(uword pc) {
Print(",");
PrintXmmRegister(rm);
data += 2;
- } else if ((*data == 0xFE) || (*data == 0xFA) || (*data == 0x2F)) {
- const char* mnemonic = NULL;
- if (*data == 0xFE) mnemonic = "paddd ";
- if (*data == 0xFA) mnemonic = "psubd ";
- if (*data == 0x2F) mnemonic = "comisd ";
+ } else if ((*data == 0xFE) || (*data == 0xFA) || (*data == 0x2F) ||
+ (*data == 0x58) || (*data == 0x5C) || (*data == 0x59) ||
+ (*data == 0x5E) || (*data == 0x5D) || (*data == 0x5F) ||
+ (*data == 0x51) || (*data == 0x5A)) {
+ const char* mnemonic = PackedDoubleMnemonic(*data);
int mod, regop, rm;
GetModRm(*(data+1), &mod, &regop, &rm);
Print(mnemonic);
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/disassembler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698