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

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 618353002: Revert r40848 (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 837426c31b955af3634e9ebcc25cd2fc20c0e8ef..a52399e04a617922c3e497df71a460da64d1231f 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -1117,7 +1117,8 @@ CompileType LoadIndexedInstr::ComputeType() const {
case kTypedDataInt32ArrayCid:
case kTypedDataUint32ArrayCid:
- return CompileType::Int();
+ return Typed32BitIsSmi() ? CompileType::FromCid(kSmiCid)
+ : CompileType::FromCid(kMintCid);
default:
UNREACHABLE();
@@ -1141,9 +1142,8 @@ Representation LoadIndexedInstr::representation() const {
case kTwoByteStringCid:
return kTagged;
case kTypedDataInt32ArrayCid:
- return kUnboxedInt32;
case kTypedDataUint32ArrayCid:
- return kUnboxedUint32;
+ return Typed32BitIsSmi() ? kTagged : kUnboxedMint;
case kTypedDataFloat32ArrayCid:
case kTypedDataFloat64ArrayCid:
return kUnboxedDouble;
@@ -1226,12 +1226,9 @@ LocationSummary* LoadIndexedInstr::MakeLocationSummary(Isolate* isolate,
} else {
locs->set_out(0, Location::RequiresFpuRegister());
}
- } 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 if (representation() == kUnboxedMint) {
+ locs->set_out(0, Location::Pair(Location::RequiresRegister(),
+ Location::RequiresRegister()));
} else {
ASSERT(representation() == kTagged);
locs->set_out(0, Location::RequiresRegister());
@@ -1284,23 +1281,27 @@ void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
return;
}
- if ((representation() == kUnboxedUint32) ||
- (representation() == kUnboxedInt32)) {
- Register result = locs()->out(0).reg();
- if ((index_scale() == 1) && index.IsRegister()) {
- __ SmiUntag(index.reg());
- }
+ 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();
switch (class_id()) {
case kTypedDataInt32ArrayCid:
- ASSERT(representation() == kUnboxedInt32);
- __ ldr(result, element_address);
- break;
+ // Load low word.
+ __ ldr(result1, element_address);
+ // Sign extend into high word.
+ __ SignFill(result2, result1);
+ break;
case kTypedDataUint32ArrayCid:
- ASSERT(representation() == kUnboxedUint32);
- __ ldr(result, element_address);
- break;
+ // Load low word.
+ __ ldr(result1, element_address);
+ // Zero high word.
+ __ eor(result2, result2, Operand(result2));
+ 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