diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2025-06-11 14:12:33 +0200 |
---|---|---|
committer | Uros Bizjak <ubizjak@gmail.com> | 2025-06-11 16:19:57 +0200 |
commit | 76cbd678d123ed93f99c4c52456bc14290f19b7f (patch) | |
tree | 40d647ce4a630cbc813414776069bea21832ed5e /libstdc++-v3 | |
parent | 94e0f29b6b216a85a03b732a90f900b8b0e99c6b (diff) | |
download | gcc-76cbd678d123ed93f99c4c52456bc14290f19b7f.zip gcc-76cbd678d123ed93f99c4c52456bc14290f19b7f.tar.gz gcc-76cbd678d123ed93f99c4c52456bc14290f19b7f.tar.bz2 |
i386: Fix signed integer overflow in ix86_expand_int_movcc [PR120604]
Patch for PR120553 enabled full 64-bit DImode immediates in
ix86_expand_int_movcc. However, the function calculates the difference
between two immediate arguments using signed 64-bit HOST_WIDE_INT
subtractions that can cause signed integer overflow.
Avoid the overflow by casting operands of subtractions to
(unsigned HOST_WIDE_INT).
PR target/120604
gcc/ChangeLog:
* config/i386/i386-expand.cc (ix86_expand_int_movcc): Cast operands of
signed 64-bit HOST_WIDE_INT subtractions to (unsigned HOST_WIDE_INT).
Diffstat (limited to 'libstdc++-v3')
0 files changed, 0 insertions, 0 deletions