Index: runtime/vm/intermediate_language_x64.cc |
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc |
index 84afa6fe150a94d6e6dd77e19fa61203df4d6e92..6c150fd3e0ed53271e33626cf6c4b08dd4f85aff 100644 |
--- a/runtime/vm/intermediate_language_x64.cc |
+++ b/runtime/vm/intermediate_language_x64.cc |
@@ -781,8 +781,8 @@ void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
} else { |
__ leaq(RAX, Address(RBP, kFirstLocalSlotFromFp * kWordSize)); |
} |
- __ LoadImmediate( |
- RBX, Immediate(reinterpret_cast<uword>(native_c_function()))); |
+ ExternalLabel label(reinterpret_cast<uword>(native_c_function())); |
+ __ LoadExternalLabel(RBX, &label, kNotPatchable); |
__ LoadImmediate(R10, Immediate(argc_tag)); |
const StubEntry& stub_entry = (is_bootstrap_native() || is_leaf_call) ? |
*StubCode::CallBootstrapCFunction_entry() : |
@@ -822,8 +822,9 @@ void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
ASSERT(compiler->is_optimizing()); |
Register char_code = locs()->in(0).reg(); |
Register result = locs()->out(0).reg(); |
- __ LoadImmediate(result, |
- Immediate(reinterpret_cast<uword>(Symbols::PredefinedAddress()))); |
+ |
+ ExternalLabel label(reinterpret_cast<uword>(Symbols::PredefinedAddress())); |
+ __ LoadExternalLabel(result, &label, kNotPatchable); |
__ movq(result, Address(result, |
char_code, |
TIMES_HALF_WORD_SIZE, // Char code is a smi. |