Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1401 cmpl(value, Immediate( | 1401 cmpl(value, Immediate( |
| 1402 (kNewObjectAlignmentOffset >> 1) + kHeapObjectTag + | 1402 (kNewObjectAlignmentOffset >> 1) + kHeapObjectTag + |
| 1403 kOldObjectAlignmentOffset + kHeapObjectTag)); | 1403 kOldObjectAlignmentOffset + kHeapObjectTag)); |
| 1404 j(NOT_ZERO, no_update, Assembler::kNearJump); | 1404 j(NOT_ZERO, no_update, Assembler::kNearJump); |
| 1405 } | 1405 } |
| 1406 | 1406 |
| 1407 | 1407 |
| 1408 void Assembler::StoreIntoObject(Register object, | 1408 void Assembler::StoreIntoObject(Register object, |
| 1409 const FieldAddress& dest, | 1409 const FieldAddress& dest, |
| 1410 Register value) { | 1410 Register value) { |
| 1411 // TODO(kmillikin): pass temp registers to avoid pushing registers. | |
|
Ivan Posva
2012/07/31 16:43:35
I have a different plan for this so please do not
| |
| 1411 movl(dest, value); | 1412 movl(dest, value); |
| 1412 Label done; | 1413 Label done; |
| 1413 pushl(value); | 1414 pushl(value); |
| 1414 StoreIntoObjectFilter(object, value, &done); | 1415 StoreIntoObjectFilter(object, value, &done); |
| 1415 // A store buffer update is required. | 1416 // A store buffer update is required. |
| 1416 if (value != EAX) pushl(EAX); // Preserve EAX. | 1417 if (value != EAX) pushl(EAX); // Preserve EAX. |
| 1417 leal(EAX, dest); | 1418 leal(EAX, dest); |
| 1418 call(&StubCode::UpdateStoreBufferLabel()); | 1419 call(&StubCode::UpdateStoreBufferLabel()); |
| 1419 if (value != EAX) popl(EAX); // Restore EAX. | 1420 if (value != EAX) popl(EAX); // Restore EAX. |
| 1420 Bind(&done); | 1421 Bind(&done); |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1785 | 1786 |
| 1786 const char* Assembler::RegisterName(Register reg) { | 1787 const char* Assembler::RegisterName(Register reg) { |
| 1787 ASSERT((0 <= reg) && (reg < kNumberOfCpuRegisters)); | 1788 ASSERT((0 <= reg) && (reg < kNumberOfCpuRegisters)); |
| 1788 return cpu_reg_names[reg]; | 1789 return cpu_reg_names[reg]; |
| 1789 } | 1790 } |
| 1790 | 1791 |
| 1791 | 1792 |
| 1792 } // namespace dart | 1793 } // namespace dart |
| 1793 | 1794 |
| 1794 #endif // defined TARGET_ARCH_IA32 | 1795 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |