Index: src/crankshaft/mips/lithium-codegen-mips.cc |
diff --git a/src/crankshaft/mips/lithium-codegen-mips.cc b/src/crankshaft/mips/lithium-codegen-mips.cc |
index 6e03e46bd59f430fa7d2bdeb60c11f2984fabf98..20893e5aa268d278702886211b95bd3a80cbe47c 100644 |
--- a/src/crankshaft/mips/lithium-codegen-mips.cc |
+++ b/src/crankshaft/mips/lithium-codegen-mips.cc |
@@ -2025,6 +2025,14 @@ |
__ Branch(instr->TrueLabel(chunk_), eq, scratch, Operand(SYMBOL_TYPE)); |
} |
+ if (expected & ToBooleanHint::kSimdValue) { |
+ // SIMD value -> true. |
+ const Register scratch = scratch1(); |
+ __ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
+ __ Branch(instr->TrueLabel(chunk_), eq, scratch, |
+ Operand(SIMD128_VALUE_TYPE)); |
+ } |
+ |
if (expected & ToBooleanHint::kHeapNumber) { |
// heap number -> false iff +0, -0, or NaN. |
DoubleRegister dbl_scratch = double_scratch0(); |
@@ -5162,6 +5170,19 @@ |
*cmp2 = Operand(zero_reg); |
final_branch_condition = eq; |
+// clang-format off |
+#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ |
+ } else if (String::Equals(type_name, factory->type##_string())) { \ |
+ __ JumpIfSmi(input, false_label); \ |
+ __ lw(input, FieldMemOperand(input, HeapObject::kMapOffset)); \ |
+ __ LoadRoot(at, Heap::k##Type##MapRootIndex); \ |
+ *cmp1 = input; \ |
+ *cmp2 = Operand(at); \ |
+ final_branch_condition = eq; |
+ SIMD128_TYPES(SIMD128_TYPE) |
+#undef SIMD128_TYPE |
+ // clang-format on |
+ |
} else { |
*cmp1 = at; |
*cmp2 = Operand(zero_reg); // Set to valid regs, to avoid caller assertion. |