This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/53199] __builtin_bswap64 and __builtin_bswap32 generate errors if -mcpu=power6


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]