Bug 256569 - Fix signed division bias for power-of-two divisor in BBQ JIT
Summary: Fix signed division bias for power-of-two divisor in BBQ JIT
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebAssembly (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Degazio
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-05-09 18:58 PDT by David Degazio
Modified: 2023-05-10 12:50 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Degazio 2023-05-09 18:58:45 PDT
rdar://108073980

BBQ JIT currently has special instruction selection when dividing by a power of two - it'll try and use a mask or a shift. However, these operations need a bit of extra help if the dividend is a negative integer, and the current implementation is incorrect, sometimes yielding incorrect results.
Comment 1 David Degazio 2023-05-10 09:59:34 PDT
Pull request: https://github.com/WebKit/WebKit/pull/13698
Comment 2 EWS 2023-05-10 12:50:21 PDT
Committed 263925@main (acb670a0a6d0): <https://commits.webkit.org/263925@main>

Reviewed commits have been landed. Closing PR #13698 and removing active labels.