| Index: src/x87/code-stubs-x87.cc
|
| diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc
|
| index e1ad6a7f5af1eec076b2f28014ee553bcee55f0e..f13ad262f9d03d282e076ad1402b95cc3f76f26f 100644
|
| --- a/src/x87/code-stubs-x87.cc
|
| +++ b/src/x87/code-stubs-x87.cc
|
| @@ -1150,21 +1150,26 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
|
| }
|
| __ bind(&runtime_call);
|
|
|
| - // Push arguments below the return address.
|
| - __ pop(ecx);
|
| - __ push(edx);
|
| - __ push(eax);
|
| -
|
| - // Figure out which native to call and setup the arguments.
|
| if (cc == equal) {
|
| - __ push(ecx);
|
| - __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals);
|
| + {
|
| + FrameScope scope(masm, StackFrame::INTERNAL);
|
| + __ Push(edx);
|
| + __ Push(eax);
|
| + __ CallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals);
|
| + }
|
| + // Turn true into 0 and false into some non-zero value.
|
| + STATIC_ASSERT(EQUAL == 0);
|
| + __ sub(eax, Immediate(isolate()->factory()->true_value()));
|
| + __ Ret();
|
| } else {
|
| + // Push arguments below the return address.
|
| + __ pop(ecx);
|
| + __ push(edx);
|
| + __ push(eax);
|
| __ push(Immediate(Smi::FromInt(NegativeComparisonResult(cc))));
|
|
|
| // Restore return address on the stack.
|
| __ push(ecx);
|
| -
|
| // Call the native; it returns -1 (less), 0 (equal), or 1 (greater)
|
| // tagged as a small integer.
|
| __ TailCallRuntime(Runtime::kCompare);
|
|
|