Files
linux-kernel-module-cheat/userland/arch/x86_64/neg.S
2019-06-12 00:00:00 +00:00

15 lines
273 B
ArmAsm

/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-binary-arithmetic-instructions
*
* Negate: i *= -1.
*/
#include <lkmc.h>
LKMC_PROLOGUE
mov $2, %rax
neg %rax
LKMC_ASSERT_EQ(%rax, $-2)
neg %eax
LKMC_ASSERT_EQ(%rax, $2)
LKMC_EPILOGUE