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

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

Issue 10909169: Add support for WritableRegister policy in the register allocator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't use non-volatile EBX in a test Created 8 years, 3 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 | « runtime/vm/assembler_x64.h ('k') | runtime/vm/flow_graph_allocator.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/heap.h" 9 #include "vm/heap.h"
10 #include "vm/memory_region.h" 10 #include "vm/memory_region.h"
(...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 cmpl(value, Immediate( 1587 cmpl(value, Immediate(
1588 (kNewObjectAlignmentOffset >> 1) + kHeapObjectTag + 1588 (kNewObjectAlignmentOffset >> 1) + kHeapObjectTag +
1589 kOldObjectAlignmentOffset + kHeapObjectTag)); 1589 kOldObjectAlignmentOffset + kHeapObjectTag));
1590 j(NOT_ZERO, no_update, Assembler::kNearJump); 1590 j(NOT_ZERO, no_update, Assembler::kNearJump);
1591 } 1591 }
1592 1592
1593 1593
1594 void Assembler::StoreIntoObject(Register object, 1594 void Assembler::StoreIntoObject(Register object,
1595 const FieldAddress& dest, 1595 const FieldAddress& dest,
1596 Register value) { 1596 Register value) {
1597 // TODO(kmillikin): pass temp registers to avoid pushing registers. 1597 ASSERT(object != value);
1598 movq(dest, value); 1598 movq(dest, value);
1599
1600 Label done; 1599 Label done;
1601 pushq(value);
1602 StoreIntoObjectFilter(object, value, &done); 1600 StoreIntoObjectFilter(object, value, &done);
1603 // A store buffer update is required. 1601 // A store buffer update is required.
1604 if (value != RAX) pushq(RAX); 1602 if (value != RAX) pushq(RAX);
1605 leaq(RAX, dest); 1603 leaq(RAX, dest);
1606 call(&StubCode::UpdateStoreBufferLabel()); 1604 call(&StubCode::UpdateStoreBufferLabel());
1607 if (value != RAX) popq(RAX); 1605 if (value != RAX) popq(RAX);
1608 Bind(&done); 1606 Bind(&done);
1609 popq(value);
1610 } 1607 }
1611 1608
1612 1609
1613 void Assembler::StoreIntoObjectNoBarrier(Register object, 1610 void Assembler::StoreIntoObjectNoBarrier(Register object,
1614 const FieldAddress& dest, 1611 const FieldAddress& dest,
1615 Register value) { 1612 Register value) {
1616 movq(dest, value); 1613 movq(dest, value);
1617 #if defined(DEBUG) 1614 #if defined(DEBUG)
1618 Label done; 1615 Label done;
1619 pushq(value); 1616 pushq(value);
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1987 1984
1988 const char* Assembler::XmmRegisterName(XmmRegister reg) { 1985 const char* Assembler::XmmRegisterName(XmmRegister reg) {
1989 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 1986 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
1990 return xmm_reg_names[reg]; 1987 return xmm_reg_names[reg];
1991 } 1988 }
1992 1989
1993 1990
1994 } // namespace dart 1991 } // namespace dart
1995 1992
1996 #endif // defined TARGET_ARCH_X64 1993 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/assembler_x64.h ('k') | runtime/vm/flow_graph_allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698