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

Unified Diff: runtime/vm/disassembler_ia32.cc

Issue 8758005: Disassembler for x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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/disassembler_arm.cc ('k') | runtime/vm/disassembler_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/disassembler_ia32.cc
===================================================================
--- runtime/vm/disassembler_ia32.cc (revision 1951)
+++ runtime/vm/disassembler_ia32.cc (working copy)
@@ -1519,10 +1519,26 @@
}
-const char* Disassembler::RegisterName(Register reg) {
- ASSERT(0 <= reg);
- ASSERT(reg < kMaxCPURegisters);
- return (cpu_regs[reg]);
+void Disassembler::Disassemble(uword start,
+ uword end,
+ DisassemblyFormatter* formatter) {
+ ASSERT(formatter != NULL);
+ char hex_buffer[kHexadecimalBufferSize]; // Instruction in hexadecimal form.
+ char human_buffer[kUserReadableBufferSize]; // Human-readable instruction.
+ uword pc = start;
+ while (pc < end) {
+ int instruction_length = DecodeInstruction(hex_buffer,
+ sizeof(hex_buffer),
+ human_buffer,
+ sizeof(human_buffer),
+ pc);
+ formatter->ConsumeInstruction(hex_buffer,
+ sizeof(hex_buffer),
+ human_buffer,
+ sizeof(human_buffer),
+ pc);
+ pc += instruction_length;
+ }
}
} // namespace dart
« no previous file with comments | « runtime/vm/disassembler_arm.cc ('k') | runtime/vm/disassembler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698