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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 Register value, | 489 Register value, |
490 LinkRegisterStatus lr_status, | 490 LinkRegisterStatus lr_status, |
491 SaveFPRegsMode fp_mode, | 491 SaveFPRegsMode fp_mode, |
492 RememberedSetAction remembered_set_action, | 492 RememberedSetAction remembered_set_action, |
493 SmiCheck smi_check) { | 493 SmiCheck smi_check) { |
494 // The compiled code assumes that record write doesn't change the | 494 // The compiled code assumes that record write doesn't change the |
495 // context register, so we check that none of the clobbered | 495 // context register, so we check that none of the clobbered |
496 // registers are cp. | 496 // registers are cp. |
497 ASSERT(!address.is(cp) && !value.is(cp)); | 497 ASSERT(!address.is(cp) && !value.is(cp)); |
498 | 498 |
499 if (FLAG_debug_code) { | 499 if (emit_debug_code()) { |
500 Label ok; | |
501 ldr(ip, MemOperand(address)); | 500 ldr(ip, MemOperand(address)); |
502 cmp(ip, value); | 501 cmp(ip, value); |
503 b(eq, &ok); | 502 Check(eq, "Wrong address or value passed to RecordWrite"); |
504 stop("Wrong address or value passed to RecordWrite"); | |
505 bind(&ok); | |
506 } | 503 } |
507 | 504 |
508 Label done; | 505 Label done; |
509 | 506 |
510 if (smi_check == INLINE_SMI_CHECK) { | 507 if (smi_check == INLINE_SMI_CHECK) { |
511 ASSERT_EQ(0, kSmiTag); | 508 ASSERT_EQ(0, kSmiTag); |
512 tst(value, Operand(kSmiTagMask)); | 509 tst(value, Operand(kSmiTagMask)); |
513 b(eq, &done); | 510 b(eq, &done); |
514 } | 511 } |
515 | 512 |
(...skipping 28 matching lines...) Expand all Loading... |
544 } | 541 } |
545 } | 542 } |
546 | 543 |
547 | 544 |
548 void MacroAssembler::RememberedSetHelper(Register object, // For debug tests. | 545 void MacroAssembler::RememberedSetHelper(Register object, // For debug tests. |
549 Register address, | 546 Register address, |
550 Register scratch, | 547 Register scratch, |
551 SaveFPRegsMode fp_mode, | 548 SaveFPRegsMode fp_mode, |
552 RememberedSetFinalAction and_then) { | 549 RememberedSetFinalAction and_then) { |
553 Label done; | 550 Label done; |
554 if (FLAG_debug_code) { | 551 if (emit_debug_code()) { |
555 Label ok; | 552 Label ok; |
556 JumpIfNotInNewSpace(object, scratch, &ok); | 553 JumpIfNotInNewSpace(object, scratch, &ok); |
557 stop("Remembered set pointer is in new space"); | 554 stop("Remembered set pointer is in new space"); |
558 bind(&ok); | 555 bind(&ok); |
559 } | 556 } |
560 // Load store buffer top. | 557 // Load store buffer top. |
561 ExternalReference store_buffer = | 558 ExternalReference store_buffer = |
562 ExternalReference::store_buffer_top(isolate()); | 559 ExternalReference::store_buffer_top(isolate()); |
563 mov(ip, Operand(store_buffer)); | 560 mov(ip, Operand(store_buffer)); |
564 ldr(scratch, MemOperand(ip)); | 561 ldr(scratch, MemOperand(ip)); |
(...skipping 2932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3497 ASSERT(strcmp(Marking::kImpossibleBitPattern, "01") == 0); | 3494 ASSERT(strcmp(Marking::kImpossibleBitPattern, "01") == 0); |
3498 | 3495 |
3499 Label done; | 3496 Label done; |
3500 | 3497 |
3501 // Since both black and grey have a 1 in the first position and white does | 3498 // Since both black and grey have a 1 in the first position and white does |
3502 // not have a 1 there we only need to check one bit. | 3499 // not have a 1 there we only need to check one bit. |
3503 ldr(load_scratch, MemOperand(bitmap_scratch, MemoryChunk::kHeaderSize)); | 3500 ldr(load_scratch, MemOperand(bitmap_scratch, MemoryChunk::kHeaderSize)); |
3504 tst(mask_scratch, load_scratch); | 3501 tst(mask_scratch, load_scratch); |
3505 b(ne, &done); | 3502 b(ne, &done); |
3506 | 3503 |
3507 if (FLAG_debug_code) { | 3504 if (emit_debug_code()) { |
3508 // Check for impossible bit pattern. | 3505 // Check for impossible bit pattern. |
3509 Label ok; | 3506 Label ok; |
3510 // LSL may overflow, making the check conservative. | 3507 // LSL may overflow, making the check conservative. |
3511 tst(load_scratch, Operand(mask_scratch, LSL, 1)); | 3508 tst(load_scratch, Operand(mask_scratch, LSL, 1)); |
3512 b(eq, &ok); | 3509 b(eq, &ok); |
3513 stop("Impossible marking bit pattern"); | 3510 stop("Impossible marking bit pattern"); |
3514 bind(&ok); | 3511 bind(&ok); |
3515 } | 3512 } |
3516 | 3513 |
3517 // Value is white. We check whether it is data that doesn't need scanning. | 3514 // Value is white. We check whether it is data that doesn't need scanning. |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3669 void CodePatcher::EmitCondition(Condition cond) { | 3666 void CodePatcher::EmitCondition(Condition cond) { |
3670 Instr instr = Assembler::instr_at(masm_.pc_); | 3667 Instr instr = Assembler::instr_at(masm_.pc_); |
3671 instr = (instr & ~kCondMask) | cond; | 3668 instr = (instr & ~kCondMask) | cond; |
3672 masm_.emit(instr); | 3669 masm_.emit(instr); |
3673 } | 3670 } |
3674 | 3671 |
3675 | 3672 |
3676 } } // namespace v8::internal | 3673 } } // namespace v8::internal |
3677 | 3674 |
3678 #endif // V8_TARGET_ARCH_ARM | 3675 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |