ppc 64-bit clean-up
Alexandre Oliva
aoliva@redhat.com
Thu Mar 29 23:36:00 GMT 2001
A cross-assembler to ppc on a host with 64-bit longs fails to
assemble:
rlwinm 22,22,28,0xf0000000
because the signed int (1 << 31) is sign-extended to long, resulting
in an incorrect bit pattern. Even worse: if `int's were 16-bits wide,
this would invoke undefined behavior.
This patch fixes it, casting the 1 to long, as done in other nearby
constructs. I'm checking this in as obviously correct.
More information about the Binutils
mailing list