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

Unified Diff: runtime/vm/intermediate_language_arm64.cc

Issue 513213002: Generate some intrinsics using our IR. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed Slava's feedback Created 6 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
===================================================================
--- runtime/vm/intermediate_language_arm64.cc (revision 39909)
+++ runtime/vm/intermediate_language_arm64.cc (working copy)
@@ -61,7 +61,7 @@
} else {
ASSERT(value.IsStackSlot());
const intptr_t value_offset = value.ToStackSlotOffset();
- __ LoadFromOffset(TMP, FP, value_offset, PP);
+ __ LoadFromOffset(TMP, value.base_reg(), value_offset, PP);
__ Push(TMP);
}
}
@@ -85,6 +85,13 @@
void ReturnInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
const Register result = locs()->in(0).reg();
ASSERT(result == R0);
+
+ if (compiler->intrinsic_mode()) {
+ // Intrinsics don't have a frame.
+ __ ret();
+ return;
+ }
+
#if defined(DEBUG)
Label stack_ok;
__ Comment("Stack Check");
@@ -1590,7 +1597,6 @@
String::Handle(cls_.PrettyName()).ToCString());
}
__ Bind(entry_label());
-
const Code& stub =
Code::Handle(isolate, stub_code->GetAllocationStubForClass(cls_));
const ExternalLabel label(stub.EntryPoint());
@@ -1606,7 +1612,6 @@
locs);
__ mov(result_, R0);
compiler->RestoreLiveRegisters(locs);
-
__ b(exit_label());
}
@@ -1615,22 +1620,31 @@
const Class& cls,
Register result,
Register temp) {
- BoxAllocationSlowPath* slow_path =
- new BoxAllocationSlowPath(instruction, cls, result);
- compiler->AddSlowPathCode(slow_path);
+ if (compiler->intrinsic_mode()) {
+ __ TryAllocate(cls,
+ compiler->intrinsic_slow_path_label(),
+ result,
+ temp,
+ PP);
+ } else {
+ BoxAllocationSlowPath* slow_path =
+ new BoxAllocationSlowPath(instruction, cls, result,
+ compiler->intrinsic_mode());
+ compiler->AddSlowPathCode(slow_path);
- __ TryAllocate(cls,
- slow_path->entry_label(),
- result,
- temp,
- PP);
- __ Bind(slow_path->exit_label());
+ __ TryAllocate(cls,
+ slow_path->entry_label(),
+ result,
+ temp,
+ PP);
+ __ Bind(slow_path->exit_label());
+ }
}
private:
Instruction* instruction_;
const Class& cls_;
- Register result_;
+ const Register result_;
};
« 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