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: [power7-meissner] Add __builtin_bswap{16,64} support to powerpc


On Thu, Jun 11, 2009 at 05:59:03PM -0400, Andrew Pinski wrote:
> On Thu, Jun 11, 2009 at 5:51 PM, Michael
> Meissner<meissner@linux.vnet.ibm.com> wrote:
> > Well it would be helpful to attach the patch.
> 
> Hmm, is there a reason why you made __builtin_bswap16 a target specific builtin?
> From looking at
> http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00080.html, it seems like
> there is no reason why you need a __builtin_bswap16.

Mostly for consistancy, since it is easier to tell the users to use
bswap16/bswap32/bswap64, then to tell the users to use a funny macro for
bswap16.  As I said on IRC, I suspect the ISO C rules about integer promotion
will get in the way for short types (except on a 16-bit machine of course).

As to why not push a bswap16 for everybody, it could be done.  I, just needed a
solution right now to push out to a customer.

-- 
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]