Index: src/ppc/code-stubs-ppc.cc |
diff --git a/src/ppc/code-stubs-ppc.cc b/src/ppc/code-stubs-ppc.cc |
index 434c064521ce489ed91cf0271e1727817deaefd5..218e30ccfc6cd957c20ffbb736fc4e1bff2c325c 100644 |
--- a/src/ppc/code-stubs-ppc.cc |
+++ b/src/ppc/code-stubs-ppc.cc |
@@ -3893,8 +3893,20 @@ void CompareICStub::GenerateKnownObjects(MacroAssembler* masm) { |
__ cmp(r6, r7); |
__ bne(&miss); |
- __ sub(r3, r3, r4); |
- __ Ret(); |
+ if (Token::IsEqualityOp(op())) { |
+ __ sub(r3, r3, r4); |
+ __ Ret(); |
+ } else if (is_strong(strength())) { |
+ __ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1); |
+ } else { |
+ if (op() == Token::LT || op() == Token::LTE) { |
+ __ LoadSmiLiteral(r5, Smi::FromInt(GREATER)); |
+ } else { |
+ __ LoadSmiLiteral(r5, Smi::FromInt(LESS)); |
+ } |
+ __ Push(r4, r3, r5); |
+ __ TailCallRuntime(Runtime::kCompare, 3, 1); |
+ } |
__ bind(&miss); |
GenerateMiss(masm); |