Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 612553002: Make LoadIndexedInstr for Uint32List use kUnboxedUint32 representation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_arm.cc
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc
index a52399e04a617922c3e497df71a460da64d1231f..837426c31b955af3634e9ebcc25cd2fc20c0e8ef 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -1117,8 +1117,7 @@ CompileType LoadIndexedInstr::ComputeType() const {
case kTypedDataInt32ArrayCid:
case kTypedDataUint32ArrayCid:
- return Typed32BitIsSmi() ? CompileType::FromCid(kSmiCid)
- : CompileType::FromCid(kMintCid);
+ return CompileType::Int();
default:
UNREACHABLE();
@@ -1142,8 +1141,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;
@@ -1226,9 +1226,12 @@ LocationSummary* LoadIndexedInstr::MakeLocationSummary(Isolate* isolate,
} else {
locs->set_out(0, Location::RequiresFpuRegister());
}
- } else if (representation() == kUnboxedMint) {
- 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());
@@ -1281,27 +1284,23 @@ void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
return;
}
- if (representation() == kUnboxedMint) {
- ASSERT(locs()->out(0).IsPairLocation());
- PairLocation* result_pair = locs()->out(0).AsPairLocation();
- const Register result1 = result_pair->At(0).reg();
- const Register result2 = result_pair->At(1).reg();
+ if ((representation() == kUnboxedUint32) ||
+ (representation() == kUnboxedInt32)) {
+ Register result = locs()->out(0).reg();
+ if ((index_scale() == 1) && index.IsRegister()) {
+ __ SmiUntag(index.reg());
+ }
switch (class_id()) {
case kTypedDataInt32ArrayCid:
- // Load low word.
- __ ldr(result1, element_address);
- // Sign extend into high word.
- __ SignFill(result2, result1);
- break;
+ ASSERT(representation() == kUnboxedInt32);
+ __ ldr(result, element_address);
+ break;
case kTypedDataUint32ArrayCid:
- // Load low word.
- __ ldr(result1, element_address);
- // Zero high word.
- __ eor(result2, result2, Operand(result2));
- break;
+ ASSERT(representation() == kUnboxedUint32);
+ __ ldr(result, element_address);
+ break;
default:
UNREACHABLE();
- break;
}
return;
}
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698