Bug 234367

Summary: Use arm64's fmax/fmin instructions in Wasm
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: RESOLVED FIXED    
Severity: Normal CC: ews-watchlist, keith_miller, mark.lam, msaboff, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch none

Description Saam Barati 2021-12-15 14:26:33 PST
...
Comment 1 Saam Barati 2021-12-16 12:28:01 PST
Created attachment 447383 [details]
patch
Comment 2 EWS Watchlist 2021-12-16 12:29:19 PST
This patch modifies one of the wasm.json files. Please ensure that any changes in one have been mirrored to the other. You can find the wasm.json files at "Source/JavaScriptCore/wasm/wasm.json" and "JSTests/wasm/wasm.json".
Comment 3 Keith Miller 2021-12-16 12:41:59 PST
Comment on attachment 447383 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=447383&action=review

R=me with nit

> Source/JavaScriptCore/b3/B3Common.h:163
> +        return a + b;

nit: Why not just return PNaN? This makes me think I forgot how adding nans work lol.
Comment 4 Keith Miller 2021-12-16 12:42:14 PST
Comment on attachment 447383 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=447383&action=review

R=me with nit

> Source/JavaScriptCore/b3/B3Common.h:163
> +        return a + b;

nit: Why not just return PNaN? This makes me think I forgot how adding nans work lol.
Comment 5 Saam Barati 2021-12-16 15:00:16 PST
Comment on attachment 447383 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=447383&action=review

>>> Source/JavaScriptCore/b3/B3Common.h:163
>>> +        return a + b;
>> 
>> nit: Why not just return PNaN? This makes me think I forgot how adding nans work lol.
> 
> nit: Why not just return PNaN? This makes me think I forgot how adding nans work lol.

I’m just copying what we do at runtime on x86 in the generated code so hopefully the bits might stay the same even if not guaranteed or required to.
Comment 6 EWS 2021-12-16 15:31:38 PST
Committed r287160 (245337@main): <https://commits.webkit.org/245337@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 447383 [details].
Comment 7 Radar WebKit Bug Importer 2021-12-16 18:40:54 PST
<rdar://problem/86608449>