| Index: src/x64/lithium-codegen-x64.cc
|
| diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
|
| index fcb470d0283737bc27128236a1c7f8fc7cdda045..c70281058f72b6f7e43298396fd78efff78de70d 100644
|
| --- a/src/x64/lithium-codegen-x64.cc
|
| +++ b/src/x64/lithium-codegen-x64.cc
|
| @@ -2215,8 +2215,12 @@ void LCodeGen::DoBranch(LBranch* instr) {
|
|
|
| if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
|
| // SIMD value -> true.
|
| - __ CmpInstanceType(map, FLOAT32X4_TYPE);
|
| - __ j(equal, instr->TrueLabel(chunk_));
|
| + Label not_simd;
|
| + __ CmpInstanceType(map, FIRST_SIMD128_VALUE_TYPE);
|
| + __ j(less, ¬_simd, Label::kNear);
|
| + __ CmpInstanceType(map, LAST_SIMD128_VALUE_TYPE);
|
| + __ j(less_equal, instr->TrueLabel(chunk_));
|
| + __ bind(¬_simd);
|
| }
|
|
|
| if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
|
| @@ -5750,6 +5754,36 @@ Condition LCodeGen::EmitTypeofIs(LTypeofIsAndBranch* instr, Register input) {
|
| __ CmpObjectType(input, FLOAT32X4_TYPE, input);
|
| final_branch_condition = equal;
|
|
|
| + } else if (String::Equals(type_name, factory->int32x4_string())) {
|
| + __ JumpIfSmi(input, false_label, false_distance);
|
| + __ CmpObjectType(input, INT32X4_TYPE, input);
|
| + final_branch_condition = equal;
|
| +
|
| + } else if (String::Equals(type_name, factory->bool32x4_string())) {
|
| + __ JumpIfSmi(input, false_label, false_distance);
|
| + __ CmpObjectType(input, BOOL32X4_TYPE, input);
|
| + final_branch_condition = equal;
|
| +
|
| + } else if (String::Equals(type_name, factory->int16x8_string())) {
|
| + __ JumpIfSmi(input, false_label, false_distance);
|
| + __ CmpObjectType(input, INT16X8_TYPE, input);
|
| + final_branch_condition = equal;
|
| +
|
| + } else if (String::Equals(type_name, factory->bool16x8_string())) {
|
| + __ JumpIfSmi(input, false_label, false_distance);
|
| + __ CmpObjectType(input, BOOL16X8_TYPE, input);
|
| + final_branch_condition = equal;
|
| +
|
| + } else if (String::Equals(type_name, factory->int8x16_string())) {
|
| + __ JumpIfSmi(input, false_label, false_distance);
|
| + __ CmpObjectType(input, INT8X16_TYPE, input);
|
| + final_branch_condition = equal;
|
| +
|
| + } else if (String::Equals(type_name, factory->bool8x16_string())) {
|
| + __ JumpIfSmi(input, false_label, false_distance);
|
| + __ CmpObjectType(input, BOOL8X16_TYPE, input);
|
| + final_branch_condition = equal;
|
| +
|
| } else {
|
| __ jmp(false_label, false_distance);
|
| }
|
|
|