Fix MacroAssembler::Prologue for Arm when FLAG_out_off_line_constant_pool is enabled.

The prologue update in r21329 changed the scoping of the PredictableCodeSizeScope.

R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/284303003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21345 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
rmcilroy@chromium.org 2014-05-16 14:49:11 +00:00
parent 417610e24a
commit 5cfca21295

View File

@ -915,21 +915,22 @@ void MacroAssembler::StubPrologue() {
void MacroAssembler::Prologue(bool code_pre_aging) {
PredictableCodeSizeScope predictible_code_size_scope(
this, kNoCodeAgeSequenceLength);
// The following three instructions must remain together and unmodified
// for code aging to work properly.
if (code_pre_aging) {
// Pre-age the code.
Code* stub = Code::GetPreAgedCodeAgeStub(isolate());
add(r0, pc, Operand(-8));
ldr(pc, MemOperand(pc, -4));
emit_code_stub_address(stub);
} else {
PushFixedFrame(r1);
nop(ip.code());
// Adjust FP to point to saved FP.
add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
{ PredictableCodeSizeScope predictible_code_size_scope(
this, kNoCodeAgeSequenceLength);
// The following three instructions must remain together and unmodified
// for code aging to work properly.
if (code_pre_aging) {
// Pre-age the code.
Code* stub = Code::GetPreAgedCodeAgeStub(isolate());
add(r0, pc, Operand(-8));
ldr(pc, MemOperand(pc, -4));
emit_code_stub_address(stub);
} else {
PushFixedFrame(r1);
nop(ip.code());
// Adjust FP to point to saved FP.
add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp));
}
}
if (FLAG_enable_ool_constant_pool) {
LoadConstantPoolPointerRegister();