| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 3111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3122 | 3122 |
| 3123 | 3123 |
| 3124 void RecordWriteStub::CheckNeedsToInformIncrementalMarker( | 3124 void RecordWriteStub::CheckNeedsToInformIncrementalMarker( |
| 3125 MacroAssembler* masm, | 3125 MacroAssembler* masm, |
| 3126 OnNoNeedToInformIncrementalMarker on_no_need, | 3126 OnNoNeedToInformIncrementalMarker on_no_need, |
| 3127 Mode mode) { | 3127 Mode mode) { |
| 3128 Label on_black; | 3128 Label on_black; |
| 3129 Label need_incremental; | 3129 Label need_incremental; |
| 3130 Label need_incremental_pop_object; | 3130 Label need_incremental_pop_object; |
| 3131 | 3131 |
| 3132 __ movp(regs_.scratch0(), Immediate(~Page::kPageAlignmentMask)); | |
| 3133 __ andp(regs_.scratch0(), regs_.object()); | |
| 3134 __ movp(regs_.scratch1(), | |
| 3135 Operand(regs_.scratch0(), | |
| 3136 MemoryChunk::kWriteBarrierCounterOffset)); | |
| 3137 __ subp(regs_.scratch1(), Immediate(1)); | |
| 3138 __ movp(Operand(regs_.scratch0(), | |
| 3139 MemoryChunk::kWriteBarrierCounterOffset), | |
| 3140 regs_.scratch1()); | |
| 3141 __ j(negative, &need_incremental); | |
| 3142 | |
| 3143 // Let's look at the color of the object: If it is not black we don't have | 3132 // Let's look at the color of the object: If it is not black we don't have |
| 3144 // to inform the incremental marker. | 3133 // to inform the incremental marker. |
| 3145 __ JumpIfBlack(regs_.object(), | 3134 __ JumpIfBlack(regs_.object(), |
| 3146 regs_.scratch0(), | 3135 regs_.scratch0(), |
| 3147 regs_.scratch1(), | 3136 regs_.scratch1(), |
| 3148 &on_black, | 3137 &on_black, |
| 3149 Label::kNear); | 3138 Label::kNear); |
| 3150 | 3139 |
| 3151 regs_.Restore(masm); | 3140 regs_.Restore(masm); |
| 3152 if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) { | 3141 if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) { |
| (...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5161 kStackUnwindSpace, nullptr, return_value_operand, | 5150 kStackUnwindSpace, nullptr, return_value_operand, |
| 5162 NULL); | 5151 NULL); |
| 5163 } | 5152 } |
| 5164 | 5153 |
| 5165 #undef __ | 5154 #undef __ |
| 5166 | 5155 |
| 5167 } // namespace internal | 5156 } // namespace internal |
| 5168 } // namespace v8 | 5157 } // namespace v8 |
| 5169 | 5158 |
| 5170 #endif // V8_TARGET_ARCH_X64 | 5159 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |