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

Unified Diff: runtime/vm/disassembler_x64.cc

Issue 1221683005: Add lock prefix and cmpxchg to X64 disassembler. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/disassembler_x64.cc
diff --git a/runtime/vm/disassembler_x64.cc b/runtime/vm/disassembler_x64.cc
index be31deb7f3afb9f4ac896178dc41e398c60a08e2..0b8766248d5148c7b9cbd399ae7b1b01ffdd3e6b 100644
--- a/runtime/vm/disassembler_x64.cc
+++ b/runtime/vm/disassembler_x64.cc
@@ -1089,6 +1089,8 @@ bool DisassemblerX64::DecodeInstructionType(uint8_t** data) {
// if (rex_w()) AppendToBuffer("REX.W ");
} else if ((current & 0xFE) == 0xF2) { // Group 1 prefix (0xF2 or 0xF3).
group_1_prefix_ = current;
+ } else if (current == 0xF0) {
+ AppendToBuffer("lock ");
} else { // Not a prefix - an opcode.
break;
}
@@ -1515,8 +1517,9 @@ int DisassemblerX64::TwoByteOpcodeInstruction(uint8_t* data) {
current = data + JumpConditional(data);
} else if (opcode == 0xBE || opcode == 0xBF || opcode == 0xB6 ||
- opcode == 0xB7 || opcode == 0xAF) {
- // Size-extending moves, IMUL.
+ opcode == 0xB7 || opcode == 0xAF || opcode == 0xB0 ||
+ opcode == 0xB1) {
+ // Size-extending moves, IMUL, cmpxchg.
current += PrintOperands(mnemonic, REG_OPER_OP_ORDER, current);
} else if ((opcode & 0xF0) == 0x90) {
@@ -1581,6 +1584,9 @@ const char* DisassemblerX64::TwoByteMnemonic(uint8_t opcode) {
return "shrd";
case 0xAF:
return "imul";
+ case 0xB0:
+ case 0xB1:
+ return "cmpxchg";
case 0xB6:
return "movzxb";
case 0xB7:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698