mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-27 20:14:27 +01:00
12 lines
250 B
ArmAsm
12 lines
250 B
ArmAsm
/* https://github.com/cirosantilli/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
|