Messages in this thread | | | From | "Woodhouse, David" <> | Subject | Re: [RFC] arm: use built-in byte swap function | Date | Tue, 29 Jan 2013 14:43:23 +0000 |
| |
On Tue, 2013-01-29 at 14:13 +0000, Russell King - ARM Linux wrote: > > So, this compiler (4.5.4) has support for 32-bit and 64-bit bswaps > across all our architectures, but not the 16-bit ones.
That observation is consistent with my dig through GCC history. I had come to the conclusion that the 32-bit and 64-bit versions were added *generically* in 4.4, and that the 16-bit version was added in 4.6 to that PowerPC back end, and made generic in 4.8. So I *had* put that arch-specific check into compiler-gcc4.h, for PowerPC. It's just outside the context of Kim's patch. If it really does end up being different for every arch, I may reconsider that.
As for the __bswapsi2() calls... if it's ever emitting an out-of-line call for something like that, that seems like a really dubious decision; surely it's better being inlined? So rather than adding it to your bits-of-libgcc.a in the kernel, I'd suggest just *not* using ARCH_USE_BUILTIN_BSWAP for the offending compilers, and filing a bug to get them fixed.
But really, this is why I created ARCH_USE_BUILTIN_BSWAP and left it to architecture maintainers to enable it at their leisure.... :)
-- Sent with MeeGo's ActiveSync support.
David Woodhouse Open Source Technology Centre David.Woodhouse@intel.com Intel Corporation
[unhandled content-type:application/x-pkcs7-signature] | |