Index: src/ppc/builtins-ppc.cc |
diff --git a/src/ppc/builtins-ppc.cc b/src/ppc/builtins-ppc.cc |
index 9787bb76c45af416da5b62777ff4286a8c34efee..b1b012526d28ef09be79f9b27755587b5f489c55 100644 |
--- a/src/ppc/builtins-ppc.cc |
+++ b/src/ppc/builtins-ppc.cc |
@@ -36,14 +36,16 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id, |
// ordinary functions). |
__ LoadP(cp, FieldMemOperand(r4, JSFunction::kContextOffset)); |
- // Insert extra arguments. |
- const int num_extra_args = 2; |
- __ Push(r4, r6); |
- |
// JumpToExternalReference expects r3 to contain the number of arguments |
// including the receiver and the extra arguments. |
+ const int num_extra_args = 3; |
__ addi(r3, r3, Operand(num_extra_args + 1)); |
+ // Insert extra arguments. |
+ __ SmiTag(r3); |
+ __ Push(r3, r4, r6); |
+ __ SmiUntag(r3); |
+ |
__ JumpToExternalReference(ExternalReference(id, masm->isolate()), |
exit_frame_type == BUILTIN_EXIT); |
} |