[Bug target/53199] __builtin_bswap64 and __builtin_bswap32 generate errors if -mcpu=power6
meissner at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed May 2 19:16:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53199
--- Comment #1 from Michael Meissner <meissner at gcc dot gnu.org> 2012-05-02 19:16:26 UTC ---
If you compile the following with -mcpu=power6 -m64:
long long
b64 (long long *p)
{
return __builtin_bswap64 (*p);
}
Using the -mno-avoid-indexed-addresses works around the problem. Setting
cpu=power5 works because -mcpu=power5 does not set -mavoid-indexed-addresses by
default. Setting -mcpu=power7 works because the power7 has a 64-bit load and
reverse bytes instruction.
More information about the Gcc-bugs
mailing list