aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/c.zig
diff options
context:
space:
mode:
authorxtex <xtexchooser@duck.com>2025-01-18 21:59:00 +0800
committerBingwu Zhang <xtex@aosc.io>2025-03-02 10:30:32 +0800
commit4e32193de33df13a90499bc4b678b4b69716018c (patch)
treeb16e0c98c4face146e72d080d4c4659536277361 /src/codegen/c.zig
parent6c3cbb0c87a33f4ae408874f6ceb40e372b65914 (diff)
downloadzig-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/codegen/c.zig')
0 files changed, 0 insertions, 0 deletions