From c73e36b775a777abd67a1e15481923fcbd2040e1 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 3 Jul 2015 22:19:02 +0200 Subject: x86/asm/entry/32: Replace RESTORE_RSI_RDI with open-coded 32-bit reads This doesn't change much, but uses shorter 32-bit insns: -48 8b 74 24 68 mov 0x68(%rsp),%rsi -48 8b 7c 24 70 mov 0x70(%rsp),%rdi -48 8b 54 24 60 mov 0x60(%rsp),%rdx +8b 54 24 60 mov 0x60(%rsp),%edx +8b 74 24 68 mov 0x68(%rsp),%esi +8b 7c 24 70 mov 0x70(%rsp),%edi and does the loads in pt_regs order. Since these are the only uses of RESTORE_RSI_RDI[_RDX], drop these macros. Signed-off-by: Denys Vlasenko Cc: Alexei Starovoitov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Will Drewry Link: http://lkml.kernel.org/r/1435954742-2545-1-git-send-email-dvlasenk@redhat.com Signed-off-by: Ingo Molnar --- arch/x86/entry/calling.h | 6 ------ 1 file changed, 6 deletions(-) (limited to 'arch/x86/entry/calling.h') diff --git a/arch/x86/entry/calling.h b/arch/x86/entry/calling.h index f4e6308c4200..519207f2ee76 100644 --- a/arch/x86/entry/calling.h +++ b/arch/x86/entry/calling.h @@ -193,12 +193,6 @@ For 32-bit we have the following conventions - kernel is built with .macro RESTORE_C_REGS_EXCEPT_RCX_R11 RESTORE_C_REGS_HELPER 1,0,0,1,1 .endm - .macro RESTORE_RSI_RDI - RESTORE_C_REGS_HELPER 0,0,0,0,0 - .endm - .macro RESTORE_RSI_RDI_RDX - RESTORE_C_REGS_HELPER 0,0,0,0,1 - .endm .macro REMOVE_PT_GPREGS_FROM_STACK addskip=0 subq $-(15*8+\addskip), %rsp -- cgit