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

Unified Diff: runtime/vm/assembler_arm.cc

Issue 1270803003: VM: More abstract interface for generating stub calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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_arm.h ('k') | runtime/vm/assembler_arm64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm.cc
diff --git a/runtime/vm/assembler_arm.cc b/runtime/vm/assembler_arm.cc
index 7663c38a6e54e363a731f604f344f94b5e5fe9af..bd2a6e711e80de722bd47958bc625c215e515b15 100644
--- a/runtime/vm/assembler_arm.cc
+++ b/runtime/vm/assembler_arm.cc
@@ -2684,6 +2684,12 @@ void Assembler::Branch(const ExternalLabel* label, Condition cond) {
}
+void Assembler::Branch(const StubEntry& stub_entry, Condition cond) {
+ const ExternalLabel label(stub_entry.EntryPoint());
+ Branch(&label, cond);
+}
+
+
void Assembler::BranchPatchable(const ExternalLabel* label) {
// Use a fixed size code sequence, since a function prologue may be patched
// with this branch sequence.
@@ -2694,12 +2700,24 @@ void Assembler::BranchPatchable(const ExternalLabel* label) {
}
+void Assembler::BranchPatchable(const StubEntry& stub_entry) {
+ const ExternalLabel label(stub_entry.EntryPoint());
+ BranchPatchable(&label);
+}
+
+
void Assembler::BranchLink(const ExternalLabel* label) {
LoadImmediate(LR, label->address()); // Target address is never patched.
blx(LR); // Use blx instruction so that the return branch prediction works.
}
+void Assembler::BranchLink(const StubEntry& stub_entry) {
+ const ExternalLabel label(stub_entry.EntryPoint());
+ BranchLink(&label);
+}
+
+
void Assembler::BranchLink(const ExternalLabel* label, Patchability patchable) {
// Make sure that class CallPattern is able to patch the label referred
// to by this code sequence.
@@ -2712,11 +2730,24 @@ void Assembler::BranchLink(const ExternalLabel* label, Patchability patchable) {
}
+void Assembler::BranchLink(const StubEntry& stub_entry,
+ Patchability patchable) {
+ const ExternalLabel label(stub_entry.EntryPoint());
+ BranchLink(&label, patchable);
+}
+
+
void Assembler::BranchLinkPatchable(const ExternalLabel* label) {
BranchLink(label, kPatchable);
}
+void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) {
+ const ExternalLabel label(stub_entry.EntryPoint());
+ BranchLinkPatchable(&label);
+}
+
+
void Assembler::BranchLinkOffset(Register base, int32_t offset) {
ASSERT(base != PC);
ASSERT(base != IP);
@@ -3545,7 +3576,7 @@ void Assembler::Stop(const char* message) {
PushList((1 << R0) | (1 << IP) | (1 << LR)); // Preserve R0, IP, LR.
LoadImmediate(R0, reinterpret_cast<int32_t>(message));
// PrintStopMessage() preserves all registers.
- BranchLink(&StubCode::PrintStopMessageLabel()); // Passing message in R0.
+ BranchLink(&StubCode::PrintStopMessage_entry()->label());
PopList((1 << R0) | (1 << IP) | (1 << LR)); // Restore R0, IP, LR.
}
// Emit the message address before the svc instruction, so that we can
« no previous file with comments | « runtime/vm/assembler_arm.h ('k') | runtime/vm/assembler_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698