Index: src/arm64/lithium-codegen-arm64.cc |
diff --git a/src/arm64/lithium-codegen-arm64.cc b/src/arm64/lithium-codegen-arm64.cc |
index 2378b6ce310cfd67155e0d6a07c771b5f0e8562c..a19ea55e82ec86d6da3e6da4a5d5fbaa70144659 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); |
@@ -5960,6 +5966,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); |
} |