1#include <linux/linkage.h> 2 3#if __LINUX_ARM_ARCH__ >= 6 4ENTRY(__bswapsi2) 5 rev r0, r0 6 bx lr 7ENDPROC(__bswapsi2) 8 9ENTRY(__bswapdi2) 10 rev r3, r0 11 rev r0, r1 12 mov r1, r3 13 bx lr 14ENDPROC(__bswapdi2) 15#else 16ENTRY(__bswapsi2) 17 eor r3, r0, r0, ror #16 18 mov r3, r3, lsr #8 19 bic r3, r3, #0xff00 20 eor r0, r3, r0, ror #8 21 mov pc, lr 22ENDPROC(__bswapsi2) 23 24ENTRY(__bswapdi2) 25 mov ip, r1 26 eor r3, ip, ip, ror #16 27 eor r1, r0, r0, ror #16 28 mov r1, r1, lsr #8 29 mov r3, r3, lsr #8 30 bic r3, r3, #0xff00 31 bic r1, r1, #0xff00 32 eor r1, r1, r0, ror #8 33 eor r0, r3, ip, ror #8 34 mov pc, lr 35ENDPROC(__bswapdi2) 36#endif 37