Bug 173471

Summary: WebAssembly: implement non-trapping float to int conversion
Product: WebKit Reporter: JF Bastien <jfbastien>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: binji, chi187, ews-watchlist, fpizlo, jfbastien, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
WIP Patch
none
WIP saturate float-to-int conversions
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch tzagallo: review+

JF Bastien
Reported 2017-06-16 08:53:49 PDT
As described here: https://github.com/WebAssembly/design/pull/1089 This is a post-MVP feature.
Attachments
WIP Patch (12.03 KB, patch)
2021-02-07 06:38 PST, Sergey Rubanov
no flags
WIP saturate float-to-int conversions (11.93 KB, patch)
2021-02-11 11:00 PST, Sergey Rubanov
no flags
Patch (302.43 KB, patch)
2021-02-16 05:52 PST, Yusuke Suzuki
no flags
Patch (302.16 KB, patch)
2021-02-16 06:01 PST, Yusuke Suzuki
no flags
Patch (302.42 KB, patch)
2021-02-16 06:09 PST, Yusuke Suzuki
no flags
Patch (300.01 KB, patch)
2021-02-16 06:12 PST, Yusuke Suzuki
no flags
Patch (300.03 KB, patch)
2021-02-16 07:09 PST, Yusuke Suzuki
tzagallo: review+
Darin Adler
Comment 1 2020-11-04 11:49:27 PST
*** Bug 210300 has been marked as a duplicate of this bug. ***
Sergey Rubanov
Comment 2 2021-02-07 06:38:49 PST
Created attachment 419538 [details] WIP Patch
EWS Watchlist
Comment 3 2021-02-07 06:39:58 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".
Sergey Rubanov
Comment 4 2021-02-11 11:00:12 PST
Created attachment 420006 [details] WIP saturate float-to-int conversions
Yusuke Suzuki
Comment 5 2021-02-16 05:52:27 PST
Yusuke Suzuki
Comment 6 2021-02-16 06:01:33 PST
Yusuke Suzuki
Comment 7 2021-02-16 06:09:48 PST
Yusuke Suzuki
Comment 8 2021-02-16 06:12:01 PST
Yusuke Suzuki
Comment 9 2021-02-16 07:09:37 PST
Tadeu Zagallo
Comment 10 2021-02-16 08:22:10 PST
Comment on attachment 420469 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420469&action=review r=me > Source/JavaScriptCore/llint/WebAssembly.asm:1376 > + move 0xcf000000, t0 # INT32_MIN (Note that INT32_MIN - 1.0 in float is the same as INT32_MIN in float). why not use constexpr here?
Yusuke Suzuki
Comment 11 2021-02-16 13:27:36 PST
Comment on attachment 420469 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420469&action=review >> Source/JavaScriptCore/llint/WebAssembly.asm:1376 >> + move 0xcf000000, t0 # INT32_MIN (Note that INT32_MIN - 1.0 in float is the same as INT32_MIN in float). > > why not use constexpr here? This is because we cannot use bitwise_cast / union in constexpr. This is bit pattern of float in INTT32_MIN.
Yusuke Suzuki
Comment 12 2021-02-16 15:30:53 PST
Radar WebKit Bug Importer
Comment 13 2021-02-16 15:31:15 PST
Note You need to log in before you can comment on or make changes to this bug.