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

Unified Diff: runtime/vm/disassembler_ia32.cc

Issue 14057004: Convert diamond shaped control flow into a single conditional instruction. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address Florian's comments Created 7 years, 8 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
Index: runtime/vm/disassembler_ia32.cc
diff --git a/runtime/vm/disassembler_ia32.cc b/runtime/vm/disassembler_ia32.cc
index f17d0c7cff088417380175283692af7c05f09a9d..76ea958ae76b2c165cbfaa53a8714bd36508bd2c 100644
--- a/runtime/vm/disassembler_ia32.cc
+++ b/runtime/vm/disassembler_ia32.cc
@@ -386,12 +386,16 @@ static const char* cpu_regs[kMaxCPURegisters] = {
"eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi"
};
+static const int kMaxByteCPURegisters = 8;
+static const char* byte_cpu_regs[kMaxByteCPURegisters] = {
+ "al", "cl", "dl", "bl", "ah", "ch", "dh", "bh"
+};
+
static const int kMaxXmmRegisters = 8;
static const char* xmm_regs[kMaxXmmRegisters] = {
"xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"
};
-
void X86Decoder::PrintCPURegister(int reg) {
ASSERT(0 <= reg);
ASSERT(reg < kMaxCPURegisters);
@@ -400,7 +404,9 @@ void X86Decoder::PrintCPURegister(int reg) {
void X86Decoder::PrintCPUByteRegister(int reg) {
- UNIMPLEMENTED();
+ ASSERT(0 <= reg);
+ ASSERT(reg < kMaxByteCPURegisters);
+ Print(byte_cpu_regs[reg]);
}
@@ -634,8 +640,7 @@ int X86Decoder::PrintRightXmmOperand(uint8_t* modrmp) {
int X86Decoder::PrintRightByteOperand(uint8_t* modrmp) {
- UNIMPLEMENTED();
- return 0;
+ return PrintRightOperandHelper(modrmp, &X86Decoder::PrintCPUByteRegister);
}

Powered by Google App Engine
This is Rietveld 408576698