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

Unified Diff: runtime/vm/assembler_arm.cc

Issue 602993002: Frees up LR on arm for use by the register allocator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 | « no previous file | runtime/vm/constants_arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_arm.cc
===================================================================
--- runtime/vm/assembler_arm.cc (revision 40683)
+++ runtime/vm/assembler_arm.cc (working copy)
@@ -2376,8 +2376,8 @@
void Assembler::BranchLink(const ExternalLabel* label) {
- LoadImmediate(IP, label->address()); // Target address is never patched.
- blx(IP); // Use blx instruction so that the return branch prediction works.
+ LoadImmediate(LR, label->address()); // Target address is never patched.
+ blx(LR); // Use blx instruction so that the return branch prediction works.
}
@@ -2949,7 +2949,7 @@
void Assembler::EnterCallRuntimeFrame(intptr_t frame_space) {
// Preserve volatile CPU registers.
- EnterFrame(kDartVolatileCpuRegs | (1 << FP) | (1 << LR), 0);
+ EnterFrame(kDartVolatileCpuRegs | (1 << FP), 0);
// Preserve all volatile FPU registers.
if (TargetCPUFeatures::vfp_supported()) {
@@ -2976,8 +2976,10 @@
TargetCPUFeatures::vfp_supported() ?
kDartVolatileFpuRegCount * kFpuRegisterSize : 0;
+ // We subtract one from the volatile cpu register count because, even though
+ // LR is volatile, it is pushed ahead of FP.
const intptr_t kPushedRegistersSize =
- kDartVolatileCpuRegCount * kWordSize + kPushedFpuRegisterSize;
+ (kDartVolatileCpuRegCount - 1) * kWordSize + kPushedFpuRegisterSize;
AddImmediate(SP, FP, -kPushedRegistersSize);
// Restore all volatile FPU registers.
@@ -2994,7 +2996,7 @@
}
// Restore volatile CPU registers.
- LeaveFrame(kDartVolatileCpuRegs | (1 << FP) | (1 << LR));
+ LeaveFrame(kDartVolatileCpuRegs | (1 << FP));
}
« no previous file with comments | « no previous file | runtime/vm/constants_arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698