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

Side by Side Diff: runtime/vm/assembler_x64.cc

Issue 201013002: x64 code improvements and cleanups. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/heap.h" 10 #include "vm/heap.h"
(...skipping 2537 matching lines...) Expand 10 before | Expand all | Expand 10 after
2548 LoadObject(TMP, object, pp); 2548 LoadObject(TMP, object, pp);
2549 pushq(TMP); 2549 pushq(TMP);
2550 } else { 2550 } else {
2551 PushImmediate(Immediate(reinterpret_cast<int64_t>(object.raw())), pp); 2551 PushImmediate(Immediate(reinterpret_cast<int64_t>(object.raw())), pp);
2552 } 2552 }
2553 } 2553 }
2554 2554
2555 2555
2556 void Assembler::CompareObject(Register reg, const Object& object, Register pp) { 2556 void Assembler::CompareObject(Register reg, const Object& object, Register pp) {
2557 if (CanLoadFromObjectPool(object)) { 2557 if (CanLoadFromObjectPool(object)) {
2558 ASSERT(reg != TMP); 2558 const int32_t offset =
2559 LoadObject(TMP, object, pp); 2559 Array::element_offset(FindObject(object, kNotPatchable));
2560 cmpq(reg, TMP); 2560 cmpq(reg, Address::AddressBaseImm32(pp, offset - kHeapObjectTag));
zra 2014/03/17 19:29:58 AddressBaseImm32 emits a fixed-size constant for t
srdjan 2014/03/17 19:54:32 Done.
2561 } else { 2561 } else {
2562 CompareImmediate( 2562 CompareImmediate(
2563 reg, Immediate(reinterpret_cast<int64_t>(object.raw())), pp); 2563 reg, Immediate(reinterpret_cast<int64_t>(object.raw())), pp);
2564 } 2564 }
2565 } 2565 }
2566 2566
2567 2567
2568 intptr_t Assembler::FindImmediate(int64_t imm) { 2568 intptr_t Assembler::FindImmediate(int64_t imm) {
2569 ASSERT(Isolate::Current() != Dart::vm_isolate()); 2569 ASSERT(Isolate::Current() != Dart::vm_isolate());
2570 ASSERT(!object_pool_.IsNull()); 2570 ASSERT(!object_pool_.IsNull());
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
3264 3264
3265 3265
3266 const char* Assembler::FpuRegisterName(FpuRegister reg) { 3266 const char* Assembler::FpuRegisterName(FpuRegister reg) {
3267 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 3267 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
3268 return xmm_reg_names[reg]; 3268 return xmm_reg_names[reg];
3269 } 3269 }
3270 3270
3271 } // namespace dart 3271 } // namespace dart
3272 3272
3273 #endif // defined TARGET_ARCH_X64 3273 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698