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

Unified Diff: runtime/vm/assembler_arm.cc

Issue 1189573004: Use object pool for runtime calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 2eff720f60ee18d3d05b43e0887bd76116e7fc81..6367d4d3b331c5dc885ee5bbcf71d65a71b3f58e 100644
--- a/runtime/vm/assembler_arm.cc
+++ b/runtime/vm/assembler_arm.cc
@@ -1581,6 +1581,16 @@ void Assembler::LoadObject(Register rd, const Object& object, Condition cond) {
}
+void Assembler::LoadExternalLabel(Register rd,
+ const ExternalLabel* label,
+ Patchability patchable,
+ Condition cond) {
+ const int32_t offset = ObjectPool::element_offset(
+ object_pool_wrapper_.FindExternalLabel(label, patchable));
+ LoadWordFromPoolOffset(rd, offset - kHeapObjectTag, cond);
+}
+
+
void Assembler::PushObject(const Object& object) {
LoadObject(IP, object);
Push(IP);
@@ -2655,18 +2665,23 @@ void Assembler::BranchLink(const ExternalLabel* label) {
}
-void Assembler::BranchLinkPatchable(const ExternalLabel* 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.
// For added code robustness, use 'blx lr' in a patchable sequence and
// use 'blx ip' in a non-patchable sequence (see other BranchLink flavors).
const int32_t offset = ObjectPool::element_offset(
- object_pool_wrapper_.FindExternalLabel(label, kPatchable));
+ object_pool_wrapper_.FindExternalLabel(label, patchable));
LoadWordFromPoolOffset(LR, offset - kHeapObjectTag);
blx(LR); // Use blx instruction so that the return branch prediction works.
}
+void Assembler::BranchLinkPatchable(const ExternalLabel* label) {
+ BranchLink(label, kPatchable);
+}
+
+
void Assembler::BranchLinkOffset(Register base, int32_t offset) {
ASSERT(base != PC);
ASSERT(base != IP);
@@ -3282,16 +3297,14 @@ void Assembler::LeaveDartFrame() {
}
-void Assembler::EnterStubFrame(bool load_pp) {
+void Assembler::EnterStubFrame() {
// Push 0 as saved PC for stub frames.
mov(IP, Operand(LR));
mov(LR, Operand(0));
RegList regs = (1 << PP) | (1 << FP) | (1 << IP) | (1 << LR);
EnterFrame(regs, 0);
- if (load_pp) {
- // Setup pool pointer for this stub.
- LoadPoolPointer();
- }
+ // Setup pool pointer for this stub.
+ LoadPoolPointer();
}
« 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