author | Douglas Crosher <dtc-moz@scieneer.com> |
Fri, 19 Apr 2013 22:40:28 +1000 | |
changeset 140613 | 068fa0fc90642854c2e82d6e6d295408ab7bdea1 |
parent 140612 | 8e57ba27d6dd53136fd239d024af0333c900d498 |
child 140614 | 24644ba49ce594832745a12100734573a8e94d9a |
push id | 2579 |
push user | akeybl@mozilla.com |
push date | Mon, 24 Jun 2013 18:52:47 +0000 |
treeherder | mozilla-beta@b69b7de8a05a [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jandem |
bugs | 814179 |
milestone | 23.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
js/src/ion/BaselineIC.cpp | file | annotate | diff | comparison | revisions | |
js/src/ion/arm/BaselineIC-arm.cpp | file | annotate | diff | comparison | revisions |
--- a/js/src/ion/BaselineIC.cpp +++ b/js/src/ion/BaselineIC.cpp @@ -2493,17 +2493,18 @@ DoBinaryArithFallback(JSContext *cx, Bas default: break; } } // TODO: unlink previous !allowDouble stub. if (lhs.isInt32() && rhs.isInt32()) { bool allowDouble = ret.isDouble(); - IonSpew(IonSpew_BaselineIC, " Generating %s(Int32, Int32) stub", js_CodeName[op]); + IonSpew(IonSpew_BaselineIC, " Generating %s(Int32, Int32%s) stub", js_CodeName[op], + allowDouble ? " => Double" : ""); ICBinaryArith_Int32::Compiler compilerInt32(cx, op, allowDouble); ICStub *int32Stub = compilerInt32.getStub(compilerInt32.getStubSpace(script)); if (!int32Stub) return false; stub->addNewStub(int32Stub); return true; }
--- a/js/src/ion/arm/BaselineIC-arm.cpp +++ b/js/src/ion/arm/BaselineIC-arm.cpp @@ -173,19 +173,32 @@ ICBinaryArith_Int32::Compiler::generateS case JSOP_RSH: masm.ma_and(Imm32(0x1F), R1.payloadReg(), R1.payloadReg()); masm.ma_asr(R1.payloadReg(), R0.payloadReg(), R0.payloadReg()); break; case JSOP_URSH: masm.ma_and(Imm32(0x1F), R1.payloadReg(), scratchReg); masm.ma_lsr(scratchReg, R0.payloadReg(), scratchReg); masm.ma_cmp(scratchReg, Imm32(0)); - masm.j(Assembler::LessThan, &failure); - // Move result for return. - masm.mov(scratchReg, R0.payloadReg()); + if (allowDouble_) { + Label toUint; + masm.j(Assembler::LessThan, &toUint); + + // Move result and box for return. + masm.mov(scratchReg, R0.payloadReg()); + EmitReturnFromIC(masm); + + masm.bind(&toUint); + masm.convertUInt32ToDouble(scratchReg, ScratchFloatReg); + masm.boxDouble(ScratchFloatReg, R0); + } else { + masm.j(Assembler::LessThan, &failure); + // Move result for return. + masm.mov(scratchReg, R0.payloadReg()); + } break; default: JS_NOT_REACHED("Unhandled op for BinaryArith_Int32."); return false; } EmitReturnFromIC(masm);