| Index: src/ia32/builtins-ia32.cc
|
| diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc
|
| index 41bf9be4f4055cf60324a7aef8239b06b7628fc9..97ba685a9312d05237a9b506e5d90d43f672da39 100644
|
| --- a/src/ia32/builtins-ia32.cc
|
| +++ b/src/ia32/builtins-ia32.cc
|
| @@ -1569,6 +1569,8 @@ void Builtins::Generate_ArrayCode(MacroAssembler* masm) {
|
| void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
|
| // ----------- S t a t e -------------
|
| // -- eax : number of arguments
|
| + // -- edi : function
|
| + // -- esi : context
|
| // -- esp[0] : return address
|
| // -- esp[(argc - n) * 8] : arg[n] (zero-based)
|
| // -- esp[(argc + 1) * 8] : receiver
|
| @@ -1604,7 +1606,11 @@ void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
|
| Heap::kHeapNumberMapRootIndex, &convert_number);
|
| {
|
| // Parameter is not a Number, use the ToNumber builtin to convert it.
|
| - FrameScope scope(masm, StackFrame::INTERNAL);
|
| + FrameScope scope(masm, StackFrame::MANUAL);
|
| + __ Push(ebp);
|
| + __ Move(ebp, esp);
|
| + __ Push(esi);
|
| + __ Push(edi);
|
| __ SmiTag(eax);
|
| __ SmiTag(ecx);
|
| __ Push(eax);
|
| @@ -1616,6 +1622,8 @@ void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
|
| __ Pop(edx);
|
| __ Pop(ecx);
|
| __ Pop(eax);
|
| + __ Pop(edi);
|
| + __ Pop(esi);
|
| {
|
| // Restore the double accumulator value (xmm0).
|
| Label restore_smi, done_restore;
|
| @@ -1630,6 +1638,7 @@ void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
|
| }
|
| __ SmiUntag(ecx);
|
| __ SmiUntag(eax);
|
| + __ leave();
|
| }
|
| __ jmp(&convert);
|
| __ bind(&convert_number);
|
|
|