Commit 4da2e3db authored by mbrandy's avatar mbrandy Committed by Commit bot

PPC: [runtime] Unify comparison operator runtime entries.

Port 55b4df73

Original commit message:
    Only use one set of %StrictEquals/%StrictNotEquals and
    %Equals/%NotEquals runtime entries for both the interpreter
    and the old-style CompareICStub. The long-term plan is to
    update the CompareICStub to also return boolean values, and
    even allow some more code sharing with the interpreter there.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1737853002

Cr-Commit-Position: refs/heads/master@{#34306}
parent 66b87c00
......@@ -698,11 +698,19 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
__ bind(&slow);
__ Push(lhs, rhs);
// Figure out which native to call and setup the arguments.
if (cc == eq) {
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals);
{
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
__ Push(lhs, rhs);
__ CallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals);
}
// Turn true into 0 and false into some non-zero value.
STATIC_ASSERT(EQUAL == 0);
__ LoadRoot(r4, Heap::kTrueValueRootIndex);
__ sub(r3, r3, r4);
__ Ret();
} else {
__ Push(lhs, rhs);
int ncr; // NaN compare result
if (cc == lt || cc == le) {
ncr = GREATER;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment