Index: src/arm64/code-stubs-arm64.cc |
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc |
index b10364163680b158c76cddefe32aff8a4a275a5d..f75539d501501c98976afe7da1c63b8434b8ba43 100644 |
--- a/src/arm64/code-stubs-arm64.cc |
+++ b/src/arm64/code-stubs-arm64.cc |
@@ -221,6 +221,7 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Register left, |
// Smis. If it's not a heap number, then return equal. |
Register right_type = scratch; |
if ((cond == lt) || (cond == gt)) { |
+ Label not_simd; |
// Call runtime on identical JSObjects. Otherwise return equal. |
__ JumpIfObjectType(right, right_type, right_type, FIRST_SPEC_OBJECT_TYPE, |
slow, ge); |
@@ -228,8 +229,11 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Register left, |
__ Cmp(right_type, SYMBOL_TYPE); |
__ B(eq, slow); |
// Call runtime on identical SIMD values since we must throw a TypeError. |
- __ Cmp(right_type, FLOAT32X4_TYPE); |
- __ B(eq, slow); |
+ __ Cmp(right_type, FIRST_SIMD_VALUE_TYPE); |
+ __ B(lt, ¬_simd); |
+ __ Cmp(right_type, LAST_SIMD_VALUE_TYPE); |
+ __ B(le, slow); |
+ __ Bind(¬_simd); |
if (is_strong(strength)) { |
// Call the runtime on anything that is converted in the semantics, since |
// we need to throw a TypeError. Smis have already been ruled out. |
@@ -241,6 +245,7 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Register left, |
} else if (cond == eq) { |
__ JumpIfHeapNumber(right, &heap_number); |
} else { |
+ Label not_simd; |
__ JumpIfObjectType(right, right_type, right_type, HEAP_NUMBER_TYPE, |
&heap_number); |
// Comparing JS objects with <=, >= is complicated. |
@@ -250,8 +255,11 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Register left, |
__ Cmp(right_type, SYMBOL_TYPE); |
__ B(eq, slow); |
// Call runtime on identical SIMD values since we must throw a TypeError. |
- __ Cmp(right_type, FLOAT32X4_TYPE); |
- __ B(eq, slow); |
+ __ Cmp(right_type, FIRST_SIMD_VALUE_TYPE); |
+ __ B(lt, ¬_simd); |
+ __ Cmp(right_type, LAST_SIMD_VALUE_TYPE); |
+ __ B(le, slow); |
+ __ Bind(¬_simd); |
if (is_strong(strength)) { |
// Call the runtime on anything that is converted in the semantics, |
// since we need to throw a TypeError. Smis and heap numbers have |