Index: src/compiler/arm/code-generator-arm.cc |
diff --git a/src/compiler/arm/code-generator-arm.cc b/src/compiler/arm/code-generator-arm.cc |
index d6635903204f7e9f3309de39ef14867fe9d31aa5..b145fe27c5155096276c7bf347a13a238a452ef5 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; |