x86: Make alternative instruction pointers relative
This save a few bytes on x86-64 and means that future patches can apply alternatives to unrelocated code. Signed-off-by: Andy Lutomirski <luto@mit.edu> Link: http://lkml.kernel.org/r/ff64a6b9a1a3860ca4a7b8b6dc7b4754f9491cd7.1310563276.git.luto@mit.edu Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
committed by
H. Peter Anvin
parent
c9712944b2
commit
59e97e4d6f
@ -9,6 +9,7 @@
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/dwarf2.h>
|
||||
#include <asm/cpufeature.h>
|
||||
#include <asm/alternative-asm.h>
|
||||
|
||||
#undef memmove
|
||||
|
||||
@ -214,11 +215,9 @@ ENTRY(memmove)
|
||||
.previous
|
||||
|
||||
.section .altinstructions,"a"
|
||||
.align 8
|
||||
.quad .Lmemmove_begin_forward
|
||||
.quad .Lmemmove_begin_forward_efs
|
||||
.word X86_FEATURE_ERMS
|
||||
.byte .Lmemmove_end_forward-.Lmemmove_begin_forward
|
||||
.byte .Lmemmove_end_forward_efs-.Lmemmove_begin_forward_efs
|
||||
altinstruction_entry .Lmemmove_begin_forward, \
|
||||
.Lmemmove_begin_forward_efs,X86_FEATURE_ERMS, \
|
||||
.Lmemmove_end_forward-.Lmemmove_begin_forward, \
|
||||
.Lmemmove_end_forward_efs-.Lmemmove_begin_forward_efs
|
||||
.previous
|
||||
ENDPROC(memmove)
|
||||
|
Reference in New Issue
Block a user