| Index: src/mips/lithium-codegen-mips.cc
|
| diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc
|
| index 7985dfaeddf91501f8d11defebadd7ae8339554f..8d67896d8a1f47f59b21f82564cc188fd4caee19 100644
|
| --- a/src/mips/lithium-codegen-mips.cc
|
| +++ b/src/mips/lithium-codegen-mips.cc
|
| @@ -2183,10 +2183,13 @@ void LCodeGen::DoBranch(LBranch* instr) {
|
|
|
| if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
|
| // SIMD value -> true.
|
| + Label not_simd;
|
| const Register scratch = scratch1();
|
| __ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset));
|
| - __ Branch(instr->TrueLabel(chunk_), eq, scratch,
|
| - Operand(FLOAT32X4_TYPE));
|
| + __ Branch(¬_simd, lt, at, Operand(FIRST_SIMD128_VALUE_TYPE));
|
| + __ Branch(instr->TrueLabel(chunk_), le, scratch,
|
| + Operand(LAST_SIMD128_VALUE_TYPE));
|
| + __ bind(¬_simd);
|
| }
|
|
|
| if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
|
| @@ -5749,6 +5752,48 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label,
|
| *cmp2 = Operand(FLOAT32X4_TYPE);
|
| final_branch_condition = eq;
|
|
|
| + } else if (String::Equals(type_name, factory->int32x4_string())) {
|
| + __ JumpIfSmi(input, false_label);
|
| + __ GetObjectType(input, input, scratch);
|
| + *cmp1 = scratch;
|
| + *cmp2 = Operand(INT32X4_TYPE);
|
| + final_branch_condition = eq;
|
| +
|
| + } else if (String::Equals(type_name, factory->bool32x4_string())) {
|
| + __ JumpIfSmi(input, false_label);
|
| + __ GetObjectType(input, input, scratch);
|
| + *cmp1 = scratch;
|
| + *cmp2 = Operand(BOOL32X4_TYPE);
|
| + final_branch_condition = eq;
|
| +
|
| + } else if (String::Equals(type_name, factory->int16x8_string())) {
|
| + __ JumpIfSmi(input, false_label);
|
| + __ GetObjectType(input, input, scratch);
|
| + *cmp1 = scratch;
|
| + *cmp2 = Operand(INT16X8_TYPE);
|
| + final_branch_condition = eq;
|
| +
|
| + } else if (String::Equals(type_name, factory->bool16x8_string())) {
|
| + __ JumpIfSmi(input, false_label);
|
| + __ GetObjectType(input, input, scratch);
|
| + *cmp1 = scratch;
|
| + *cmp2 = Operand(BOOL16X8_TYPE);
|
| + final_branch_condition = eq;
|
| +
|
| + } else if (String::Equals(type_name, factory->int8x16_string())) {
|
| + __ JumpIfSmi(input, false_label);
|
| + __ GetObjectType(input, input, scratch);
|
| + *cmp1 = scratch;
|
| + *cmp2 = Operand(INT8X16_TYPE);
|
| + final_branch_condition = eq;
|
| +
|
| + } else if (String::Equals(type_name, factory->bool8x16_string())) {
|
| + __ JumpIfSmi(input, false_label);
|
| + __ GetObjectType(input, input, scratch);
|
| + *cmp1 = scratch;
|
| + *cmp2 = Operand(BOOL8X16_TYPE);
|
| + final_branch_condition = eq;
|
| +
|
| } else {
|
| *cmp1 = at;
|
| *cmp2 = Operand(zero_reg); // Set to valid regs, to avoid caller assertion.
|
|
|