[Webkit-unassigned] [Bug 232951] Prevent fused multiply add during ParseInt
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Nov 11 21:12:12 PST 2021
https://bugs.webkit.org/show_bug.cgi?id=232951
--- Comment #11 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 443839
--> https://bugs.webkit.org/attachment.cgi?id=443839
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=443839&action=review
>>>>> Source/JavaScriptCore/runtime/ParseInt.h:113
>>>>> +#pragma GCC optimize ("O0")
>>>>
>>>> 1. Why not only disabling fp-contract? We do not need to disable all optimizations. (See comment https://bugs.webkit.org/show_bug.cgi?id=232951#c5)
>>>> 2. Why not using function attribute?
>>>> 3. Use it only for GCC. Clang does not need this.
>>>
>>> I just tried adding `__attribute__((optimize("fp-contract=off")))` locally to the function definition and gcc seems to ignore it, i.e., it generates de fma and the test fails.
>>
>> Did you try `GCC optimize` pragma and "fp-contract=off" combination?
>
> yep, I'm passing `-ffp-contract=off` in the command line and tried it with both `__attribute__((optimize("fp-contract=off")))` and `__attribute__((optimize("-ffp-contract=off")))`. Neither worked.
>
> Maybe it's not working because of the inline attribute? gcc seems to be gracefully ignoring the attribute.
>
> I only got it to work it either the `volatile` or `__attribute__((optimize("O0")))`.
OK, so at this point, I think the best way is annotating this double with `volatile` *only when it is GCC*. Can you change it? And can you describe the above reasoning in the ChangeLog? (e.g. optimize attribute didn't work etc.).
--
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/20211112/6b3aad56/attachment.htm>
More information about the webkit-unassigned
mailing list