diff options
| author | xtex <xtexchooser@duck.com> | 2025-01-18 21:59:00 +0800 |
|---|---|---|
| committer | Bingwu Zhang <xtex@aosc.io> | 2025-03-02 10:30:32 +0800 |
| commit | 4e32193de33df13a90499bc4b678b4b69716018c (patch) | |
| tree | b16e0c98c4face146e72d080d4c4659536277361 /src/Compilation.zig | |
| parent | 6c3cbb0c87a33f4ae408874f6ceb40e372b65914 (diff) | |
| download | zig-4e32193de33df13a90499bc4b678b4b69716018c.tar.gz zig-4e32193de33df13a90499bc4b678b4b69716018c.zip | |
x86_64: implement integer saturating left shifting codegen
Simliarly to shl_with_overflow, we first SHL/SAL the integer, then
SHR/SAR it back to compare if overflow happens.
If overflow happened, set result to the upper limit to make it saturating.
Bug: #17645
Co-authored-by: Jacob Young <jacobly0@users.noreply.github.com>
Signed-off-by: Bingwu Zhang <xtex@aosc.io>
Diffstat (limited to 'src/Compilation.zig')
0 files changed, 0 insertions, 0 deletions
