Index: src/arm/macro-assembler-arm.cc |
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc |
index a9acdd5ab4783ea51318e5f29589bf71f4833154..97d05a60225c33758d8153b5bf6b80c8186c1b95 100644 |
--- a/src/arm/macro-assembler-arm.cc |
+++ b/src/arm/macro-assembler-arm.cc |
@@ -967,11 +967,14 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space) { |
Push(lr, fp); |
mov(fp, Operand(sp)); // Set up new frame pointer. |
// Reserve room for saved entry sp and code object. |
- sub(sp, sp, Operand(2 * kPointerSize)); |
+ sub(sp, sp, Operand(ExitFrameConstants::kFrameSize)); |
if (emit_debug_code()) { |
mov(ip, Operand::Zero()); |
str(ip, MemOperand(fp, ExitFrameConstants::kSPOffset)); |
} |
+ if (FLAG_enable_ool_constant_pool) { |
+ str(pp, MemOperand(fp, ExitFrameConstants::kConstantPoolOffset)); |
+ } |
mov(ip, Operand(CodeObject())); |
str(ip, MemOperand(fp, ExitFrameConstants::kCodeOffset)); |
@@ -985,8 +988,10 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space) { |
if (save_doubles) { |
SaveFPRegs(sp, ip); |
// Note that d0 will be accessible at |
- // fp - 2 * kPointerSize - DwVfpRegister::kMaxNumRegisters * kDoubleSize, |
- // since the sp slot and code slot were pushed after the fp. |
+ // fp - ExitFrameConstants::kFrameSize - |
+ // DwVfpRegister::kMaxNumRegisters * kDoubleSize, |
+ // since the sp slot, code slot and constant pool slot (if |
+ // FLAG_enable_ool_constant_pool) were pushed after the fp. |
} |
// Reserve place for the return address and stack space and align the frame |
@@ -1042,7 +1047,7 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, |
// Optionally restore all double registers. |
if (save_doubles) { |
// Calculate the stack location of the saved doubles and restore them. |
- const int offset = 2 * kPointerSize; |
+ const int offset = ExitFrameConstants::kFrameSize; |
sub(r3, fp, |
Operand(offset + DwVfpRegister::kMaxNumRegisters * kDoubleSize)); |
RestoreFPRegs(r3, ip); |
@@ -1065,6 +1070,9 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, |
#endif |
// Tear down the exit frame, pop the arguments, and return. |
+ if (FLAG_enable_ool_constant_pool) { |
+ ldr(pp, MemOperand(fp, ExitFrameConstants::kConstantPoolOffset)); |
+ } |
mov(sp, Operand(fp)); |
ldm(ia_w, sp, fp.bit() | lr.bit()); |
if (argument_count.is_valid()) { |