Skip to content

Commit

Permalink
x86: Unwind-annotate thunk_32.S
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Link: http://lkml.kernel.org/r/542291CA0200007800038085@mail.emea.novell.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Jan Beulich authored and Thomas Gleixner committed Oct 8, 2014
1 parent 5f1d919 commit f74954f
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions arch/x86/lib/thunk_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,34 @@
*/
#include <linux/linkage.h>
#include <asm/asm.h>
#include <asm/dwarf2.h>

/* put return address in eax (arg1) */
.macro THUNK name, func, put_ret_addr_in_eax=0
.globl \name
\name:
pushl %eax
pushl %ecx
pushl %edx
CFI_STARTPROC
pushl_cfi %eax
CFI_REL_OFFSET eax, 0
pushl_cfi %ecx
CFI_REL_OFFSET ecx, 0
pushl_cfi %edx
CFI_REL_OFFSET edx, 0

.if \put_ret_addr_in_eax
/* Place EIP in the arg1 */
movl 3*4(%esp), %eax
.endif

call \func
popl %edx
popl %ecx
popl %eax
popl_cfi %edx
CFI_RESTORE edx
popl_cfi %ecx
CFI_RESTORE ecx
popl_cfi %eax
CFI_RESTORE eax
ret
CFI_ENDPROC
_ASM_NOKPROBE(\name)
.endm

Expand Down

0 comments on commit f74954f

Please sign in to comment.