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]

[power7-meissner] Add __builtin_bswap{16,64} support to powerpc


This patch adds a builtin (__builtin_bswap16) which generates the lhbrx and
sthbrx instructions for 16-bit swaps to/from memory, and supports the
__builtin_bswap64 builtin as well.  If ISA 2.06 is available on 64-bit systems,
then ldbrx and stbrx are generated, if not, then two ldwbrx/stwbrx's are used.

-- 
Michael Meissner, IBM
4 Technology Place Drive, MS 2203A, Westford, MA, 01886, USA
meissner@linux.vnet.ibm.com


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