Index: src/arm64/lithium-codegen-arm64.cc |
diff --git a/src/arm64/lithium-codegen-arm64.cc b/src/arm64/lithium-codegen-arm64.cc |
index 074926b83b7700c2971d92c6309df4ea5ba3f89a..ddefa1c889124c4827ea15a5b80e97eb10f4da4a 100644 |
--- a/src/arm64/lithium-codegen-arm64.cc |
+++ b/src/arm64/lithium-codegen-arm64.cc |
@@ -1926,6 +1926,12 @@ void LCodeGen::DoBranch(LBranch* instr) { |
__ B(eq, true_label); |
} |
+ if (expected.Contains(ToBooleanStub::SIMD_VALUE)) { |
+ // SIMD value -> true. |
+ __ CompareInstanceType(map, scratch, FLOAT32X4_TYPE); |
+ __ B(eq, true_label); |
+ } |
+ |
if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { |
Label not_heap_number; |
__ JumpIfNotRoot(map, Heap::kHeapNumberMapRootIndex, ¬_heap_number); |
@@ -5962,6 +5968,15 @@ void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { |
__ Ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); |
EmitTestAndBranch(instr, eq, scratch, 1 << Map::kIsUndetectable); |
+ } else if (String::Equals(type_name, factory->float32x4_string())) { |
+ DCHECK((instr->temp1() != NULL) && (instr->temp2() != NULL)); |
+ Register map = ToRegister(instr->temp1()); |
+ Register scratch = ToRegister(instr->temp2()); |
+ |
+ __ JumpIfSmi(value, false_label); |
+ __ CompareObjectType(value, map, scratch, FLOAT32X4_TYPE); |
+ EmitBranch(instr, eq); |
+ |
} else { |
__ B(false_label); |
} |