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_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 2069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2080 } | 2080 } |
2081 } | 2081 } |
2082 } | 2082 } |
2083 | 2083 |
2084 | 2084 |
2085 // Destroys the value register. | 2085 // Destroys the value register. |
2086 void Assembler::StoreIntoObjectFilterNoSmi(Register object, | 2086 void Assembler::StoreIntoObjectFilterNoSmi(Register object, |
2087 Register value, | 2087 Register value, |
2088 Label* no_update) { | 2088 Label* no_update) { |
2089 COMPILE_ASSERT((kNewObjectAlignmentOffset == kWordSize) && | 2089 COMPILE_ASSERT((kNewObjectAlignmentOffset == kWordSize) && |
2090 (kOldObjectAlignmentOffset == 0), young_alignment); | 2090 (kOldObjectAlignmentOffset == 0)); |
2091 | 2091 |
2092 // Write-barrier triggers if the value is in the new space (has bit set) and | 2092 // Write-barrier triggers if the value is in the new space (has bit set) and |
2093 // the object is in the old space (has bit cleared). | 2093 // the object is in the old space (has bit cleared). |
2094 // To check that we could compute value & ~object and skip the write barrier | 2094 // To check that we could compute value & ~object and skip the write barrier |
2095 // if the bit is not set. However we can't destroy the object. | 2095 // if the bit is not set. However we can't destroy the object. |
2096 // However to preserve the object we compute negated expression | 2096 // However to preserve the object we compute negated expression |
2097 // ~value | object instead and skip the write barrier if the bit is set. | 2097 // ~value | object instead and skip the write barrier if the bit is set. |
2098 notl(value); | 2098 notl(value); |
2099 orl(value, object); | 2099 orl(value, object); |
2100 testl(value, Immediate(kNewObjectAlignmentOffset)); | 2100 testl(value, Immediate(kNewObjectAlignmentOffset)); |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2674 | 2674 |
2675 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 2675 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
2676 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); | 2676 ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters)); |
2677 return xmm_reg_names[reg]; | 2677 return xmm_reg_names[reg]; |
2678 } | 2678 } |
2679 | 2679 |
2680 | 2680 |
2681 } // namespace dart | 2681 } // namespace dart |
2682 | 2682 |
2683 #endif // defined TARGET_ARCH_IA32 | 2683 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |