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

Unified Diff: runtime/vm/intermediate_language_dbc.cc

Issue 2399333003: DBC: Support large offsets in optimized field access. (Closed)
Patch Set: addressed comments Created 4 years, 2 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_compiler_dbc.cc ('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 aca13bdda4f4d677e5fae7d59cca94a1699c7b3f..49cc77ccacc002664a69d5a8fb97ec9c0b186570 100644
--- a/runtime/vm/intermediate_language_dbc.cc
+++ b/runtime/vm/intermediate_language_dbc.cc
@@ -1028,7 +1028,12 @@ EMIT_NATIVE_CODE(StoreInstanceField, 2) {
if (compiler->is_optimizing()) {
const Register value = locs()->in(1).reg();
const Register instance = locs()->in(0).reg();
- __ StoreField(instance, offset_in_bytes() / kWordSize, value);
+ if (Utils::IsInt(8, offset_in_bytes() / kWordSize)) {
+ __ StoreField(instance, offset_in_bytes() / kWordSize, value);
+ } else {
+ __ StoreFieldExt(instance, value);
+ __ Nop(offset_in_bytes() / kWordSize);
+ }
} else {
__ StoreFieldTOS(offset_in_bytes() / kWordSize);
}
@@ -1040,7 +1045,12 @@ EMIT_NATIVE_CODE(LoadField, 1, Location::RequiresRegister()) {
if (compiler->is_optimizing()) {
const Register result = locs()->out(0).reg();
const Register instance = locs()->in(0).reg();
- __ LoadField(result, instance, offset_in_bytes() / kWordSize);
+ if (Utils::IsInt(8, offset_in_bytes() / kWordSize)) {
+ __ LoadField(result, instance, offset_in_bytes() / kWordSize);
+ } else {
+ __ LoadFieldExt(result, instance);
+ __ Nop(offset_in_bytes() / kWordSize);
+ }
} else {
__ LoadFieldTOS(offset_in_bytes() / kWordSize);
}
« no previous file with comments | « runtime/vm/flow_graph_compiler_dbc.cc ('k') | runtime/vm/simulator_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698