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

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

Issue 1271583002: PPC: Clean up register save/restore logic. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « src/ppc/code-stubs-ppc.h ('k') | src/ppc/frames-ppc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/code-stubs-ppc.cc
diff --git a/src/ppc/code-stubs-ppc.cc b/src/ppc/code-stubs-ppc.cc
index 59aa8b182a8b6355188759f5f6c5eb649aa3b34e..150681adafeb6a7f90ab546545b28016b7f9e40a 100644
--- a/src/ppc/code-stubs-ppc.cc
+++ b/src/ppc/code-stubs-ppc.cc
@@ -741,7 +741,7 @@ void StoreBufferOverflowStub::Generate(MacroAssembler* masm) {
__ mflr(r0);
__ MultiPush(kJSCallerSaved | r0.bit());
if (save_doubles()) {
- __ SaveFPRegs(sp, 0, DoubleRegister::kNumVolatileRegisters);
+ __ MultiPushDoubles(kCallerSavedDoubles);
}
const int argument_count = 1;
const int fp_argument_count = 0;
@@ -753,7 +753,7 @@ void StoreBufferOverflowStub::Generate(MacroAssembler* masm) {
__ CallCFunction(ExternalReference::store_buffer_overflow_function(isolate()),
argument_count);
if (save_doubles()) {
- __ RestoreFPRegs(sp, 0, DoubleRegister::kNumVolatileRegisters);
+ __ MultiPopDoubles(kCallerSavedDoubles);
}
__ MultiPop(kJSCallerSaved | r0.bit());
__ mtlr(r0);
@@ -1226,11 +1226,10 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
// Save callee saved registers on the stack.
__ MultiPush(kCalleeSaved);
- // Floating point regs FPR0 - FRP13 are volatile
- // FPR14-FPR31 are non-volatile, but sub-calls will save them for us
-
- // int offset_to_argv = kPointerSize * 22; // matches (22*4) above
- // __ lwz(r7, MemOperand(sp, offset_to_argv));
+ // Save callee-saved double registers.
+ __ MultiPushDoubles(kCalleeSavedDoubles);
+ // Set up the reserved register for 0.0.
+ __ LoadDoubleLiteral(kDoubleRegZero, 0.0, r0);
// Push a frame with special values setup to mark it as an entry frame.
// r3: code entry
@@ -1352,20 +1351,16 @@ void JSEntryStub::Generate(MacroAssembler* masm) {
// Reset the stack to the callee saved registers.
__ addi(sp, sp, Operand(-EntryFrameConstants::kCallerFPOffset));
-// Restore callee-saved registers and return.
-#ifdef DEBUG
- if (FLAG_debug_code) {
- Label here;
- __ b(&here, SetLK);
- __ bind(&here);
- }
-#endif
+ // Restore callee-saved double registers.
+ __ MultiPopDoubles(kCalleeSavedDoubles);
+ // Restore callee-saved registers.
__ MultiPop(kCalleeSaved);
+ // Return
__ LoadP(r0, MemOperand(sp, kStackFrameLRSlot * kPointerSize));
- __ mtctr(r0);
- __ bctr();
+ __ mtlr(r0);
+ __ blr();
}
« no previous file with comments | « src/ppc/code-stubs-ppc.h ('k') | src/ppc/frames-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698