mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
x86 asm: move bswap from x86-assembly-cheat
This commit is contained in:
13
userland/arch/x86_64/bswap.S
Normal file
13
userland/arch/x86_64/bswap.S
Normal file
@@ -0,0 +1,13 @@
|
||||
# # bswap
|
||||
|
||||
# Little endian <=> big endian.
|
||||
|
||||
#include <lkmc.h>
|
||||
|
||||
LKMC_PROLOGUE
|
||||
|
||||
mov $0x12345678, %eax
|
||||
bswapl %eax
|
||||
LKMC_ASSERT_EQ_32(%eax, $0x78563412)
|
||||
|
||||
LKMC_EPILOGUE
|
||||
Reference in New Issue
Block a user