This is the mail archive of the gcc-patches@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]

Re: [RFC, patch] implement __builtin_bswap



On Jul 11, 2006, at 10:52 AM, Eric Christopher wrote:


This patch appears to implement all of builtin_bswap for SI and DImodes. I've tested it with mipsisa64-elf, mips-elf, x86-darwin, x86-linux without regressions. A good chunk of my testing was making sure that the hardware implementation for x86 matched the software implementation in libgcc. Any review of the SI and DImode routines in there would be appreciated.

Thoughts? OK for 4.3? Other feedback?

Besides the points that Falk raises, it might be nice to figure out a way to fold
to produce bswap. Even emit it inline instead of calling a function since calling
a function for this case is way too high in my mind.



Even a way to produce lwbrx/stwbrx instructions on PPC, which is harder to do as you don't
want to produce a store just do a load after that because that is much worse than the inlined
scaler version.


Thanks,
Andrew Pinski


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