MIPS: Save and restore callee-saved FP registers in cctest/ConvertDToI.
Correctly save and restore FP registers in cctest/ConvertDToI to avoid accidental register overwriting by the generated code. Note: This failure is manifested only in R6 mode. TEST=test/cctest/interpreter/test-interpreter BUG= Review URL: https://codereview.chromium.org/1337023002 Cr-Commit-Position: refs/heads/master@{#30700}
This commit is contained in:
parent
d1ca012157
commit
a795aa350f
@ -62,6 +62,11 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
|
|||||||
// Save callee save registers.
|
// Save callee save registers.
|
||||||
__ MultiPush(kCalleeSaved | ra.bit());
|
__ MultiPush(kCalleeSaved | ra.bit());
|
||||||
|
|
||||||
|
// Save callee-saved FPU registers.
|
||||||
|
__ MultiPushFPU(kCalleeSavedFPU);
|
||||||
|
// Set up the reserved register for 0.0.
|
||||||
|
__ Move(kDoubleRegZero, 0.0);
|
||||||
|
|
||||||
// For softfp, move the input value into f12.
|
// For softfp, move the input value into f12.
|
||||||
if (IsMipsSoftFloatABI) {
|
if (IsMipsSoftFloatABI) {
|
||||||
__ Move(f12, a0, a1);
|
__ Move(f12, a0, a1);
|
||||||
@ -117,6 +122,9 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
|
|||||||
__ Branch(&ok, eq, v0, Operand(zero_reg));
|
__ Branch(&ok, eq, v0, Operand(zero_reg));
|
||||||
__ bind(&ok);
|
__ bind(&ok);
|
||||||
|
|
||||||
|
// Restore callee-saved FPU registers.
|
||||||
|
__ MultiPopFPU(kCalleeSavedFPU);
|
||||||
|
|
||||||
// Restore callee save registers.
|
// Restore callee save registers.
|
||||||
__ MultiPop(kCalleeSaved | ra.bit());
|
__ MultiPop(kCalleeSaved | ra.bit());
|
||||||
|
|
||||||
|
@ -62,6 +62,11 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
|
|||||||
// Save callee save registers.
|
// Save callee save registers.
|
||||||
__ MultiPush(kCalleeSaved | ra.bit());
|
__ MultiPush(kCalleeSaved | ra.bit());
|
||||||
|
|
||||||
|
// Save callee-saved FPU registers.
|
||||||
|
__ MultiPushFPU(kCalleeSavedFPU);
|
||||||
|
// Set up the reserved register for 0.0.
|
||||||
|
__ Move(kDoubleRegZero, 0.0);
|
||||||
|
|
||||||
// For softfp, move the input value into f12.
|
// For softfp, move the input value into f12.
|
||||||
if (IsMipsSoftFloatABI) {
|
if (IsMipsSoftFloatABI) {
|
||||||
__ Move(f12, a0, a1);
|
__ Move(f12, a0, a1);
|
||||||
@ -117,6 +122,9 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate,
|
|||||||
__ Branch(&ok, eq, v0, Operand(zero_reg));
|
__ Branch(&ok, eq, v0, Operand(zero_reg));
|
||||||
__ bind(&ok);
|
__ bind(&ok);
|
||||||
|
|
||||||
|
// Restore callee-saved FPU registers.
|
||||||
|
__ MultiPopFPU(kCalleeSavedFPU);
|
||||||
|
|
||||||
// Restore callee save registers.
|
// Restore callee save registers.
|
||||||
__ MultiPop(kCalleeSaved | ra.bit());
|
__ MultiPop(kCalleeSaved | ra.bit());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user