Index: src/ppc/macro-assembler-ppc.cc |
diff --git a/src/ppc/macro-assembler-ppc.cc b/src/ppc/macro-assembler-ppc.cc |
index 45c35961fd262eb77c19efa7899f97153464f4d5..888987b02e9760262c550e1500f51b99393f02f9 100644 |
--- a/src/ppc/macro-assembler-ppc.cc |
+++ b/src/ppc/macro-assembler-ppc.cc |
@@ -1072,6 +1072,49 @@ int MacroAssembler::LeaveFrame(StackFrame::Type type, int stack_adjustment) { |
return frame_ends; |
} |
+void MacroAssembler::EnterBuiltinFrame(Register context, Register target, |
+ Register argc) { |
+ int fp_delta = 0; |
+ mflr(r0); |
+ if (FLAG_enable_embedded_constant_pool) { |
+ if (target.is_valid()) { |
+ Push(r0, fp, kConstantPoolRegister, context, target); |
+ fp_delta = 3; |
+ } else { |
+ Push(r0, fp, kConstantPoolRegister, context); |
+ fp_delta = 2; |
+ } |
+ } else { |
+ if (target.is_valid()) { |
+ Push(r0, fp, context, target); |
+ fp_delta = 2; |
+ } else { |
+ Push(r0, fp, context); |
+ fp_delta = 1; |
+ } |
+ } |
+ addi(fp, sp, Operand(fp_delta * kPointerSize)); |
+ Push(argc); |
+} |
+ |
+void MacroAssembler::LeaveBuiltinFrame(Register context, Register target, |
+ Register argc) { |
+ Pop(argc); |
+ if (FLAG_enable_embedded_constant_pool) { |
+ if (target.is_valid()) { |
+ Pop(r0, fp, kConstantPoolRegister, context, target); |
+ } else { |
+ Pop(r0, fp, kConstantPoolRegister, context); |
+ } |
+ } else { |
+ if (target.is_valid()) { |
+ Pop(r0, fp, context, target); |
+ } else { |
+ Pop(r0, fp, context); |
+ } |
+ } |
+ mtlr(r0); |
+} |
// ExitFrame layout (probably wrongish.. needs updating) |
// |