OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 | 516 |
517 // Clobber clobbered registers when running with the debug-code flag | 517 // Clobber clobbered registers when running with the debug-code flag |
518 // turned on to provoke errors. | 518 // turned on to provoke errors. |
519 if (emit_debug_code()) { | 519 if (emit_debug_code()) { |
520 mov(address, Operand(BitCast<int32_t>(kZapValue + 12))); | 520 mov(address, Operand(BitCast<int32_t>(kZapValue + 12))); |
521 mov(value, Operand(BitCast<int32_t>(kZapValue + 16))); | 521 mov(value, Operand(BitCast<int32_t>(kZapValue + 16))); |
522 } | 522 } |
523 } | 523 } |
524 | 524 |
525 | 525 |
526 void MacroAssembler::RememberedSetHelper(Register address, | 526 void MacroAssembler::RememberedSetHelper(Register object, // For debug tests. |
| 527 Register address, |
527 Register scratch, | 528 Register scratch, |
528 SaveFPRegsMode fp_mode, | 529 SaveFPRegsMode fp_mode, |
529 RememberedSetFinalAction and_then) { | 530 RememberedSetFinalAction and_then) { |
530 Label done; | 531 Label done; |
| 532 if (FLAG_debug_code) { |
| 533 Label ok; |
| 534 JumpIfNotInNewSpace(object, scratch, &ok); |
| 535 stop("Remembered set pointer is in new space"); |
| 536 bind(&ok); |
| 537 } |
531 // Load store buffer top. | 538 // Load store buffer top. |
532 ExternalReference store_buffer = | 539 ExternalReference store_buffer = |
533 ExternalReference::store_buffer_top(isolate()); | 540 ExternalReference::store_buffer_top(isolate()); |
534 mov(ip, Operand(store_buffer)); | 541 mov(ip, Operand(store_buffer)); |
535 ldr(scratch, MemOperand(ip)); | 542 ldr(scratch, MemOperand(ip)); |
536 // Store pointer to buffer and increment buffer top. | 543 // Store pointer to buffer and increment buffer top. |
537 str(address, MemOperand(scratch, kPointerSize, PostIndex)); | 544 str(address, MemOperand(scratch, kPointerSize, PostIndex)); |
538 // Write back new top of buffer. | 545 // Write back new top of buffer. |
539 str(scratch, MemOperand(ip)); | 546 str(scratch, MemOperand(ip)); |
540 // Call stub on end of buffer. | 547 // Call stub on end of buffer. |
(...skipping 3004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3545 void CodePatcher::EmitCondition(Condition cond) { | 3552 void CodePatcher::EmitCondition(Condition cond) { |
3546 Instr instr = Assembler::instr_at(masm_.pc_); | 3553 Instr instr = Assembler::instr_at(masm_.pc_); |
3547 instr = (instr & ~kCondMask) | cond; | 3554 instr = (instr & ~kCondMask) | cond; |
3548 masm_.emit(instr); | 3555 masm_.emit(instr); |
3549 } | 3556 } |
3550 | 3557 |
3551 | 3558 |
3552 } } // namespace v8::internal | 3559 } } // namespace v8::internal |
3553 | 3560 |
3554 #endif // V8_TARGET_ARCH_ARM | 3561 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |