[Webkit-unassigned] [Bug 232951] Prevent fused multiply add during ParseInt

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 10 17:19:24 PST 2021


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

--- Comment #10 from Mikhail R. Gadelha <mikhail at igalia.com> ---
(In reply to Yusuke Suzuki from comment #9)
> Comment on attachment 443839 [details]
> 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")))`.

-- 
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/20211111/38a9ec87/attachment.htm>


More information about the webkit-unassigned mailing list