[Webkit-unassigned] [Bug 179446] [JSC][MIPS] Use fcsr to check the validity of the result of trunc.w.d

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 13 16:17:59 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=179446

--- Comment #12 from Guillaume Emont <guijemont at igalia.com> ---
(In reply to Adrian Perez from comment #6)
> Also, shouldn't we rather be checking “fcsr” as well for other *.w.[sd]
> conversion instructions? (like ceil.*.*, cvt.*.*, floor.*.*, and round.*.*)
> From a quick look, that would affect “branchConvertDoubleToInt32()” (which
> uses the cvt.*.* instructions).

After looking at the code, I think that branchConvertDoubleToInt32() is the only similar case, and it looks much safer as we don't rely on the return value to tell us that something went wrong in a similar way.
I wrote some tests in testmasm to make sure of that and they pass. Not sure it's worth upstreaming these tests though, especially since they are somewhat platform-specific (a platform can decide to fail (i.e. branch) for specific values it does not handle well, and I suspect this can differ from platform to platform).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171114/7d448d50/attachment.html>


More information about the webkit-unassigned mailing list