Files
linux-kernel-module-cheat/userland/arch/arm/rev.S
Ciro Santilli 六四事件 法轮功 5f935ee53d readme: verify all non-README links with asciidoctor/extract-header-ids and git grep
Fix all the ~30 failures it found!
2019-06-09 00:00:00 +00:00

19 lines
387 B
ArmAsm

/* https://github.com/cirosantilli/linux-kernel-module-cheat#arm-data-processing-instructions
*
* Reverse byte order.
*/
#include <lkmc.h>
LKMC_PROLOGUE
/* All bytes in register. */
ldr r0, =0x11223344
rev r1, r0
LKMC_ASSERT_EQ(r1, =0x44332211)
/* Groups of 16-bits. */
ldr r0, =0x11223344
rev16 r1, r0
LKMC_ASSERT_EQ(r1, =0x22114433)
LKMC_EPILOGUE