mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
23 lines
430 B
ArmAsm
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
|