[Webkit-unassigned] [Bug 154725] New: [DFG] DFG ArithRound for non-zero-case is incorrect for negative numbers in x86
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 26 06:10:32 PST 2016
https://bugs.webkit.org/show_bug.cgi?id=154725
Bug ID: 154725
Summary: [DFG] DFG ArithRound for non-zero-case is incorrect
for negative numbers in x86
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: utatane.tea at gmail.com
We use branchTruncateDoubleToInt32, it emits cvttsd2si_rr.
But its rounding mode is not floor.
The test case is the following.
function mathRoundDoesNotCareAboutMinusZero(value)
{
return Math.round(value)|0;
}
noInline(mathRoundDoesNotCareAboutMinusZero);
for (var i = 0; i < 1e4; ++i) {
var doubleMid = -9901 - 0.6;
var roundedValue = mathRoundDoesNotCareAboutMinusZero(doubleMid);
print(doubleMid, roundedValue);
if (roundedValue !== -9902)
throw "mathRoundDoesNotCareAboutMinusZero(" + doubleMid + ") = " + roundedValue;
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160226/d6118170/attachment.html>
More information about the webkit-unassigned
mailing list