| Index: runtime/vm/intermediate_language_ia32.cc
|
| diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
|
| index b64551f5485c18ec1866bb1ee424bad600f238b3..3ed4b166104ceddc28bd1b295878193c8c3a5473 100644
|
| --- a/runtime/vm/intermediate_language_ia32.cc
|
| +++ b/runtime/vm/intermediate_language_ia32.cc
|
| @@ -766,8 +766,8 @@ CompileType LoadIndexedInstr::ComputeType() const {
|
| return CompileType::FromCid(kDoubleCid);
|
| case kTypedDataFloat32x4ArrayCid:
|
| return CompileType::FromCid(kFloat32x4Cid);
|
| - case kTypedDataUint32x4ArrayCid:
|
| - return CompileType::FromCid(kUint32x4Cid);
|
| + case kTypedDataInt32x4ArrayCid:
|
| + return CompileType::FromCid(kInt32x4Cid);
|
|
|
| case kTypedDataInt8ArrayCid:
|
| case kTypedDataUint8ArrayCid:
|
| @@ -819,8 +819,8 @@ Representation LoadIndexedInstr::representation() const {
|
| return kUnboxedDouble;
|
| case kTypedDataFloat32x4ArrayCid:
|
| return kUnboxedFloat32x4;
|
| - case kTypedDataUint32x4ArrayCid:
|
| - return kUnboxedUint32x4;
|
| + case kTypedDataInt32x4ArrayCid:
|
| + return kUnboxedInt32x4;
|
| default:
|
| UNIMPLEMENTED();
|
| return kTagged;
|
| @@ -846,7 +846,7 @@ LocationSummary* LoadIndexedInstr::MakeLocationSummary() const {
|
| }
|
| if ((representation() == kUnboxedDouble) ||
|
| (representation() == kUnboxedFloat32x4) ||
|
| - (representation() == kUnboxedUint32x4)) {
|
| + (representation() == kUnboxedInt32x4)) {
|
| locs->set_out(Location::RequiresFpuRegister());
|
| } else {
|
| locs->set_out(Location::RequiresRegister());
|
| @@ -879,7 +879,7 @@ void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| if ((representation() == kUnboxedDouble) ||
|
| (representation() == kUnboxedMint) ||
|
| (representation() == kUnboxedFloat32x4) ||
|
| - (representation() == kUnboxedUint32x4)) {
|
| + (representation() == kUnboxedInt32x4)) {
|
| XmmRegister result = locs()->out().fpu_reg();
|
| if ((index_scale() == 1) && index.IsRegister()) {
|
| __ SmiUntag(index.reg());
|
| @@ -901,7 +901,7 @@ void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| case kTypedDataFloat64ArrayCid:
|
| __ movsd(result, element_address);
|
| break;
|
| - case kTypedDataUint32x4ArrayCid:
|
| + case kTypedDataInt32x4ArrayCid:
|
| case kTypedDataFloat32x4ArrayCid:
|
| __ movups(result, element_address);
|
| break;
|
| @@ -988,8 +988,8 @@ Representation StoreIndexedInstr::RequiredInputRepresentation(
|
| return kUnboxedDouble;
|
| case kTypedDataFloat32x4ArrayCid:
|
| return kUnboxedFloat32x4;
|
| - case kTypedDataUint32x4ArrayCid:
|
| - return kUnboxedUint32x4;
|
| + case kTypedDataInt32x4ArrayCid:
|
| + return kUnboxedInt32x4;
|
| default:
|
| UNIMPLEMENTED();
|
| return kTagged;
|
| @@ -1050,7 +1050,7 @@ LocationSummary* StoreIndexedInstr::MakeLocationSummary() const {
|
| // TODO(srdjan): Support Float64 constants.
|
| locs->set_in(2, Location::RequiresFpuRegister());
|
| break;
|
| - case kTypedDataUint32x4ArrayCid:
|
| + case kTypedDataInt32x4ArrayCid:
|
| case kTypedDataFloat32x4ArrayCid:
|
| locs->set_in(2, Location::RequiresFpuRegister());
|
| break;
|
| @@ -1171,7 +1171,7 @@ void StoreIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| case kTypedDataFloat64ArrayCid:
|
| __ movsd(element_address, locs()->in(2).fpu_reg());
|
| break;
|
| - case kTypedDataUint32x4ArrayCid:
|
| + case kTypedDataInt32x4ArrayCid:
|
| case kTypedDataFloat32x4ArrayCid:
|
| __ movups(element_address, locs()->in(2).fpu_reg());
|
| break;
|
| @@ -1301,7 +1301,7 @@ void GuardFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ cmpl(value_cid_reg, Immediate(kNullCid));
|
| __ j(EQUAL, &no_fixed_length, Assembler::kNearJump);
|
| // Check for typed data array.
|
| - __ cmpl(value_cid_reg, Immediate(kTypedDataUint32x4ArrayCid));
|
| + __ cmpl(value_cid_reg, Immediate(kTypedDataInt32x4ArrayCid));
|
| // Not a typed array or a regular array.
|
| __ j(GREATER, &no_fixed_length, Assembler::kNearJump);
|
| __ cmpl(value_cid_reg, Immediate(kTypedDataInt8ArrayCid));
|
| @@ -1388,7 +1388,7 @@ void GuardFieldInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ cmpl(value_cid_reg, Immediate(kNullCid));
|
| __ j(EQUAL, &no_fixed_length, Assembler::kNearJump);
|
| // Check for typed data array.
|
| - __ cmpl(value_cid_reg, Immediate(kTypedDataUint32x4ArrayCid));
|
| + __ cmpl(value_cid_reg, Immediate(kTypedDataInt32x4ArrayCid));
|
| // Not a typed array or a regular array.
|
| __ j(GREATER, &no_fixed_length, Assembler::kNearJump);
|
| __ cmpl(value_cid_reg, Immediate(kTypedDataInt8ArrayCid));
|
| @@ -2700,7 +2700,7 @@ void UnboxFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
|
|
|
|
| -LocationSummary* BoxUint32x4Instr::MakeLocationSummary() const {
|
| +LocationSummary* BoxInt32x4Instr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 1;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -2713,18 +2713,18 @@ LocationSummary* BoxUint32x4Instr::MakeLocationSummary() const {
|
| }
|
|
|
|
|
| -class BoxUint32x4SlowPath : public SlowPathCode {
|
| +class BoxInt32x4SlowPath : public SlowPathCode {
|
| public:
|
| - explicit BoxUint32x4SlowPath(BoxUint32x4Instr* instruction)
|
| + explicit BoxInt32x4SlowPath(BoxInt32x4Instr* instruction)
|
| : instruction_(instruction) { }
|
|
|
| virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
|
| - __ Comment("BoxUint32x4SlowPath");
|
| + __ Comment("BoxInt32x4SlowPath");
|
| __ Bind(entry_label());
|
| - const Class& uint32x4_class = compiler->uint32x4_class();
|
| + const Class& int32x4_class = compiler->int32x4_class();
|
| const Code& stub =
|
| - Code::Handle(StubCode::GetAllocationStubForClass(uint32x4_class));
|
| - const ExternalLabel label(uint32x4_class.ToCString(), stub.EntryPoint());
|
| + Code::Handle(StubCode::GetAllocationStubForClass(int32x4_class));
|
| + const ExternalLabel label(int32x4_class.ToCString(), stub.EntryPoint());
|
|
|
| LocationSummary* locs = instruction_->locs();
|
| locs->live_registers()->Remove(locs->out());
|
| @@ -2741,30 +2741,30 @@ class BoxUint32x4SlowPath : public SlowPathCode {
|
| }
|
|
|
| private:
|
| - BoxUint32x4Instr* instruction_;
|
| + BoxInt32x4Instr* instruction_;
|
| };
|
|
|
|
|
| -void BoxUint32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| - BoxUint32x4SlowPath* slow_path = new BoxUint32x4SlowPath(this);
|
| +void BoxInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| + BoxInt32x4SlowPath* slow_path = new BoxInt32x4SlowPath(this);
|
| compiler->AddSlowPathCode(slow_path);
|
|
|
| Register out_reg = locs()->out().reg();
|
| XmmRegister value = locs()->in(0).fpu_reg();
|
|
|
| - __ TryAllocate(compiler->uint32x4_class(),
|
| + __ TryAllocate(compiler->int32x4_class(),
|
| slow_path->entry_label(),
|
| Assembler::kFarJump,
|
| out_reg);
|
| __ Bind(slow_path->exit_label());
|
| - __ movups(FieldAddress(out_reg, Uint32x4::value_offset()), value);
|
| + __ movups(FieldAddress(out_reg, Int32x4::value_offset()), value);
|
| }
|
|
|
|
|
| -LocationSummary* UnboxUint32x4Instr::MakeLocationSummary() const {
|
| +LocationSummary* UnboxInt32x4Instr::MakeLocationSummary() const {
|
| const intptr_t value_cid = value()->Type()->ToCid();
|
| const intptr_t kNumInputs = 1;
|
| - const intptr_t kNumTemps = value_cid == kUint32x4Cid ? 0 : 1;
|
| + const intptr_t kNumTemps = value_cid == kInt32x4Cid ? 0 : 1;
|
| LocationSummary* summary =
|
| new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
|
| summary->set_in(0, Location::RequiresRegister());
|
| @@ -2777,20 +2777,20 @@ LocationSummary* UnboxUint32x4Instr::MakeLocationSummary() const {
|
| }
|
|
|
|
|
| -void UnboxUint32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void UnboxInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| const intptr_t value_cid = value()->Type()->ToCid();
|
| const Register value = locs()->in(0).reg();
|
| const XmmRegister result = locs()->out().fpu_reg();
|
|
|
| - if (value_cid != kUint32x4Cid) {
|
| + if (value_cid != kInt32x4Cid) {
|
| const Register temp = locs()->temp(0).reg();
|
| Label* deopt = compiler->AddDeoptStub(deopt_id_, kDeoptCheckClass);
|
| __ testl(value, Immediate(kSmiTagMask));
|
| __ j(ZERO, deopt);
|
| - __ CompareClassId(value, kUint32x4Cid, temp);
|
| + __ CompareClassId(value, kInt32x4Cid, temp);
|
| __ j(NOT_EQUAL, deopt);
|
| }
|
| - __ movups(result, FieldAddress(value, Uint32x4::value_offset()));
|
| + __ movups(result, FieldAddress(value, Int32x4::value_offset()));
|
| }
|
|
|
|
|
| @@ -2885,7 +2885,7 @@ void Simd32x4ShuffleInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ cvtss2sd(value, value);
|
| break;
|
| case MethodRecognizer::kFloat32x4Shuffle:
|
| - case MethodRecognizer::kUint32x4Shuffle:
|
| + case MethodRecognizer::kInt32x4Shuffle:
|
| __ shufps(value, value, Immediate(mask_));
|
| break;
|
| default: UNREACHABLE();
|
| @@ -2912,7 +2912,7 @@ void Simd32x4ShuffleMixInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| ASSERT(locs()->out().fpu_reg() == left);
|
| switch (op_kind()) {
|
| case MethodRecognizer::kFloat32x4ShuffleMix:
|
| - case MethodRecognizer::kUint32x4ShuffleMix:
|
| + case MethodRecognizer::kInt32x4ShuffleMix:
|
| __ shufps(left, right, Immediate(mask_));
|
| break;
|
| default: UNREACHABLE();
|
| @@ -3265,7 +3265,7 @@ void Float32x4WithInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
|
|
|
|
| -LocationSummary* Float32x4ToUint32x4Instr::MakeLocationSummary() const {
|
| +LocationSummary* Float32x4ToInt32x4Instr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 1;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -3276,12 +3276,12 @@ LocationSummary* Float32x4ToUint32x4Instr::MakeLocationSummary() const {
|
| }
|
|
|
|
|
| -void Float32x4ToUint32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void Float32x4ToInt32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // NOP.
|
| }
|
|
|
|
|
| -LocationSummary* Uint32x4BoolConstructorInstr::MakeLocationSummary() const {
|
| +LocationSummary* Int32x4BoolConstructorInstr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 4;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -3295,7 +3295,7 @@ LocationSummary* Uint32x4BoolConstructorInstr::MakeLocationSummary() const {
|
| }
|
|
|
|
|
| -void Uint32x4BoolConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void Int32x4BoolConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Register v0 = locs()->in(0).reg();
|
| Register v1 = locs()->in(1).reg();
|
| Register v2 = locs()->in(2).reg();
|
| @@ -3343,7 +3343,7 @@ void Uint32x4BoolConstructorInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
|
|
|
|
| -LocationSummary* Uint32x4GetFlagInstr::MakeLocationSummary() const {
|
| +LocationSummary* Int32x4GetFlagInstr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 1;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -3354,7 +3354,7 @@ LocationSummary* Uint32x4GetFlagInstr::MakeLocationSummary() const {
|
| }
|
|
|
|
|
| -void Uint32x4GetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void Int32x4GetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister value = locs()->in(0).fpu_reg();
|
| Register result = locs()->out().reg();
|
| Label done;
|
| @@ -3363,16 +3363,16 @@ void Uint32x4GetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // Move value to stack.
|
| __ movups(Address(ESP, 0), value);
|
| switch (op_kind()) {
|
| - case MethodRecognizer::kUint32x4GetFlagX:
|
| + case MethodRecognizer::kInt32x4GetFlagX:
|
| __ movl(result, Address(ESP, 0));
|
| break;
|
| - case MethodRecognizer::kUint32x4GetFlagY:
|
| + case MethodRecognizer::kInt32x4GetFlagY:
|
| __ movl(result, Address(ESP, 4));
|
| break;
|
| - case MethodRecognizer::kUint32x4GetFlagZ:
|
| + case MethodRecognizer::kInt32x4GetFlagZ:
|
| __ movl(result, Address(ESP, 8));
|
| break;
|
| - case MethodRecognizer::kUint32x4GetFlagW:
|
| + case MethodRecognizer::kInt32x4GetFlagW:
|
| __ movl(result, Address(ESP, 12));
|
| break;
|
| default: UNREACHABLE();
|
| @@ -3388,7 +3388,7 @@ void Uint32x4GetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
|
|
|
|
| -LocationSummary* Uint32x4SelectInstr::MakeLocationSummary() const {
|
| +LocationSummary* Int32x4SelectInstr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 3;
|
| const intptr_t kNumTemps = 1;
|
| LocationSummary* summary =
|
| @@ -3402,7 +3402,7 @@ LocationSummary* Uint32x4SelectInstr::MakeLocationSummary() const {
|
| }
|
|
|
|
|
| -void Uint32x4SelectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void Int32x4SelectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister mask = locs()->in(0).fpu_reg();
|
| XmmRegister trueValue = locs()->in(1).fpu_reg();
|
| XmmRegister falseValue = locs()->in(2).fpu_reg();
|
| @@ -3422,7 +3422,7 @@ void Uint32x4SelectInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
|
|
|
|
| -LocationSummary* Uint32x4SetFlagInstr::MakeLocationSummary() const {
|
| +LocationSummary* Int32x4SetFlagInstr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 2;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -3434,7 +3434,7 @@ LocationSummary* Uint32x4SetFlagInstr::MakeLocationSummary() const {
|
| }
|
|
|
|
|
| -void Uint32x4SetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void Int32x4SetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister mask = locs()->in(0).fpu_reg();
|
| Register flag = locs()->in(1).reg();
|
| ASSERT(mask == locs()->out().fpu_reg());
|
| @@ -3445,25 +3445,25 @@ void Uint32x4SetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| __ CompareObject(flag, Bool::True());
|
| __ j(NOT_EQUAL, &falsePath);
|
| switch (op_kind()) {
|
| - case MethodRecognizer::kUint32x4WithFlagX:
|
| + case MethodRecognizer::kInt32x4WithFlagX:
|
| __ movl(Address(ESP, 0), Immediate(0xFFFFFFFF));
|
| __ jmp(&exitPath);
|
| __ Bind(&falsePath);
|
| __ movl(Address(ESP, 0), Immediate(0x0));
|
| break;
|
| - case MethodRecognizer::kUint32x4WithFlagY:
|
| + case MethodRecognizer::kInt32x4WithFlagY:
|
| __ movl(Address(ESP, 4), Immediate(0xFFFFFFFF));
|
| __ jmp(&exitPath);
|
| __ Bind(&falsePath);
|
| __ movl(Address(ESP, 4), Immediate(0x0));
|
| break;
|
| - case MethodRecognizer::kUint32x4WithFlagZ:
|
| + case MethodRecognizer::kInt32x4WithFlagZ:
|
| __ movl(Address(ESP, 8), Immediate(0xFFFFFFFF));
|
| __ jmp(&exitPath);
|
| __ Bind(&falsePath);
|
| __ movl(Address(ESP, 8), Immediate(0x0));
|
| break;
|
| - case MethodRecognizer::kUint32x4WithFlagW:
|
| + case MethodRecognizer::kInt32x4WithFlagW:
|
| __ movl(Address(ESP, 12), Immediate(0xFFFFFFFF));
|
| __ jmp(&exitPath);
|
| __ Bind(&falsePath);
|
| @@ -3478,7 +3478,7 @@ void Uint32x4SetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| }
|
|
|
|
|
| -LocationSummary* Uint32x4ToFloat32x4Instr::MakeLocationSummary() const {
|
| +LocationSummary* Int32x4ToFloat32x4Instr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 1;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -3489,12 +3489,12 @@ LocationSummary* Uint32x4ToFloat32x4Instr::MakeLocationSummary() const {
|
| }
|
|
|
|
|
| -void Uint32x4ToFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void Int32x4ToFloat32x4Instr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| // NOP.
|
| }
|
|
|
|
|
| -LocationSummary* BinaryUint32x4OpInstr::MakeLocationSummary() const {
|
| +LocationSummary* BinaryInt32x4OpInstr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 2;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -3506,7 +3506,7 @@ LocationSummary* BinaryUint32x4OpInstr::MakeLocationSummary() const {
|
| }
|
|
|
|
|
| -void BinaryUint32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void BinaryInt32x4OpInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister left = locs()->in(0).fpu_reg();
|
| XmmRegister right = locs()->in(1).fpu_reg();
|
| ASSERT(left == locs()->out().fpu_reg());
|
|
|