OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 7308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7319 regs_.RestoreCallerSaveRegisters(masm, save_fp_regs_mode_); | 7319 regs_.RestoreCallerSaveRegisters(masm, save_fp_regs_mode_); |
7320 } | 7320 } |
7321 | 7321 |
7322 | 7322 |
7323 void RecordWriteStub::CheckNeedsToInformIncrementalMarker( | 7323 void RecordWriteStub::CheckNeedsToInformIncrementalMarker( |
7324 MacroAssembler* masm, | 7324 MacroAssembler* masm, |
7325 OnNoNeedToInformIncrementalMarker on_no_need, | 7325 OnNoNeedToInformIncrementalMarker on_no_need, |
7326 Mode mode) { | 7326 Mode mode) { |
7327 Label object_is_black, need_incremental, need_incremental_pop_object; | 7327 Label object_is_black, need_incremental, need_incremental_pop_object; |
7328 | 7328 |
| 7329 __ mov(regs_.scratch0(), Immediate(~Page::kPageAlignmentMask)); |
| 7330 __ and_(regs_.scratch0(), regs_.object()); |
| 7331 __ mov(regs_.scratch1(), |
| 7332 Operand(regs_.scratch0(), |
| 7333 MemoryChunk::kWriteBarrierCounterOffset)); |
| 7334 __ sub(regs_.scratch1(), Immediate(1)); |
| 7335 __ mov(Operand(regs_.scratch0(), |
| 7336 MemoryChunk::kWriteBarrierCounterOffset), |
| 7337 regs_.scratch1()); |
| 7338 __ j(negative, &need_incremental); |
| 7339 |
7329 // Let's look at the color of the object: If it is not black we don't have | 7340 // Let's look at the color of the object: If it is not black we don't have |
7330 // to inform the incremental marker. | 7341 // to inform the incremental marker. |
7331 __ JumpIfBlack(regs_.object(), | 7342 __ JumpIfBlack(regs_.object(), |
7332 regs_.scratch0(), | 7343 regs_.scratch0(), |
7333 regs_.scratch1(), | 7344 regs_.scratch1(), |
7334 &object_is_black, | 7345 &object_is_black, |
7335 Label::kNear); | 7346 Label::kNear); |
7336 | 7347 |
7337 regs_.Restore(masm); | 7348 regs_.Restore(masm); |
7338 if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) { | 7349 if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) { |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7512 // Restore ecx. | 7523 // Restore ecx. |
7513 __ pop(ecx); | 7524 __ pop(ecx); |
7514 __ ret(0); | 7525 __ ret(0); |
7515 } | 7526 } |
7516 | 7527 |
7517 #undef __ | 7528 #undef __ |
7518 | 7529 |
7519 } } // namespace v8::internal | 7530 } } // namespace v8::internal |
7520 | 7531 |
7521 #endif // V8_TARGET_ARCH_IA32 | 7532 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |