mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 19:21:35 +01:00
12 lines
243 B
ArmAsm
12 lines
243 B
ArmAsm
/* https://cirosantilli.com/linux-kernel-module-cheat#x86-exchange-instructions */
|
|
|
|
#include <lkmc.h>
|
|
|
|
LKMC_PROLOGUE
|
|
mov $1, %rax
|
|
mov $2, %rbx
|
|
xadd %rbx, %rax
|
|
LKMC_ASSERT_EQ(%rax, $3)
|
|
LKMC_ASSERT_EQ(%rbx, $1)
|
|
LKMC_EPILOGUE
|