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

23 lines
430 B
ArmAsm

/* https://github.com/cirosantilli/linux-kernel-module-cheat#x86-string-instructions */
# # movs
# Copy one string into another.
# Input pointed by esi, output by edi.
#include <lkmc.h>
.section .rodata
src: .quad 1, 2
.bss
dest: .skip 16
LKMC_PROLOGUE
cld
lea src(%rip), %rsi
lea dest(%rip), %rdi
movsq
movsq
LKMC_ASSERT_EQ(dest + 0, $1)
LKMC_ASSERT_EQ(dest + 8, $2)
LKMC_EPILOGUE