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

Unified Diff: runtime/vm/intermediate_language_arm64.cc

Issue 1192103004: VM: New calling convention for generated code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed comments 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_arm.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_arm64.cc
diff --git a/runtime/vm/intermediate_language_arm64.cc b/runtime/vm/intermediate_language_arm64.cc
index 7ae62c03ef4991e398c4dca35528622f2d16feb9..39efe6e20c472f78e0ec5a71583aa3ef1b43fec6 100644
--- a/runtime/vm/intermediate_language_arm64.cc
+++ b/runtime/vm/intermediate_language_arm64.cc
@@ -219,11 +219,13 @@ void ClosureCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
// R4: Arguments descriptor.
// R0: Function.
ASSERT(locs()->in(0).reg() == R0);
+ __ LoadFieldFromOffset(CODE_REG, R0, Function::code_offset());
__ LoadFieldFromOffset(R2, R0, Function::entry_point_offset());
// R2: instructions.
// R5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value).
__ LoadImmediate(R5, 0);
+ //??
__ blr(R2);
compiler->RecordSafepoint(locs());
// Marks either the continuation point in unoptimized code or the
@@ -2555,6 +2557,7 @@ void CatchBlockEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
needs_stacktrace());
// Restore the pool pointer.
+ __ RestoreCodePointer();
__ LoadPoolPointer();
if (HasParallelMove()) {
@@ -5456,8 +5459,14 @@ LocationSummary* IndirectGotoInstr::MakeLocationSummary(Zone* zone,
void IndirectGotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
Register target_address_reg = locs()->temp_slot(0)->reg();
- // Load from [current frame pointer] + kPcMarkerSlotFromFp.
- __ ldr(target_address_reg, Address(FP, kPcMarkerSlotFromFp * kWordSize));
+ // Load code entry point.
+ const intptr_t entry_offset = __ CodeSize();
+ if (Utils::IsInt(21, -entry_offset)) {
+ __ adr(target_address_reg, Immediate(-entry_offset));
+ } else {
+ __ adr(target_address_reg, Immediate(0));
+ __ AddImmediate(target_address_reg, target_address_reg, -entry_offset);
+ }
// Add the offset.
Register offset_reg = locs()->in(0).reg();
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698