| Index: dart/runtime/vm/intermediate_language_ia32.cc
|
| ===================================================================
|
| --- dart/runtime/vm/intermediate_language_ia32.cc (revision 29808)
|
| +++ dart/runtime/vm/intermediate_language_ia32.cc (working copy)
|
| @@ -1050,8 +1050,8 @@
|
| 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:
|
| @@ -1103,8 +1103,8 @@
|
| return kUnboxedDouble;
|
| case kTypedDataFloat32x4ArrayCid:
|
| return kUnboxedFloat32x4;
|
| - case kTypedDataUint32x4ArrayCid:
|
| - return kUnboxedUint32x4;
|
| + case kTypedDataInt32x4ArrayCid:
|
| + return kUnboxedInt32x4;
|
| default:
|
| UNIMPLEMENTED();
|
| return kTagged;
|
| @@ -1130,7 +1130,7 @@
|
| }
|
| if ((representation() == kUnboxedDouble) ||
|
| (representation() == kUnboxedFloat32x4) ||
|
| - (representation() == kUnboxedUint32x4)) {
|
| + (representation() == kUnboxedInt32x4)) {
|
| locs->set_out(Location::RequiresFpuRegister());
|
| } else {
|
| locs->set_out(Location::RequiresRegister());
|
| @@ -1163,7 +1163,7 @@
|
| 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());
|
| @@ -1185,7 +1185,7 @@
|
| case kTypedDataFloat64ArrayCid:
|
| __ movsd(result, element_address);
|
| break;
|
| - case kTypedDataUint32x4ArrayCid:
|
| + case kTypedDataInt32x4ArrayCid:
|
| case kTypedDataFloat32x4ArrayCid:
|
| __ movups(result, element_address);
|
| break;
|
| @@ -1272,8 +1272,8 @@
|
| return kUnboxedDouble;
|
| case kTypedDataFloat32x4ArrayCid:
|
| return kUnboxedFloat32x4;
|
| - case kTypedDataUint32x4ArrayCid:
|
| - return kUnboxedUint32x4;
|
| + case kTypedDataInt32x4ArrayCid:
|
| + return kUnboxedInt32x4;
|
| default:
|
| UNIMPLEMENTED();
|
| return kTagged;
|
| @@ -1334,7 +1334,7 @@
|
| // 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;
|
| @@ -1455,7 +1455,7 @@
|
| 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;
|
| @@ -1585,7 +1585,7 @@
|
| __ 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));
|
| @@ -1672,7 +1672,7 @@
|
| __ 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));
|
| @@ -2984,7 +2984,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* BoxUint32x4Instr::MakeLocationSummary() const {
|
| +LocationSummary* BoxInt32x4Instr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 1;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -2997,18 +2997,18 @@
|
| }
|
|
|
|
|
| -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());
|
| @@ -3025,30 +3025,30 @@
|
| }
|
|
|
| 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());
|
| @@ -3061,20 +3061,20 @@
|
| }
|
|
|
|
|
| -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()));
|
| }
|
|
|
|
|
| @@ -3169,7 +3169,7 @@
|
| __ cvtss2sd(value, value);
|
| break;
|
| case MethodRecognizer::kFloat32x4Shuffle:
|
| - case MethodRecognizer::kUint32x4Shuffle:
|
| + case MethodRecognizer::kInt32x4Shuffle:
|
| __ shufps(value, value, Immediate(mask_));
|
| break;
|
| default: UNREACHABLE();
|
| @@ -3196,7 +3196,7 @@
|
| 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();
|
| @@ -3549,7 +3549,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* Float32x4ToUint32x4Instr::MakeLocationSummary() const {
|
| +LocationSummary* Float32x4ToInt32x4Instr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 1;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -3560,12 +3560,12 @@
|
| }
|
|
|
|
|
| -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 =
|
| @@ -3579,7 +3579,7 @@
|
| }
|
|
|
|
|
| -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();
|
| @@ -3627,7 +3627,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* Uint32x4GetFlagInstr::MakeLocationSummary() const {
|
| +LocationSummary* Int32x4GetFlagInstr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 1;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -3638,7 +3638,7 @@
|
| }
|
|
|
|
|
| -void Uint32x4GetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void Int32x4GetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister value = locs()->in(0).fpu_reg();
|
| Register result = locs()->out().reg();
|
| Label done;
|
| @@ -3647,16 +3647,16 @@
|
| // 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();
|
| @@ -3672,7 +3672,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* Uint32x4SelectInstr::MakeLocationSummary() const {
|
| +LocationSummary* Int32x4SelectInstr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 3;
|
| const intptr_t kNumTemps = 1;
|
| LocationSummary* summary =
|
| @@ -3686,7 +3686,7 @@
|
| }
|
|
|
|
|
| -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();
|
| @@ -3706,7 +3706,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* Uint32x4SetFlagInstr::MakeLocationSummary() const {
|
| +LocationSummary* Int32x4SetFlagInstr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 2;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -3718,7 +3718,7 @@
|
| }
|
|
|
|
|
| -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());
|
| @@ -3729,25 +3729,25 @@
|
| __ 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);
|
| @@ -3762,7 +3762,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* Uint32x4ToFloat32x4Instr::MakeLocationSummary() const {
|
| +LocationSummary* Int32x4ToFloat32x4Instr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 1;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -3773,12 +3773,12 @@
|
| }
|
|
|
|
|
| -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 =
|
| @@ -3790,7 +3790,7 @@
|
| }
|
|
|
|
|
| -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());
|
|
|