| Index: dart/runtime/vm/intermediate_language_x64.cc
|
| ===================================================================
|
| --- dart/runtime/vm/intermediate_language_x64.cc (revision 29808)
|
| +++ dart/runtime/vm/intermediate_language_x64.cc (working copy)
|
| @@ -1035,8 +1035,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:
|
| @@ -1077,8 +1077,8 @@
|
| case kTypedDataFloat32ArrayCid:
|
| case kTypedDataFloat64ArrayCid:
|
| return kUnboxedDouble;
|
| - case kTypedDataUint32x4ArrayCid:
|
| - return kUnboxedUint32x4;
|
| + case kTypedDataInt32x4ArrayCid:
|
| + return kUnboxedInt32x4;
|
| case kTypedDataFloat32x4ArrayCid:
|
| return kUnboxedFloat32x4;
|
| default:
|
| @@ -1109,7 +1109,7 @@
|
| }
|
| if ((representation() == kUnboxedDouble) ||
|
| (representation() == kUnboxedFloat32x4) ||
|
| - (representation() == kUnboxedUint32x4)) {
|
| + (representation() == kUnboxedInt32x4)) {
|
| locs->set_out(Location::RequiresFpuRegister());
|
| } else {
|
| locs->set_out(Location::RequiresRegister());
|
| @@ -1144,7 +1144,7 @@
|
|
|
| if ((representation() == kUnboxedDouble) ||
|
| (representation() == kUnboxedFloat32x4) ||
|
| - (representation() == kUnboxedUint32x4)) {
|
| + (representation() == kUnboxedInt32x4)) {
|
| if ((index_scale() == 1) && index.IsRegister()) {
|
| __ SmiUntag(index.reg());
|
| }
|
| @@ -1158,7 +1158,7 @@
|
| } else if (class_id() == kTypedDataFloat64ArrayCid) {
|
| __ movsd(result, element_address);
|
| } else {
|
| - ASSERT((class_id() == kTypedDataUint32x4ArrayCid) ||
|
| + ASSERT((class_id() == kTypedDataInt32x4ArrayCid) ||
|
| (class_id() == kTypedDataFloat32x4ArrayCid));
|
| __ movups(result, element_address);
|
| }
|
| @@ -1230,8 +1230,8 @@
|
| return kUnboxedDouble;
|
| case kTypedDataFloat32x4ArrayCid:
|
| return kUnboxedFloat32x4;
|
| - case kTypedDataUint32x4ArrayCid:
|
| - return kUnboxedUint32x4;
|
| + case kTypedDataInt32x4ArrayCid:
|
| + return kUnboxedInt32x4;
|
| default:
|
| UNIMPLEMENTED();
|
| return kTagged;
|
| @@ -1289,7 +1289,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;
|
| @@ -1407,7 +1407,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;
|
| @@ -1542,7 +1542,7 @@
|
| __ j(EQUAL, &no_fixed_length, Assembler::kNearJump);
|
| // Check for typed data array.
|
| __ CompareImmediate(
|
| - value_cid_reg, Immediate(kTypedDataUint32x4ArrayCid), PP);
|
| + value_cid_reg, Immediate(kTypedDataInt32x4ArrayCid), PP);
|
| // Not a typed array or a regular array.
|
| __ j(GREATER, &no_fixed_length, Assembler::kNearJump);
|
| __ CompareImmediate(
|
| @@ -1622,7 +1622,7 @@
|
| __ j(EQUAL, &no_fixed_length, Assembler::kNearJump);
|
| // Check for typed data array.
|
| __ CompareImmediate(value_cid_reg,
|
| - Immediate(kTypedDataUint32x4ArrayCid), PP);
|
| + Immediate(kTypedDataInt32x4ArrayCid), PP);
|
| // Not a typed array or a regular array.
|
| __ j(GREATER, &no_fixed_length);
|
| __ CompareImmediate(
|
| @@ -3006,7 +3006,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* BoxUint32x4Instr::MakeLocationSummary() const {
|
| +LocationSummary* BoxInt32x4Instr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 1;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -3019,18 +3019,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());
|
| @@ -3047,28 +3047,28 @@
|
| }
|
|
|
| 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,
|
| PP);
|
| __ 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 kNumInputs = 1;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -3079,19 +3079,19 @@
|
| }
|
|
|
|
|
| -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) {
|
| Label* deopt = compiler->AddDeoptStub(deopt_id_, kDeoptCheckClass);
|
| __ testq(value, Immediate(kSmiTagMask));
|
| __ j(ZERO, deopt);
|
| - __ CompareClassId(value, kUint32x4Cid);
|
| + __ CompareClassId(value, kInt32x4Cid);
|
| __ j(NOT_EQUAL, deopt);
|
| }
|
| - __ movups(result, FieldAddress(value, Uint32x4::value_offset()));
|
| + __ movups(result, FieldAddress(value, Int32x4::value_offset()));
|
| }
|
|
|
|
|
| @@ -3185,7 +3185,7 @@
|
| __ cvtss2sd(value, value);
|
| break;
|
| case MethodRecognizer::kFloat32x4Shuffle:
|
| - case MethodRecognizer::kUint32x4Shuffle:
|
| + case MethodRecognizer::kInt32x4Shuffle:
|
| __ shufps(value, value, Immediate(mask_));
|
| break;
|
| default: UNREACHABLE();
|
| @@ -3212,7 +3212,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();
|
| @@ -3565,7 +3565,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* Float32x4ToUint32x4Instr::MakeLocationSummary() const {
|
| +LocationSummary* Float32x4ToInt32x4Instr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 1;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -3576,12 +3576,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 = 1;
|
| LocationSummary* summary =
|
| @@ -3596,7 +3596,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();
|
| @@ -3650,7 +3650,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* Uint32x4GetFlagInstr::MakeLocationSummary() const {
|
| +LocationSummary* Int32x4GetFlagInstr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 1;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -3661,7 +3661,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;
|
| @@ -3670,16 +3670,16 @@
|
| // Move value to stack.
|
| __ movups(Address(RSP, 0), value);
|
| switch (op_kind()) {
|
| - case MethodRecognizer::kUint32x4GetFlagX:
|
| + case MethodRecognizer::kInt32x4GetFlagX:
|
| __ movl(result, Address(RSP, 0));
|
| break;
|
| - case MethodRecognizer::kUint32x4GetFlagY:
|
| + case MethodRecognizer::kInt32x4GetFlagY:
|
| __ movl(result, Address(RSP, 4));
|
| break;
|
| - case MethodRecognizer::kUint32x4GetFlagZ:
|
| + case MethodRecognizer::kInt32x4GetFlagZ:
|
| __ movl(result, Address(RSP, 8));
|
| break;
|
| - case MethodRecognizer::kUint32x4GetFlagW:
|
| + case MethodRecognizer::kInt32x4GetFlagW:
|
| __ movl(result, Address(RSP, 12));
|
| break;
|
| default: UNREACHABLE();
|
| @@ -3695,7 +3695,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* Uint32x4SelectInstr::MakeLocationSummary() const {
|
| +LocationSummary* Int32x4SelectInstr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 3;
|
| const intptr_t kNumTemps = 1;
|
| LocationSummary* summary =
|
| @@ -3709,7 +3709,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();
|
| @@ -3729,7 +3729,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* Uint32x4SetFlagInstr::MakeLocationSummary() const {
|
| +LocationSummary* Int32x4SetFlagInstr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 2;
|
| const intptr_t kNumTemps = 1;
|
| LocationSummary* summary =
|
| @@ -3742,7 +3742,7 @@
|
| }
|
|
|
|
|
| -void Uint32x4SetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| +void Int32x4SetFlagInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| XmmRegister mask = locs()->in(0).fpu_reg();
|
| Register flag = locs()->in(1).reg();
|
| Register temp = locs()->temp(0).reg();
|
| @@ -3754,7 +3754,7 @@
|
| __ CompareObject(flag, Bool::True(), PP);
|
| __ j(NOT_EQUAL, &falsePath);
|
| switch (op_kind()) {
|
| - case MethodRecognizer::kUint32x4WithFlagX:
|
| + case MethodRecognizer::kInt32x4WithFlagX:
|
| __ LoadImmediate(temp, Immediate(0xFFFFFFFF), PP);
|
| __ movl(Address(RSP, 0), temp);
|
| __ jmp(&exitPath);
|
| @@ -3762,7 +3762,7 @@
|
| __ LoadImmediate(temp, Immediate(0x0), PP);
|
| __ movl(Address(RSP, 0), temp);
|
| break;
|
| - case MethodRecognizer::kUint32x4WithFlagY:
|
| + case MethodRecognizer::kInt32x4WithFlagY:
|
| __ LoadImmediate(temp, Immediate(0xFFFFFFFF), PP);
|
| __ movl(Address(RSP, 4), temp);
|
| __ jmp(&exitPath);
|
| @@ -3770,7 +3770,7 @@
|
| __ LoadImmediate(temp, Immediate(0x0), PP);
|
| __ movl(Address(RSP, 4), temp);
|
| break;
|
| - case MethodRecognizer::kUint32x4WithFlagZ:
|
| + case MethodRecognizer::kInt32x4WithFlagZ:
|
| __ LoadImmediate(temp, Immediate(0xFFFFFFFF), PP);
|
| __ movl(Address(RSP, 8), temp);
|
| __ jmp(&exitPath);
|
| @@ -3778,7 +3778,7 @@
|
| __ LoadImmediate(temp, Immediate(0x0), PP);
|
| __ movl(Address(RSP, 8), temp);
|
| break;
|
| - case MethodRecognizer::kUint32x4WithFlagW:
|
| + case MethodRecognizer::kInt32x4WithFlagW:
|
| __ LoadImmediate(temp, Immediate(0xFFFFFFFF), PP);
|
| __ movl(Address(RSP, 12), temp);
|
| __ jmp(&exitPath);
|
| @@ -3795,7 +3795,7 @@
|
| }
|
|
|
|
|
| -LocationSummary* Uint32x4ToFloat32x4Instr::MakeLocationSummary() const {
|
| +LocationSummary* Int32x4ToFloat32x4Instr::MakeLocationSummary() const {
|
| const intptr_t kNumInputs = 1;
|
| const intptr_t kNumTemps = 0;
|
| LocationSummary* summary =
|
| @@ -3806,12 +3806,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 =
|
| @@ -3823,7 +3823,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());
|
|
|