Bug 256569

Summary: Fix signed division bias for power-of-two divisor in BBQ JIT
Product: WebKit Reporter: David Degazio <d_degazio>
Component: WebAssemblyAssignee: David Degazio <d_degazio>
Status: RESOLVED FIXED    
Severity: Normal CC: mark.lam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

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.