From dcf84d88b723d477a37572b6bcf650bda7b8f6c9 Mon Sep 17 00:00:00 2001 From: "ulan@chromium.org" Date: Fri, 12 Sep 2014 15:09:51 +0000 Subject: [PATCH] [turbofan] Use correct register_save_area_size with OOL constant pool. Follow-up to r23843. BUG= R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/565693002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23921 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/compiler/arm/code-generator-arm.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/compiler/arm/code-generator-arm.cc b/src/compiler/arm/code-generator-arm.cc index 656abb4..4035682 100644 --- a/src/compiler/arm/code-generator-arm.cc +++ b/src/compiler/arm/code-generator-arm.cc @@ -619,17 +619,21 @@ void CodeGenerator::AssembleDeoptimizerCall(int deoptimization_id) { void CodeGenerator::AssemblePrologue() { CallDescriptor* descriptor = linkage()->GetIncomingDescriptor(); if (descriptor->kind() == CallDescriptor::kCallAddress) { + bool saved_pp; if (FLAG_enable_ool_constant_pool) { __ Push(lr, fp, pp); // Adjust FP to point to saved FP. __ sub(fp, sp, Operand(StandardFrameConstants::kConstantPoolOffset)); + saved_pp = true; } else { __ Push(lr, fp); __ mov(fp, sp); + saved_pp = false; } const RegList saves = descriptor->CalleeSavedRegisters(); - if (saves != 0) { // Save callee-saved registers. - int register_save_area_size = 0; + if (saves != 0 || saved_pp) { + // Save callee-saved registers. + int register_save_area_size = saved_pp ? kPointerSize : 0; for (int i = Register::kNumRegisters - 1; i >= 0; i--) { if (!((1 << i) & saves)) continue; register_save_area_size += kPointerSize; -- 2.7.4