| Index: src/x87/lithium-codegen-x87.cc
|
| diff --git a/src/x87/lithium-codegen-x87.cc b/src/x87/lithium-codegen-x87.cc
|
| index 012efd0ca8ab70fb3aa68e6e96ba710ec3b494ab..0c852640e8f688ec8257d5c5272c92fbd312bbbf 100644
|
| --- a/src/x87/lithium-codegen-x87.cc
|
| +++ b/src/x87/lithium-codegen-x87.cc
|
| @@ -943,15 +943,23 @@ void LCodeGen::AddToTranslation(LEnvironment* environment,
|
| }
|
|
|
| if (op->IsStackSlot()) {
|
| + int index = op->index();
|
| + if (index >= 0) {
|
| + index += StandardFrameConstants::kFixedFrameSize / kPointerSize;
|
| + }
|
| if (is_tagged) {
|
| - translation->StoreStackSlot(op->index());
|
| + translation->StoreStackSlot(index);
|
| } else if (is_uint32) {
|
| - translation->StoreUint32StackSlot(op->index());
|
| + translation->StoreUint32StackSlot(index);
|
| } else {
|
| - translation->StoreInt32StackSlot(op->index());
|
| + translation->StoreInt32StackSlot(index);
|
| }
|
| } else if (op->IsDoubleStackSlot()) {
|
| - translation->StoreDoubleStackSlot(op->index());
|
| + int index = op->index();
|
| + if (index >= 0) {
|
| + index += StandardFrameConstants::kFixedFrameSize / kPointerSize;
|
| + }
|
| + translation->StoreDoubleStackSlot(index);
|
| } else if (op->IsRegister()) {
|
| Register reg = ToRegister(op);
|
| if (is_tagged) {
|
| @@ -2439,12 +2447,8 @@ void LCodeGen::DoBranch(LBranch* instr) {
|
|
|
| if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
|
| // SIMD value -> true.
|
| - Label not_simd;
|
| - __ CmpInstanceType(map, FIRST_SIMD_VALUE_TYPE);
|
| - __ j(less, ¬_simd, Label::kNear);
|
| - __ CmpInstanceType(map, LAST_SIMD_VALUE_TYPE);
|
| - __ j(less_equal, instr->TrueLabel(chunk_));
|
| - __ bind(¬_simd);
|
| + __ CmpInstanceType(map, SIMD128_VALUE_TYPE);
|
| + __ j(equal, instr->TrueLabel(chunk_));
|
| }
|
|
|
| if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
|
| @@ -6150,40 +6154,16 @@ Condition LCodeGen::EmitTypeofIs(LTypeofIsAndBranch* instr, Register input) {
|
| 1 << Map::kIsUndetectable);
|
| final_branch_condition = zero;
|
|
|
| - } else if (String::Equals(type_name, factory()->float32x4_string())) {
|
| - __ JumpIfSmi(input, false_label, false_distance);
|
| - __ 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);
|
| +// 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, false_distance); \
|
| + __ cmp(FieldOperand(input, HeapObject::kMapOffset), \
|
| + factory()->type##_map()); \
|
| final_branch_condition = equal;
|
| + SIMD128_TYPES(SIMD128_TYPE)
|
| +#undef SIMD128_TYPE
|
| + // clang-format on
|
|
|
| } else {
|
| __ jmp(false_label, false_distance);
|
|
|