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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 3307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3318 regs_.RestoreCallerSaveRegisters(masm, save_fp_regs_mode()); | 3318 regs_.RestoreCallerSaveRegisters(masm, save_fp_regs_mode()); |
3319 } | 3319 } |
3320 | 3320 |
3321 void RecordWriteStub::CheckNeedsToInformIncrementalMarker( | 3321 void RecordWriteStub::CheckNeedsToInformIncrementalMarker( |
3322 MacroAssembler* masm, OnNoNeedToInformIncrementalMarker on_no_need, | 3322 MacroAssembler* masm, OnNoNeedToInformIncrementalMarker on_no_need, |
3323 Mode mode) { | 3323 Mode mode) { |
3324 Label on_black; | 3324 Label on_black; |
3325 Label need_incremental; | 3325 Label need_incremental; |
3326 Label need_incremental_pop_scratch; | 3326 Label need_incremental_pop_scratch; |
3327 | 3327 |
3328 DCHECK((~Page::kPageAlignmentMask & 0xffff) == 0); | |
3329 __ AndP(regs_.scratch0(), regs_.object(), Operand(~Page::kPageAlignmentMask)); | |
3330 __ LoadP( | |
3331 regs_.scratch1(), | |
3332 MemOperand(regs_.scratch0(), MemoryChunk::kWriteBarrierCounterOffset)); | |
3333 __ SubP(regs_.scratch1(), regs_.scratch1(), Operand(1)); | |
3334 __ StoreP( | |
3335 regs_.scratch1(), | |
3336 MemOperand(regs_.scratch0(), MemoryChunk::kWriteBarrierCounterOffset)); | |
3337 __ CmpP(regs_.scratch1(), Operand::Zero()); // S390, we could do better here | |
3338 __ blt(&need_incremental); | |
3339 | |
3340 // Let's look at the color of the object: If it is not black we don't have | 3328 // Let's look at the color of the object: If it is not black we don't have |
3341 // to inform the incremental marker. | 3329 // to inform the incremental marker. |
3342 __ JumpIfBlack(regs_.object(), regs_.scratch0(), regs_.scratch1(), &on_black); | 3330 __ JumpIfBlack(regs_.object(), regs_.scratch0(), regs_.scratch1(), &on_black); |
3343 | 3331 |
3344 regs_.Restore(masm); | 3332 regs_.Restore(masm); |
3345 if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) { | 3333 if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) { |
3346 __ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(), | 3334 __ RememberedSetHelper(object(), address(), value(), save_fp_regs_mode(), |
3347 MacroAssembler::kReturnAtEnd); | 3335 MacroAssembler::kReturnAtEnd); |
3348 } else { | 3336 } else { |
3349 __ Ret(); | 3337 __ Ret(); |
(...skipping 2005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5355 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 5343 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
5356 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5344 kStackUnwindSpace, NULL, return_value_operand, NULL); |
5357 } | 5345 } |
5358 | 5346 |
5359 #undef __ | 5347 #undef __ |
5360 | 5348 |
5361 } // namespace internal | 5349 } // namespace internal |
5362 } // namespace v8 | 5350 } // namespace v8 |
5363 | 5351 |
5364 #endif // V8_TARGET_ARCH_S390 | 5352 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |