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

Side by Side Diff: runtime/vm/assembler_ia32.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 | « no previous file | runtime/vm/assembler_ia32_test.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_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 cmpl(value, Immediate( 1415 cmpl(value, Immediate(
1416 (kNewObjectAlignmentOffset >> 1) + kHeapObjectTag + 1416 (kNewObjectAlignmentOffset >> 1) + kHeapObjectTag +
1417 kOldObjectAlignmentOffset + kHeapObjectTag)); 1417 kOldObjectAlignmentOffset + kHeapObjectTag));
1418 j(NOT_ZERO, no_update, Assembler::kNearJump); 1418 j(NOT_ZERO, no_update, Assembler::kNearJump);
1419 } 1419 }
1420 1420
1421 1421
1422 void Assembler::StoreIntoObject(Register object, 1422 void Assembler::StoreIntoObject(Register object,
1423 const FieldAddress& dest, 1423 const FieldAddress& dest,
1424 Register value) { 1424 Register value) {
1425 // TODO(kmillikin): pass temp registers to avoid pushing registers. 1425 ASSERT(object != value);
1426 movl(dest, value); 1426 movl(dest, value);
1427 Label done; 1427 Label done;
1428 pushl(value);
1429 StoreIntoObjectFilter(object, value, &done); 1428 StoreIntoObjectFilter(object, value, &done);
1430 // A store buffer update is required. 1429 // A store buffer update is required.
1431 if (value != EAX) pushl(EAX); // Preserve EAX. 1430 if (value != EAX) pushl(EAX); // Preserve EAX.
1432 leal(EAX, dest); 1431 leal(EAX, dest);
1433 call(&StubCode::UpdateStoreBufferLabel()); 1432 call(&StubCode::UpdateStoreBufferLabel());
1434 if (value != EAX) popl(EAX); // Restore EAX. 1433 if (value != EAX) popl(EAX); // Restore EAX.
1435 Bind(&done); 1434 Bind(&done);
1436 popl(value);
1437 } 1435 }
1438 1436
1439 1437
1440 void Assembler::StoreIntoObjectNoBarrier(Register object, 1438 void Assembler::StoreIntoObjectNoBarrier(Register object,
1441 const FieldAddress& dest, 1439 const FieldAddress& dest,
1442 Register value) { 1440 Register value) {
1443 movl(dest, value); 1441 movl(dest, value);
1444 #if defined(DEBUG) 1442 #if defined(DEBUG)
1445 Label done; 1443 Label done;
1446 pushl(value); 1444 pushl(value);
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1840 1838
1841 const char* Assembler::XmmRegisterName(XmmRegister reg) { 1839 const char* Assembler::XmmRegisterName(XmmRegister reg) {
1842 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); 1840 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
1843 return xmm_reg_names[reg]; 1841 return xmm_reg_names[reg];
1844 } 1842 }
1845 1843
1846 1844
1847 } // namespace dart 1845 } // namespace dart
1848 1846
1849 #endif // defined TARGET_ARCH_IA32 1847 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/assembler_ia32_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698