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

Unified Diff: runtime/vm/assembler_x64.cc

Issue 8758012: Port object tests to 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 | « no previous file | runtime/vm/assembler_x64_test.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 1958)
+++ runtime/vm/assembler_x64.cc (working copy)
@@ -43,8 +43,8 @@
void Assembler::call(const ExternalLabel* label) {
- movq(R11, Immediate(label->address()));
- call(R11);
+ movq(TMP, Immediate(label->address()));
+ call(TMP);
}
@@ -1075,8 +1075,8 @@
void Assembler::jmp(const ExternalLabel* label) {
- movq(R11, Immediate(label->address()));
- jmp(R11);
+ movq(TMP, Immediate(label->address()));
+ jmp(TMP);
}
@@ -1124,35 +1124,24 @@
void Assembler::LoadObject(Register dst, const Object& object) {
- UNIMPLEMENTED();
ASSERT(object.IsZoneHandle());
AssemblerBuffer::EnsureCapacity ensured(&buffer_);
- EmitUint8(0xB8 + dst);
+ EmitRegisterREX(dst, REX_W);
+ EmitUint8(0xB8 | (dst & 7));
buffer_.EmitObject(object);
}
void Assembler::PushObject(const Object& object) {
- UNIMPLEMENTED();
- ASSERT(object.IsZoneHandle());
- AssemblerBuffer::EnsureCapacity ensured(&buffer_);
- EmitUint8(0x68);
- buffer_.EmitObject(object);
+ LoadObject(TMP, object);
+ pushq(TMP);
}
void Assembler::CompareObject(Register reg, const Object& object) {
- UNIMPLEMENTED();
- ASSERT(object.IsZoneHandle());
- AssemblerBuffer::EnsureCapacity ensured(&buffer_);
- if (reg == RAX) {
- EmitUint8(0x05 + (7 << 3));
- buffer_.EmitObject(object);
- } else {
- EmitUint8(0x81);
- EmitOperand(7, Operand(reg));
- buffer_.EmitObject(object);
- }
+ ASSERT(reg != TMP);
+ LoadObject(TMP, object);
+ cmpq(reg, TMP);
}
« no previous file with comments | « no previous file | runtime/vm/assembler_x64_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698