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

Unified Diff: runtime/vm/intermediate_language_ia32.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/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_ia32.cc
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index 2717a3f4e209fd04561a6b8e742c7ccb5d86ddb9..03f8a723c50c2055c90b35932f6fcaf223b3604e 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -1013,7 +1013,8 @@ CompileType LoadIndexedInstr::ComputeType() const {
case kTypedDataInt32ArrayCid:
case kTypedDataUint32ArrayCid:
- return CompileType::Int();
+ return Typed32BitIsSmi() ? CompileType::FromCid(kSmiCid)
+ : CompileType::FromCid(kMintCid);
default:
UNIMPLEMENTED();
@@ -1037,9 +1038,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;
@@ -1078,12 +1078,15 @@ 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() == kUnboxedInt32) {
- ASSERT(class_id() == kTypedDataInt32ArrayCid);
- 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()));
+ }
} else {
ASSERT(representation() == kTagged);
locs->set_out(0, Location::RequiresRegister());
@@ -1130,21 +1133,25 @@ void LoadIndexedInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
return;
}
- if ((representation() == kUnboxedUint32) ||
- (representation() == kUnboxedInt32)) {
- Register result = locs()->out(0).reg();
+ 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 ((index_scale() == 1) && index.IsRegister()) {
__ SmiUntag(index.reg());
}
switch (class_id()) {
case kTypedDataInt32ArrayCid:
- ASSERT(representation() == kUnboxedInt32);
- __ movl(result, element_address);
- break;
+ ASSERT(result1 == EAX);
+ ASSERT(result2 == EDX);
+ __ movl(result1, element_address);
+ __ cdq();
+ break;
case kTypedDataUint32ArrayCid:
- ASSERT(representation() == kUnboxedUint32);
- __ movl(result, element_address);
- break;
+ __ movl(result1, element_address);
+ __ xorl(result2, result2);
+ break;
default:
UNREACHABLE();
}
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698