Messages in this thread | | | From | "Woodhouse, David" <> | Subject | Re: [RFC] arm: use built-in byte swap function | Date | Tue, 29 Jan 2013 15:10:43 +0000 |
| |
On Tue, 2013-01-29 at 08:53 -0600, Rob Herring wrote: > If you specify to use the builtin's, do you still get inline rev > instructions emitted?
You mean from the architecture's __arch_swab32() et al. macros?
No. If the architecture enables ARCH_USE_BUILTIN_BSWAP and the compiler version checks indicate that the correspondingly-sized builtin is available, then the builtin will be used. Only if the arch *doesn't* set ARCH_USE_BUILTIN_BSWAP, or if the compiler is old enough not to have the corresponding intrinsic, will the inline assembler in the __arch_swabXX macros get used.
Note, however, that there is no such compiler intrinsic for swahb32(), which is where rev16 gets used. That's still being left to the inline asm in all cases.
-- 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] | |