2015-12-18 20:39:18 +08:00
|
|
|
#ifndef _ASM_X86_FRAME_H
|
|
|
|
#define _ASM_X86_FRAME_H
|
|
|
|
|
2007-10-18 00:04:38 +08:00
|
|
|
#ifdef __ASSEMBLY__
|
|
|
|
|
2011-07-19 19:59:51 +08:00
|
|
|
#include <asm/asm.h>
|
2006-09-26 16:52:29 +08:00
|
|
|
|
2015-12-18 20:39:18 +08:00
|
|
|
/*
|
|
|
|
* These are stack frame creation macros. They should be used by every
|
|
|
|
* callable non-leaf asm function to make kernel stack traces more reliable.
|
|
|
|
*/
|
2006-09-26 16:52:29 +08:00
|
|
|
#ifdef CONFIG_FRAME_POINTER
|
2015-12-18 20:39:18 +08:00
|
|
|
|
|
|
|
.macro FRAME_BEGIN
|
|
|
|
push %_ASM_BP
|
|
|
|
_ASM_MOV %_ASM_SP, %_ASM_BP
|
|
|
|
.endm
|
|
|
|
|
|
|
|
.macro FRAME_END
|
|
|
|
pop %_ASM_BP
|
|
|
|
.endm
|
|
|
|
|
|
|
|
#define FRAME_OFFSET __ASM_SEL(4, 8)
|
|
|
|
|
|
|
|
#else /* !CONFIG_FRAME_POINTER */
|
|
|
|
|
|
|
|
#define FRAME_BEGIN
|
|
|
|
#define FRAME_END
|
|
|
|
#define FRAME_OFFSET 0
|
|
|
|
|
|
|
|
#endif /* CONFIG_FRAME_POINTER */
|
2007-10-18 00:04:38 +08:00
|
|
|
|
|
|
|
#endif /* __ASSEMBLY__ */
|
2015-12-18 20:39:18 +08:00
|
|
|
#endif /* _ASM_X86_FRAME_H */
|