This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC, patch] implement __builtin_bswap
- From: Andrew Pinski <pinskia at physics dot uc dot edu>
- To: Eric Christopher <echristo at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 11 Jul 2006 21:02:20 +0900
- Subject: Re: [RFC, patch] implement __builtin_bswap
- References: <44B30440.2080607@apple.com>
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