x86/asm/entry: Clear EXTRA_REGS for all executable formats
[firefly-linux-kernel-4.4.55.git] / arch / x86 / include / asm / calling.h
index 4b5f7bf2b7809575646ed47012e84c4276785e6f..1c8b50edb2db3cac8f54c0c300d393b18bf24342 100644 (file)
@@ -151,6 +151,15 @@ For 32-bit we have the following conventions - kernel is built with
        movq_cfi_restore 5*8+\offset, rbx
        .endm
 
+       .macro ZERO_EXTRA_REGS
+       xorl    %r15d, %r15d
+       xorl    %r14d, %r14d
+       xorl    %r13d, %r13d
+       xorl    %r12d, %r12d
+       xorl    %ebp, %ebp
+       xorl    %ebx, %ebx
+       .endm
+
        .macro RESTORE_C_REGS_HELPER rstor_rax=1, rstor_rcx=1, rstor_r11=1, rstor_r8910=1, rstor_rdx=1
        .if \rstor_r11
        movq_cfi_restore 6*8, r11