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 6258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6269 | 6269 |
6270 | 6270 |
6271 void RecordWriteStub::CheckNeedsToInformIncrementalMarker( | 6271 void RecordWriteStub::CheckNeedsToInformIncrementalMarker( |
6272 MacroAssembler* masm, | 6272 MacroAssembler* masm, |
6273 OnNoNeedToInformIncrementalMarker on_no_need, | 6273 OnNoNeedToInformIncrementalMarker on_no_need, |
6274 Mode mode) { | 6274 Mode mode) { |
6275 Label on_black; | 6275 Label on_black; |
6276 Label need_incremental; | 6276 Label need_incremental; |
6277 Label need_incremental_pop_object; | 6277 Label need_incremental_pop_object; |
6278 | 6278 |
| 6279 __ movq(regs_.scratch0(), Immediate(~Page::kPageAlignmentMask)); |
| 6280 __ and_(regs_.scratch0(), regs_.object()); |
| 6281 __ movq(regs_.scratch1(), |
| 6282 Operand(regs_.scratch0(), |
| 6283 MemoryChunk::kWriteBarrierCounterOffset)); |
| 6284 __ subq(regs_.scratch1(), Immediate(1)); |
| 6285 __ movq(Operand(regs_.scratch0(), |
| 6286 MemoryChunk::kWriteBarrierCounterOffset), |
| 6287 regs_.scratch1()); |
| 6288 __ j(negative, &need_incremental); |
| 6289 |
6279 // Let's look at the color of the object: If it is not black we don't have | 6290 // Let's look at the color of the object: If it is not black we don't have |
6280 // to inform the incremental marker. | 6291 // to inform the incremental marker. |
6281 __ JumpIfBlack(regs_.object(), | 6292 __ JumpIfBlack(regs_.object(), |
6282 regs_.scratch0(), | 6293 regs_.scratch0(), |
6283 regs_.scratch1(), | 6294 regs_.scratch1(), |
6284 &on_black, | 6295 &on_black, |
6285 Label::kNear); | 6296 Label::kNear); |
6286 | 6297 |
6287 regs_.Restore(masm); | 6298 regs_.Restore(masm); |
6288 if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) { | 6299 if (on_no_need == kUpdateRememberedSetOnNoNeedToInformIncrementalMarker) { |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6489 #endif | 6500 #endif |
6490 | 6501 |
6491 __ Ret(); | 6502 __ Ret(); |
6492 } | 6503 } |
6493 | 6504 |
6494 #undef __ | 6505 #undef __ |
6495 | 6506 |
6496 } } // namespace v8::internal | 6507 } } // namespace v8::internal |
6497 | 6508 |
6498 #endif // V8_TARGET_ARCH_X64 | 6509 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |