1 /* Copyright 2002 Andi Kleen */
3 #include <linux/linkage.h>
4 #include <asm/dwarf2.h>
5 #include <asm/cpufeature.h>
8 * memcpy - Copy a memory block.
16 * rax original destination
37 CFI_ADJUST_CFA_OFFSET 8
106 CFI_ADJUST_CFA_OFFSET -8
114 /* Some CPUs run faster using the string copy instructions.
115 It is also a lot simpler. Use this when possible */
117 .section .altinstr_replacement,"ax"
118 1: .byte 0xeb /* jmp <disp8> */
119 .byte (memcpy_c - memcpy) - (2f - 1b) /* offset */
122 .section .altinstructions,"a"
126 .byte X86_FEATURE_REP_GOOD
127 /* Replace only beginning, memcpy is used to apply alternatives, so it
128 * is silly to overwrite itself with nops - reboot is only outcome... */