[Bug target/115875] -Oz optimization of "push IMM; pop REG" is used incorrectly for 64-bit constants with 31th bit set
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 11 17:30:32 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115875
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
"1" (0x00000000ffffffff)
says pass unsigned int (32bit register) here to the inline-asm. The other upper
bits of the register is not defined; only lower 32bit is defined.
Since 0x00000000ffffffff fits in `unsigned int`. If you want a 64bit, an
unsigned long (or unsigned long long) use either a cast or use ull suffix to be
more excplit.
More information about the Gcc-bugs
mailing list