Commit 70331f67 authored by erik.corry@gmail.com's avatar erik.corry@gmail.com

ARM: Don't always go into the runtime system just because a

mul gave zero.
Review URL: http://codereview.chromium.org/151144

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2318 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 25405ddd
......@@ -5334,7 +5334,13 @@ void GenericBinaryOpStub::Generate(MacroAssembler* masm) {
__ tst(r3, Operand(r3));
__ mov(r0, Operand(r3), LeaveCC, ne);
__ Ret(ne);
// Slow case.
// We need -0 if we were multiplying a negative number with 0 to get 0.
// We know one of them was zero.
__ add(r2, r0, Operand(r1), SetCC);
__ mov(r0, Operand(Smi::FromInt(0)), LeaveCC, pl);
__ Ret(pl); // Return Smi 0 if the non-zero one was positive.
// Slow case. We fall through here if we multiplied a negative number
// with 0, because that would mean we should produce -0.
__ bind(&slow);
HandleBinaryOpSlowCases(masm,
......
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