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

Unified Diff: runtime/vm/intermediate_language_dbc.cc

Issue 2268593002: DBC: Add back special case for float64 load/store (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix 32-bit build Created 4 years, 4 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/constants_dbc.h ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_dbc.cc
diff --git a/runtime/vm/intermediate_language_dbc.cc b/runtime/vm/intermediate_language_dbc.cc
index 0c9ebd2114ab4072b30e639f4a773e72c57744a7..494ae42b3073d0011360e1c9ed514422feec30f2 100644
--- a/runtime/vm/intermediate_language_dbc.cc
+++ b/runtime/vm/intermediate_language_dbc.cc
@@ -726,12 +726,12 @@ EMIT_NATIVE_CODE(StoreIndexed, 3, Location::NoLocation(),
Unsupported(compiler);
UNREACHABLE();
}
- if (index_scale() != 1) {
- __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+ if (index_scale() == 1) {
+ __ StoreIndexedUint32(array, index, value);
} else {
- __ Move(temp, index);
+ __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+ __ StoreIndexedUint32(array, temp, value);
}
- __ StoreIndexedUint32(array, temp, value);
break;
}
case kTypedDataFloat64ArrayCid:
@@ -739,12 +739,14 @@ EMIT_NATIVE_CODE(StoreIndexed, 3, Location::NoLocation(),
Unsupported(compiler);
UNREACHABLE();
}
- if (index_scale() != 1) {
- __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+ if (index_scale() == 1) {
+ __ StoreIndexedFloat64(array, index, value);
+ } else if (index_scale() == 8) {
+ __ StoreIndexed8Float64(array, index, value);
} else {
- __ Move(temp, index);
+ __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+ __ StoreIndexedFloat64(array, temp, value);
}
- __ StoreIndexedFloat64(array, temp, value);
break;
default:
Unsupported(compiler);
@@ -799,29 +801,31 @@ EMIT_NATIVE_CODE(LoadIndexed, 2, Location::RequiresRegister(),
break;
case kTypedDataInt32ArrayCid:
ASSERT(representation() == kUnboxedInt32);
- if (index_scale() != 1) {
- __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+ if (index_scale() == 1) {
+ __ LoadIndexedInt32(result, array, index);
} else {
- __ Move(temp, index);
+ __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+ __ LoadIndexedInt32(result, array, temp);
}
- __ LoadIndexedInt32(result, array, temp);
break;
case kTypedDataUint32ArrayCid:
ASSERT(representation() == kUnboxedUint32);
- if (index_scale() != 1) {
- __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+ if (index_scale() == 1) {
+ __ LoadIndexedUint32(result, array, index);
} else {
- __ Move(temp, index);
+ __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+ __ LoadIndexedUint32(result, array, temp);
}
- __ LoadIndexedUint32(result, array, temp);
break;
case kTypedDataFloat64ArrayCid:
- if (index_scale() != 1) {
- __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+ if (index_scale() == 1) {
+ __ LoadIndexedFloat64(result, array, index);
+ } else if (index_scale() == 8) {
+ __ LoadIndexed8Float64(result, array, index);
} else {
- __ Move(temp, index);
+ __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+ __ LoadIndexedFloat64(result, array, temp);
}
- __ LoadIndexedFloat64(result, array, temp);
break;
default:
Unsupported(compiler);
« no previous file with comments | « runtime/vm/constants_dbc.h ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698