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

Unified Diff: runtime/vm/intermediate_language_mips.cc

Issue 1332923005: Remove remaining uses of null's absolute address from non-IA32. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_mips.cc
diff --git a/runtime/vm/intermediate_language_mips.cc b/runtime/vm/intermediate_language_mips.cc
index 40a08a6cff29c22ffabd6d2235a9f66e3c997bc2..fe30067f7227054c89c78a1fbb045219c3d47daf 100644
--- a/runtime/vm/intermediate_language_mips.cc
+++ b/runtime/vm/intermediate_language_mips.cc
@@ -23,6 +23,7 @@
namespace dart {
+DECLARE_FLAG(bool, allow_absolute_addresses);
DECLARE_FLAG(bool, emit_edge_counters);
DECLARE_FLAG(int, optimization_counter_threshold);
DECLARE_FLAG(bool, use_osr);
@@ -1737,7 +1738,7 @@ void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
__ LoadImmediate(TMP, kNullCid);
__ subu(CMPRES1, value_cid_reg, TMP);
} else {
- __ LoadImmediate(TMP, reinterpret_cast<int32_t>(Object::null()));
+ __ LoadObject(TMP, Object::null_object());
__ subu(CMPRES1, value_reg, TMP);
}
}
@@ -2204,7 +2205,7 @@ static void InlineArrayAllocation(FlowGraphCompiler* compiler,
// T7: null.
if (num_elements > 0) {
const intptr_t array_size = instance_size - sizeof(RawArray);
- __ LoadImmediate(T7, reinterpret_cast<int32_t>(Object::null()));
+ __ LoadObject(T7, Object::null_object());
__ AddImmediate(T2, V0, sizeof(RawArray) - kHeapObjectTag);
if (array_size < (kInlineArraySize * kWordSize)) {
intptr_t current_offset = 0;
@@ -2715,6 +2716,7 @@ class CheckStackOverflowSlowPath : public SlowPathCode {
Register value = instruction_->locs()->temp(0).reg();
__ Comment("CheckStackOverflowSlowPathOsr");
__ Bind(osr_entry_label());
+ ASSERT(FLAG_allow_absolute_addresses);
__ LoadImmediate(TMP, flags_address);
__ LoadImmediate(value, Isolate::kOsrRequest);
__ sw(value, Address(TMP));
@@ -2760,7 +2762,7 @@ void CheckStackOverflowInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
CheckStackOverflowSlowPath* slow_path = new CheckStackOverflowSlowPath(this);
compiler->AddSlowPathCode(slow_path);
- if (compiler->is_optimizing()) {
+ if (compiler->is_optimizing() && FLAG_allow_absolute_addresses) {
__ LoadImmediate(TMP, Isolate::Current()->stack_limit_address());
__ lw(CMPRES1, Address(TMP));
} else {
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698