Re: [xstormy16 PATCH] Add support for byte and word swapping instructions.

2023-04-25 Thread Jeff Law via Gcc-patches
On 4/25/23 14:20, Roger Sayle wrote: This patch adds support for xstormy16's swpb (swap bytes) and swpw (swap words) instructions. The most obvious application of these to implement the __builtin_bswap16 and __builtin_bswap32 intrinsics. Currently, __builtin_bswap16 is implemented as: foo:

[xstormy16 PATCH] Add support for byte and word swapping instructions.

2023-04-25 Thread Roger Sayle
This patch adds support for xstormy16's swpb (swap bytes) and swpw (swap words) instructions. The most obvious application of these to implement the __builtin_bswap16 and __builtin_bswap32 intrinsics. Currently, __builtin_bswap16 is implemented as: foo:mov r7,r2 shl r7,#8