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

Unified Diff: src/mips/code-stubs-mips.cc

Issue 18368002: MIPS: Fix register usage in ProfileEntryHookStub (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed nit. Created 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index 56699a50304ab8f72102b3871257eb0e037eb058..ad3b1644e7acc4bfab6f0e1c636914caedb5339d 100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -7530,12 +7530,16 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) {
const int32_t kReturnAddressDistanceFromFunctionStart =
Assembler::kCallTargetAddressOffset + (2 * Assembler::kInstrSize);
- // Save live volatile registers.
+ // This should contain all kCallerSaved registers.
kisg 2013/07/01 20:48:22 kCallerSaved should read kJSCallerSaved
+ const RegList kSavedRegs =
+ kJSCallerSaved | // Caller saved registers.
+ s5.bit(); // Saved stack pointer.
+
// We also save ra, so the count here is one higher than the mask indicates.
- const int32_t kNumSavedRegs = kNumJSCallerSaved + 1;
+ const int32_t kNumSavedRegs = kNumJSCallerSaved + 2;
// Save all caller-save registers as this may be called from anywhere.
- __ MultiPush(kJSCallerSaved | ra.bit());
+ __ MultiPush(kSavedRegs | ra.bit());
// Compute the function's address for the first argument.
__ Subu(a0, ra, Operand(kReturnAddressDistanceFromFunctionStart));
@@ -7547,7 +7551,7 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) {
// Align the stack if necessary.
int frame_alignment = masm->ActivationFrameAlignment();
if (frame_alignment > kPointerSize) {
- __ mov(t1, sp);
+ __ mov(s5, sp);
ASSERT(IsPowerOf2(frame_alignment));
__ And(sp, sp, Operand(-frame_alignment));
}
@@ -7568,11 +7572,11 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) {
// Restore the stack pointer if needed.
if (frame_alignment > kPointerSize) {
- __ mov(sp, t1);
+ __ mov(sp, s5);
}
// Also pop ra to get Ret(0).
- __ MultiPop(kJSCallerSaved | ra.bit());
+ __ MultiPop(kSavedRegs | ra.bit());
__ Ret();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698