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..6b401be410b208ca5a0e980340883e797e9db284 100644 |
--- a/runtime/vm/intermediate_language_ia32.cc |
+++ b/runtime/vm/intermediate_language_ia32.cc |
@@ -1012,10 +1012,10 @@ CompileType LoadIndexedInstr::ComputeType() const { |
return CompileType::FromCid(kSmiCid); |
case kTypedDataInt32ArrayCid: |
- case kTypedDataUint32ArrayCid: |
return Typed32BitIsSmi() ? CompileType::FromCid(kSmiCid) |
: CompileType::FromCid(kMintCid); |
- |
+ case kTypedDataUint32ArrayCid: |
+ return CompileType::FromCid(kMintCid); |
default: |
UNIMPLEMENTED(); |
return CompileType::Dynamic(); |
@@ -1038,8 +1038,9 @@ Representation LoadIndexedInstr::representation() const { |
case kTwoByteStringCid: |
return kTagged; |
case kTypedDataInt32ArrayCid: |
- case kTypedDataUint32ArrayCid: |
return Typed32BitIsSmi() ? kTagged : kUnboxedMint; |
+ case kTypedDataUint32ArrayCid: |
+ return kUnboxedUint32; |
case kTypedDataFloat32ArrayCid: |
case kTypedDataFloat64ArrayCid: |
return kUnboxedDouble; |
@@ -1078,15 +1079,13 @@ LocationSummary* LoadIndexedInstr::MakeLocationSummary(Isolate* isolate, |
(representation() == kUnboxedInt32x4) || |
(representation() == kUnboxedFloat64x2)) { |
locs->set_out(0, Location::RequiresFpuRegister()); |
+ } else if (representation() == kUnboxedUint32) { |
+ ASSERT(class_id() == kTypedDataUint32ArrayCid); |
+ locs->set_out(0, Location::RequiresRegister()); |
} 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())); |
- } |
+ ASSERT(class_id() == kTypedDataInt32ArrayCid); |
+ locs->set_out(0, Location::Pair(Location::RegisterLocation(EAX), |
+ Location::RegisterLocation(EDX))); |
} else { |
ASSERT(representation() == kTagged); |
locs->set_out(0, Location::RequiresRegister()); |
@@ -1148,16 +1147,22 @@ void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
__ movl(result1, element_address); |
__ cdq(); |
break; |
- case kTypedDataUint32ArrayCid: |
- __ movl(result1, element_address); |
- __ xorl(result2, result2); |
- break; |
default: |
UNREACHABLE(); |
} |
return; |
} |
+ if (representation() == kUnboxedUint32) { |
+ ASSERT(class_id() == kTypedDataUint32ArrayCid); |
+ Register result = locs()->out(0).reg(); |
+ if ((index_scale() == 1) && index.IsRegister()) { |
+ __ SmiUntag(index.reg()); |
+ } |
+ __ movl(result, element_address); |
+ return; |
+ } |
+ |
ASSERT(representation() == kTagged); |
Register result = locs()->out(0).reg(); |