Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/arm/macro-assembler-arm.cc

Issue 8511052: ARM: Check that address given to __ RecordWrite is correct. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 Register value, 476 Register value,
477 LinkRegisterStatus lr_status, 477 LinkRegisterStatus lr_status,
478 SaveFPRegsMode fp_mode, 478 SaveFPRegsMode fp_mode,
479 RememberedSetAction remembered_set_action, 479 RememberedSetAction remembered_set_action,
480 SmiCheck smi_check) { 480 SmiCheck smi_check) {
481 // The compiled code assumes that record write doesn't change the 481 // The compiled code assumes that record write doesn't change the
482 // context register, so we check that none of the clobbered 482 // context register, so we check that none of the clobbered
483 // registers are cp. 483 // registers are cp.
484 ASSERT(!address.is(cp) && !value.is(cp)); 484 ASSERT(!address.is(cp) && !value.is(cp));
485 485
486 if (FLAG_debug_code) {
Kevin Millikin (Chromium) 2011/11/11 11:28:37 We don't use FLAG_debug_code in the macro assemble
487 Label ok;
488 ldr(ip, MemOperand(address));
489 cmp(ip, value);
490 b(eq, &ok);
Kevin Millikin (Chromium) 2011/11/11 11:32:23 Also, while I think of it, is there a reason not t
491 stop("Wrong address or value passed to RecordWrite");
492 bind(&ok);
493 }
494
486 Label done; 495 Label done;
487 496
488 if (smi_check == INLINE_SMI_CHECK) { 497 if (smi_check == INLINE_SMI_CHECK) {
489 ASSERT_EQ(0, kSmiTag); 498 ASSERT_EQ(0, kSmiTag);
490 tst(value, Operand(kSmiTagMask)); 499 tst(value, Operand(kSmiTagMask));
491 b(eq, &done); 500 b(eq, &done);
492 } 501 }
493 502
494 CheckPageFlag(value, 503 CheckPageFlag(value,
495 value, // Used as scratch. 504 value, // Used as scratch.
(...skipping 3097 matching lines...) Expand 10 before | Expand all | Expand 10 after
3593 void CodePatcher::EmitCondition(Condition cond) { 3602 void CodePatcher::EmitCondition(Condition cond) {
3594 Instr instr = Assembler::instr_at(masm_.pc_); 3603 Instr instr = Assembler::instr_at(masm_.pc_);
3595 instr = (instr & ~kCondMask) | cond; 3604 instr = (instr & ~kCondMask) | cond;
3596 masm_.emit(instr); 3605 masm_.emit(instr);
3597 } 3606 }
3598 3607
3599 3608
3600 } } // namespace v8::internal 3609 } } // namespace v8::internal
3601 3610
3602 #endif // V8_TARGET_ARCH_ARM 3611 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698