Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index ab5a89fbb39aa17e763751a14718237334a74497..95548cff7616a9f484c1bd2b4b6d9ef1a7aea2a8 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -3360,6 +3360,30 @@ void BinaryOpICWithAllocationSiteStub::Generate(MacroAssembler* masm) { |
} |
+void CompareICStub::GenerateBooleans(MacroAssembler* masm) { |
+ DCHECK_EQ(CompareICState::BOOLEAN, state()); |
+ Label miss; |
+ |
+ __ CheckMap(r1, r2, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK); |
+ __ CheckMap(r0, r3, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK); |
+ if (op() != Token::EQ_STRICT && is_strong(strength())) { |
+ __ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1); |
+ } else { |
+ if (!Token::IsEqualityOp(op())) { |
+ __ ldr(r1, FieldMemOperand(r1, Oddball::kToNumberOffset)); |
+ __ AssertSmi(r1); |
+ __ ldr(r0, FieldMemOperand(r0, Oddball::kToNumberOffset)); |
+ __ AssertSmi(r0); |
+ } |
+ __ sub(r0, r1, r0); |
+ __ Ret(); |
+ } |
+ |
+ __ bind(&miss); |
+ GenerateMiss(masm); |
+} |
+ |
+ |
void CompareICStub::GenerateSmis(MacroAssembler* masm) { |
DCHECK(state() == CompareICState::SMI); |
Label miss; |