| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 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/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 3355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3366 } | 3366 } |
| 3367 | 3367 |
| 3368 | 3368 |
| 3369 void RecordWriteStub::CheckNeedsToInformIncrementalMarker( | 3369 void RecordWriteStub::CheckNeedsToInformIncrementalMarker( |
| 3370 MacroAssembler* masm, OnNoNeedToInformIncrementalMarker on_no_need, | 3370 MacroAssembler* masm, OnNoNeedToInformIncrementalMarker on_no_need, |
| 3371 Mode mode) { | 3371 Mode mode) { |
| 3372 Label on_black; | 3372 Label on_black; |
| 3373 Label need_incremental; | 3373 Label need_incremental; |
| 3374 Label need_incremental_pop_scratch; | 3374 Label need_incremental_pop_scratch; |
| 3375 | 3375 |
| 3376 DCHECK((~Page::kPageAlignmentMask & 0xffff) == 0); | |
| 3377 __ lis(r0, Operand((~Page::kPageAlignmentMask >> 16))); | |
| 3378 __ and_(regs_.scratch0(), regs_.object(), r0); | |
| 3379 __ LoadP( | |
| 3380 regs_.scratch1(), | |
| 3381 MemOperand(regs_.scratch0(), MemoryChunk::kWriteBarrierCounterOffset)); | |
| 3382 __ subi(regs_.scratch1(), regs_.scratch1(), Operand(1)); | |
| 3383 __ StoreP( | |
| 3384 regs_.scratch1(), | |
| 3385 MemOperand(regs_.scratch0(), MemoryChunk::kWriteBarrierCounterOffset)); | |
| 3386 __ cmpi(regs_.scratch1(), Operand::Zero()); // PPC, we could do better here | |
| 3387 __ blt(&need_incremental); | |
| 3388 | |
| 3389 // Let's look at the color of the object: If it is not black we don't have | 3376 // Let's look at the color of the object: If it is not black we don't have |
| 3390 // to inform the incremental marker. | 3377 // to inform the incremental marker. |
| 3391 __ JumpIfBlack(regs_.object(), regs_.scratch0(), regs_.scratch1(), &on_black); | 3378 __ JumpIfBlack(regs_.object(), regs_.scratch0(), regs_.scratch1(), &on_black); |
| 3392 | 3379 |
| 3393 regs_.Restore(masm); | 3380 regs_.Restore(masm); |
| 3394 if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) { | 3381 if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) { |
| 3395 __ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(), | 3382 __ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(), |
| 3396 MacroAssembler::kReturnAtEnd); | 3383 MacroAssembler::kReturnAtEnd); |
| 3397 } else { | 3384 } else { |
| 3398 __ Ret(); | 3385 __ Ret(); |
| (...skipping 2039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5438 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); | 5425 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); |
| 5439 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5426 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
| 5440 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5427 kStackUnwindSpace, NULL, return_value_operand, NULL); |
| 5441 } | 5428 } |
| 5442 | 5429 |
| 5443 #undef __ | 5430 #undef __ |
| 5444 } // namespace internal | 5431 } // namespace internal |
| 5445 } // namespace v8 | 5432 } // namespace v8 |
| 5446 | 5433 |
| 5447 #endif // V8_TARGET_ARCH_PPC | 5434 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |