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

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

Issue 24596002: ARM: Let the register allocator handle the context register. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed first round of comments. Created 7 years, 2 months 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
OLDNEW
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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 // Will clobber 4 registers: object, address, scratch, ip. The 471 // Will clobber 4 registers: object, address, scratch, ip. The
472 // register 'object' contains a heap object pointer. The heap object 472 // register 'object' contains a heap object pointer. The heap object
473 // tag is shifted away. 473 // tag is shifted away.
474 void MacroAssembler::RecordWrite(Register object, 474 void MacroAssembler::RecordWrite(Register object,
475 Register address, 475 Register address,
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
482 // context register, so we check that none of the clobbered
483 // registers are cp.
484 ASSERT(!address.is(cp) && !value.is(cp));
485
486 if (emit_debug_code()) { 481 if (emit_debug_code()) {
487 ldr(ip, MemOperand(address)); 482 ldr(ip, MemOperand(address));
488 cmp(ip, value); 483 cmp(ip, value);
489 Check(eq, kWrongAddressOrValuePassedToRecordWrite); 484 Check(eq, kWrongAddressOrValuePassedToRecordWrite);
490 } 485 }
491 486
492 Label done; 487 Label done;
493 488
494 if (smi_check == INLINE_SMI_CHECK) { 489 if (smi_check == INLINE_SMI_CHECK) {
495 JumpIfSmi(value, &done); 490 JumpIfSmi(value, &done);
(...skipping 3488 matching lines...) Expand 10 before | Expand all | Expand 10 after
3984 void CodePatcher::EmitCondition(Condition cond) { 3979 void CodePatcher::EmitCondition(Condition cond) {
3985 Instr instr = Assembler::instr_at(masm_.pc_); 3980 Instr instr = Assembler::instr_at(masm_.pc_);
3986 instr = (instr & ~kCondMask) | cond; 3981 instr = (instr & ~kCondMask) | cond;
3987 masm_.emit(instr); 3982 masm_.emit(instr);
3988 } 3983 }
3989 3984
3990 3985
3991 } } // namespace v8::internal 3986 } } // namespace v8::internal
3992 3987
3993 #endif // V8_TARGET_ARCH_ARM 3988 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« src/arm/lithium-codegen-arm.cc ('K') | « src/arm/lithium-codegen-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698