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

Unified Diff: runtime/vm/assembler_arm64.cc

Issue 1314883002: VM: Use constant pool also for leaf runtime calls on x64, arm, arm64 and mips. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: use StubEntry::label directly Created 5 years, 4 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/assembler_arm64.h ('k') | runtime/vm/assembler_mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm64.cc
diff --git a/runtime/vm/assembler_arm64.cc b/runtime/vm/assembler_arm64.cc
index 72d90f221aeec291afe226b66b19b639ca5e6d5e..7ea74a2f0ce72435bd16f5dfe76b3cd5f354cbb6 100644
--- a/runtime/vm/assembler_arm64.cc
+++ b/runtime/vm/assembler_arm64.cc
@@ -584,27 +584,48 @@ void Assembler::LoadDImmediate(VRegister vd, double immd) {
}
+void Assembler::Branch(const ExternalLabel* label) {
+ LoadExternalLabel(TMP, label);
+ br(TMP);
+}
+
+
void Assembler::Branch(const StubEntry& stub_entry) {
const ExternalLabel label(stub_entry.EntryPoint());
Branch(&label);
}
+void Assembler::BranchPatchable(const ExternalLabel* label) {
+ // TODO(zra): Use LoadExternalLabelFixed if possible.
+ LoadImmediateFixed(TMP, label->address());
+ br(TMP);
+}
+
void Assembler::BranchPatchable(const StubEntry& stub_entry) {
- const ExternalLabel label(stub_entry.EntryPoint());
- BranchPatchable(&label);
+ BranchPatchable(&stub_entry.label());
+}
+
+
+void Assembler::BranchLink(const ExternalLabel* label) {
+ LoadExternalLabel(TMP, label);
+ blr(TMP);
}
void Assembler::BranchLink(const StubEntry& stub_entry) {
- const ExternalLabel label(stub_entry.EntryPoint());
- BranchLink(&label);
+ BranchLink(&stub_entry.label());
+}
+
+
+void Assembler::BranchLinkPatchable(const ExternalLabel* label) {
+ LoadExternalLabelFixed(TMP, label, kPatchable);
+ blr(TMP);
}
void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) {
- const ExternalLabel label(stub_entry.EntryPoint());
- BranchLinkPatchable(&label);
+ BranchLinkPatchable(&stub_entry.label());
}
@@ -1144,7 +1165,7 @@ void Assembler::LeaveDartFrame() {
void Assembler::EnterCallRuntimeFrame(intptr_t frame_size) {
- EnterFrame(0);
+ EnterStubFrame();
// Store fpu registers with the lowest register number at the lowest
// address.
@@ -1174,7 +1195,8 @@ void Assembler::LeaveCallRuntimeFrame() {
// We need to restore it before restoring registers.
const intptr_t kPushedRegistersSize =
kDartVolatileCpuRegCount * kWordSize +
- kDartVolatileFpuRegCount * kWordSize;
+ kDartVolatileFpuRegCount * kWordSize +
+ 2 * kWordSize; // PP and pc marker from EnterStubFrame.
AddImmediate(SP, FP, -kPushedRegistersSize);
for (int i = kDartLastVolatileCpuReg; i >= kDartFirstVolatileCpuReg; i--) {
const Register reg = static_cast<Register>(i);
@@ -1192,7 +1214,7 @@ void Assembler::LeaveCallRuntimeFrame() {
PopDouble(reg);
}
- PopPair(LR, FP);
+ LeaveStubFrame();
}
« no previous file with comments | « runtime/vm/assembler_arm64.h ('k') | runtime/vm/assembler_mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698