[Patch ARM] implement bswap16

Christophe Lyon christophe.lyon@linaro.org
Wed Sep 5 16:02:00 GMT 2012


Hi,

This patch implements __builtin_bswap16() on ARM (v6 and above) using
revsh with a signed input and rev16 with an unsigned input.

It is pretty much equal to the patch posted some time ago
http://gcc.gnu.org/ml/gcc-patches/2012-04/msg00962.html, but it's hard
to write such patterns differently ;-)

I have added a testcase.

OK for trunk?

Christophe.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bswap16.patch
Type: application/octet-stream
Size: 2564 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120905/c23015d5/attachment.obj>


More information about the Gcc-patches mailing list