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

Unified Diff: runtime/vm/assembler_x64.cc

Issue 10052013: Modify 'movq reg, reg' encoding in 64-bit code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
« no previous file with comments | « no previous file | runtime/vm/debugger_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_x64.cc
===================================================================
--- runtime/vm/assembler_x64.cc (revision 6416)
+++ runtime/vm/assembler_x64.cc (working copy)
@@ -278,12 +278,15 @@
}
+// Use 0x89 encoding (instead of 0x8B encoding), which is expected by gdb64
+// older than 7.3.1-gg5 when disassembling a function's prolog (movq rbp, rsp)
+// for proper unwinding of Dart frames (use --generate_gdb_symbols and -O0).
void Assembler::movq(Register dst, Register src) {
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
- Operand operand(src);
- EmitOperandREX(dst, operand, REX_W);
- EmitUint8(0x8B);
- EmitOperand(dst & 7, operand);
+ Operand operand(dst);
+ EmitOperandREX(src, operand, REX_W);
+ EmitUint8(0x89);
Lasse Reichstein Nielsen 2012/04/12 09:57:38 You could decide whether to use 0x89 or 0x8b depen
regis 2012/04/12 16:46:16 This is a good point for memory addressing modes,
+ EmitOperand(src & 7, operand);
}
« no previous file with comments | « no previous file | runtime/vm/debugger_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698