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..9eba2ed906d3f4a3c9cb689c80457cf52e6ce30a 100644 |
--- a/src/ppc/code-stubs-ppc.cc |
+++ b/src/ppc/code-stubs-ppc.cc |
@@ -3583,6 +3583,30 @@ void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) { |
} |
+void CompareICStub::GenerateBooleans(MacroAssembler* masm) { |
+ DCHECK_EQ(CompareICState::BOOLEAN, state()); |
+ Label miss; |
+ |
+ __ CheckMap(r4, r5, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK); |
+ __ CheckMap(r3, r6, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK); |
+ if (op() != Token::EQ_STRICT && is_strong(strength())) { |
+ __ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1); |
+ } else { |
+ if (!Token::IsEqualityOp(op())) { |
+ __ LoadP(r4, FieldMemOperand(r4, Oddball::kToNumberOffset)); |
+ __ AssertSmi(r4); |
+ __ LoadP(r3, FieldMemOperand(r3, Oddball::kToNumberOffset)); |
+ __ AssertSmi(r3); |
+ } |
+ __ sub(r3, r4, r3); |
+ __ Ret(); |
+ } |
+ |
+ __ bind(&miss); |
+ GenerateMiss(masm); |
+} |
+ |
+ |
void CompareICStub::GenerateSmis(MacroAssembler* masm) { |
DCHECK(state() == CompareICState::SMI); |
Label miss; |