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 { |