| OLD | NEW |
| 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 2629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2640 movq(dst, imm); | 2640 movq(dst, imm); |
| 2641 } | 2641 } |
| 2642 } | 2642 } |
| 2643 | 2643 |
| 2644 | 2644 |
| 2645 // Destroys the value register. | 2645 // Destroys the value register. |
| 2646 void Assembler::StoreIntoObjectFilterNoSmi(Register object, | 2646 void Assembler::StoreIntoObjectFilterNoSmi(Register object, |
| 2647 Register value, | 2647 Register value, |
| 2648 Label* no_update) { | 2648 Label* no_update) { |
| 2649 COMPILE_ASSERT((kNewObjectAlignmentOffset == kWordSize) && | 2649 COMPILE_ASSERT((kNewObjectAlignmentOffset == kWordSize) && |
| 2650 (kOldObjectAlignmentOffset == 0), young_alignment); | 2650 (kOldObjectAlignmentOffset == 0)); |
| 2651 | 2651 |
| 2652 // Write-barrier triggers if the value is in the new space (has bit set) and | 2652 // Write-barrier triggers if the value is in the new space (has bit set) and |
| 2653 // the object is in the old space (has bit cleared). | 2653 // the object is in the old space (has bit cleared). |
| 2654 // To check that we could compute value & ~object and skip the write barrier | 2654 // To check that we could compute value & ~object and skip the write barrier |
| 2655 // if the bit is not set. However we can't destroy the object. | 2655 // if the bit is not set. However we can't destroy the object. |
| 2656 // However to preserve the object we compute negated expression | 2656 // However to preserve the object we compute negated expression |
| 2657 // ~value | object instead and skip the write barrier if the bit is set. | 2657 // ~value | object instead and skip the write barrier if the bit is set. |
| 2658 notl(value); | 2658 notl(value); |
| 2659 orl(value, object); | 2659 orl(value, object); |
| 2660 testl(value, Immediate(kNewObjectAlignmentOffset)); | 2660 testl(value, Immediate(kNewObjectAlignmentOffset)); |
| (...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3297 | 3297 |
| 3298 | 3298 |
| 3299 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3299 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
| 3300 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 3300 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
| 3301 return xmm_reg_names[reg]; | 3301 return xmm_reg_names[reg]; |
| 3302 } | 3302 } |
| 3303 | 3303 |
| 3304 } // namespace dart | 3304 } // namespace dart |
| 3305 | 3305 |
| 3306 #endif // defined TARGET_ARCH_X64 | 3306 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |