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.

Attachment: bswap16.patch
Description: Binary data

Reply via email to