1 #ifndef _ASM_X86_UNWIND_HINTS_H
2 #define _ASM_X86_UNWIND_HINTS_H
4 #include <linux/objtool.h>
10 .macro UNWIND_HINT_EMPTY
11 UNWIND_HINT sp_reg
=ORC_REG_UNDEFINED type
=UNWIND_HINT_TYPE_CALL end
=1
14 .macro UNWIND_HINT_REGS base
=%rsp offset
=0 indirect
=0 extra
=1 partial
=0
17 .set sp_reg
, ORC_REG_SP_INDIRECT
19 .set sp_reg
, ORC_REG_SP
22 .set sp_reg
, ORC_REG_BP
24 .set sp_reg
, ORC_REG_DI
26 .set sp_reg
, ORC_REG_DX
28 .set sp_reg
, ORC_REG_R10
30 .error
"UNWIND_HINT_REGS: bad base register"
33 .set sp_offset
, \offset
36 .set type
, UNWIND_HINT_TYPE_REGS_PARTIAL
38 .set type
, UNWIND_HINT_TYPE_REGS_PARTIAL
39 .set sp_offset
, \offset
+ (16*8)
41 .set type
, UNWIND_HINT_TYPE_REGS
44 UNWIND_HINT sp_reg
=sp_reg sp_offset
=sp_offset type
=type
47 .macro UNWIND_HINT_IRET_REGS base
=%rsp offset
=0
48 UNWIND_HINT_REGS base
=\base offset
=\offset partial
=1
51 .macro UNWIND_HINT_FUNC sp_offset
=8
52 UNWIND_HINT sp_reg
=ORC_REG_SP sp_offset
=\sp_offset type
=UNWIND_HINT_TYPE_CALL
56 * RET_OFFSET: Used on instructions that terminate a function; mostly RETURN
57 * and sibling calls. On these, sp_offset denotes the expected offset from
60 .macro UNWIND_HINT_RET_OFFSET sp_offset
=8
61 UNWIND_HINT sp_reg
=ORC_REG_SP type
=UNWIND_HINT_TYPE_RET_OFFSET sp_offset
=\sp_offset
64 #endif /* __ASSEMBLY__ */
66 #endif /* _ASM_X86_UNWIND_HINTS_H */