Commit 6debe59f authored by balazs.kilvady's avatar balazs.kilvady Committed by Commit bot

MIPS: Fix 'MIPS: Support r6 max, min floating point instructions.'

Port d4a391bb

Add SmiTag()/smiUntag() calls to make values on stack GC-safe.

Original commit message:
Use macro instructions for min, max ops to get the same functionality on
pre-r6 and r6 targets.

BUG=chromium:598651
LOG=N

Review URL: https://codereview.chromium.org/1842833002

Cr-Commit-Position: refs/heads/master@{#35130}
parent 75602673
......@@ -180,6 +180,8 @@ void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
{
// Parameter is not a Number, use the ToNumberStub to convert it.
FrameScope scope(masm, StackFrame::INTERNAL);
__ SmiTag(a0);
__ SmiTag(a3);
__ Push(a0, a1, a3);
__ mov(a0, a2);
ToNumberStub stub(masm->isolate());
......@@ -196,6 +198,8 @@ void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
__ SmiToDoubleFPURegister(a1, f0, t0);
__ bind(&done_restore);
}
__ SmiUntag(a3);
__ SmiUntag(a0);
}
__ jmp(&convert);
__ bind(&convert_number);
......
......@@ -179,6 +179,8 @@ void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
{
// Parameter is not a Number, use the ToNumberStub to convert it.
FrameScope scope(masm, StackFrame::INTERNAL);
__ SmiTag(a0);
__ SmiTag(a3);
__ Push(a0, a1, a3);
__ mov(a0, a2);
ToNumberStub stub(masm->isolate());
......@@ -195,6 +197,8 @@ void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
__ SmiToDoubleFPURegister(a1, f0, a4);
__ bind(&done_restore);
}
__ SmiUntag(a3);
__ SmiUntag(a0);
}
__ jmp(&convert);
__ bind(&convert_number);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment