Chromium Code Reviews| Index: runtime/vm/intermediate_language_ia32.cc |
| diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc |
| index 03f8a723c50c2055c90b35932f6fcaf223b3604e..7255640e3b9b4484f75be50ea231ea3ab1282eab 100644 |
| --- a/runtime/vm/intermediate_language_ia32.cc |
| +++ b/runtime/vm/intermediate_language_ia32.cc |
| @@ -1013,8 +1013,7 @@ CompileType LoadIndexedInstr::ComputeType() const { |
| case kTypedDataInt32ArrayCid: |
| case kTypedDataUint32ArrayCid: |
| - return Typed32BitIsSmi() ? CompileType::FromCid(kSmiCid) |
| - : CompileType::FromCid(kMintCid); |
| + return CompileType::Int(); |
| default: |
| UNIMPLEMENTED(); |
| @@ -1038,8 +1037,9 @@ Representation LoadIndexedInstr::representation() const { |
| case kTwoByteStringCid: |
| return kTagged; |
| case kTypedDataInt32ArrayCid: |
| + return kUnboxedInt32; |
| case kTypedDataUint32ArrayCid: |
| - return Typed32BitIsSmi() ? kTagged : kUnboxedMint; |
| + return kUnboxedUint32; |
| case kTypedDataFloat32ArrayCid: |
| case kTypedDataFloat64ArrayCid: |
| return kUnboxedDouble; |
| @@ -1078,15 +1078,12 @@ LocationSummary* LoadIndexedInstr::MakeLocationSummary(Isolate* isolate, |
| (representation() == kUnboxedInt32x4) || |
| (representation() == kUnboxedFloat64x2)) { |
| locs->set_out(0, Location::RequiresFpuRegister()); |
| - } else if (representation() == kUnboxedMint) { |
| - if (class_id() == kTypedDataInt32ArrayCid) { |
| - locs->set_out(0, Location::Pair(Location::RegisterLocation(EAX), |
| - Location::RegisterLocation(EDX))); |
| - } else { |
| - ASSERT(class_id() == kTypedDataUint32ArrayCid); |
| - locs->set_out(0, Location::Pair(Location::RequiresRegister(), |
| - Location::RequiresRegister())); |
| - } |
| + } else if (representation() == kUnboxedUint32) { |
| + ASSERT(class_id() == kTypedDataUint32ArrayCid); |
| + locs->set_out(0, Location::RequiresRegister()); |
| + } else if (representation() == kUnboxedInt32) { |
| + ASSERT(class_id() == kTypedDataInt32ArrayCid); |
| + locs->set_out(0, Location::RequiresRegister()); |
| } else { |
| ASSERT(representation() == kTagged); |
| locs->set_out(0, Location::RequiresRegister()); |
| @@ -1133,28 +1130,23 @@ void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| return; |
| } |
| - if (representation() == kUnboxedMint) { |
| - ASSERT(locs()->out(0).IsPairLocation()); |
| - PairLocation* result_pair = locs()->out(0).AsPairLocation(); |
| - Register result1 = result_pair->At(0).reg(); |
| - Register result2 = result_pair->At(1).reg(); |
| + if (representation() == kUnboxedUint32) { |
| + ASSERT(class_id() == kTypedDataUint32ArrayCid); |
| + Register result = locs()->out(0).reg(); |
| if ((index_scale() == 1) && index.IsRegister()) { |
| __ SmiUntag(index.reg()); |
| } |
| - switch (class_id()) { |
| - case kTypedDataInt32ArrayCid: |
| - ASSERT(result1 == EAX); |
| - ASSERT(result2 == EDX); |
| - __ movl(result1, element_address); |
| - __ cdq(); |
| - break; |
| - case kTypedDataUint32ArrayCid: |
| - __ movl(result1, element_address); |
| - __ xorl(result2, result2); |
| - break; |
| - default: |
| - UNREACHABLE(); |
| + __ movl(result, element_address); |
| + return; |
| + } |
| + |
| + if (representation() == kUnboxedInt32) { |
| + ASSERT(class_id() == kTypedDataInt32ArrayCid); |
| + Register result = locs()->out(0).reg(); |
| + if ((index_scale() == 1) && index.IsRegister()) { |
| + __ SmiUntag(index.reg()); |
| } |
| + __ movl(result, element_address); |
| return; |
| } |
|
Vyacheslav Egorov (Google)
2014/09/30 16:52:52
I suggest to make it look more like on ARM64 to re
Cutch
2014/09/30 17:16:21
Done.
|