Index: src/arm/builtins-arm.cc |
diff --git a/src/arm/builtins-arm.cc b/src/arm/builtins-arm.cc |
index ae50d7965bd663d8e53792515d231e873d025032..19fa9f27bc114675ba34cf0655efff7b0f69a69c 100644 |
--- a/src/arm/builtins-arm.cc |
+++ b/src/arm/builtins-arm.cc |
@@ -844,7 +844,7 @@ void Builtins::Generate_MarkCodeAsExecutedOnce(MacroAssembler* masm) { |
// Perform prologue operations usually performed by the young code stub. |
__ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); |
- __ add(fp, sp, Operand(2 * kPointerSize)); |
+ __ add(fp, sp, Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
// Jump to point after the code-age stub. |
__ add(r0, r0, Operand(kNoCodeAgeSequenceLength * Assembler::kInstrSize)); |
@@ -1177,11 +1177,13 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) { |
void Builtins::Generate_FunctionApply(MacroAssembler* masm) { |
- const int kIndexOffset = -5 * kPointerSize; |
- const int kLimitOffset = -4 * kPointerSize; |
- const int kArgsOffset = 2 * kPointerSize; |
- const int kRecvOffset = 3 * kPointerSize; |
- const int kFunctionOffset = 4 * kPointerSize; |
+ const int kIndexOffset = |
+ StandardFrameConstants::kExpressionsOffset - (2 * kPointerSize); |
+ const int kLimitOffset = |
+ StandardFrameConstants::kExpressionsOffset - (1 * kPointerSize); |
+ const int kArgsOffset = 2 * kPointerSize; |
+ const int kRecvOffset = 3 * kPointerSize; |
+ const int kFunctionOffset = 4 * kPointerSize; |
{ |
FrameScope frame_scope(masm, StackFrame::INTERNAL); |
@@ -1341,7 +1343,8 @@ static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { |
__ SmiTag(r0); |
__ mov(r4, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR))); |
__ stm(db_w, sp, r0.bit() | r1.bit() | r4.bit() | fp.bit() | lr.bit()); |
- __ add(fp, sp, Operand(3 * kPointerSize)); |
+ __ add(fp, sp, |
+ Operand(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize)); |
} |
@@ -1351,7 +1354,8 @@ static void LeaveArgumentsAdaptorFrame(MacroAssembler* masm) { |
// ----------------------------------- |
// Get the number of arguments passed (as a smi), tear down the frame and |
// then tear down the parameters. |
- __ ldr(r1, MemOperand(fp, -3 * kPointerSize)); |
+ __ ldr(r1, MemOperand(fp, -(StandardFrameConstants::kFixedFrameSizeFromFp + |
+ kPointerSize))); |
__ mov(sp, fp); |
__ ldm(ia_w, sp, fp.bit() | lr.bit()); |
__ add(sp, sp, Operand::PointerOffsetFromSmiKey(r1)); |
@@ -1438,7 +1442,9 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) { |
// r3: code entry to call |
__ LoadRoot(ip, Heap::kUndefinedValueRootIndex); |
__ sub(r2, fp, Operand(r2, LSL, kPointerSizeLog2)); |
- __ sub(r2, r2, Operand(4 * kPointerSize)); // Adjust for frame. |
+ // Adjust for frame. |
+ __ sub(r2, r2, Operand(StandardFrameConstants::kFixedFrameSizeFromFp + |
+ 2 * kPointerSize)); |
Label fill; |
__ bind(&fill); |