~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/x86/include/asm/unwind_hints.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _ASM_X86_UNWIND_HINTS_H
  2 #define _ASM_X86_UNWIND_HINTS_H
  3 
  4 #include <linux/objtool.h>
  5 
  6 #include "orc_types.h"
  7 
  8 #ifdef __ASSEMBLY__
  9 
 10 .macro UNWIND_HINT_END_OF_STACK
 11         UNWIND_HINT type=UNWIND_HINT_TYPE_END_OF_STACK
 12 .endm
 13 
 14 .macro UNWIND_HINT_UNDEFINED
 15         UNWIND_HINT type=UNWIND_HINT_TYPE_UNDEFINED
 16 .endm
 17 
 18 .macro UNWIND_HINT_ENTRY
 19         VALIDATE_UNRET_BEGIN
 20         UNWIND_HINT_END_OF_STACK
 21 .endm
 22 
 23 .macro UNWIND_HINT_REGS base=%rsp offset=0 indirect=0 extra=1 partial=0 signal=1
 24         .if \base == %rsp
 25                 .if \indirect
 26                         .set sp_reg, ORC_REG_SP_INDIRECT
 27                 .else
 28                         .set sp_reg, ORC_REG_SP
 29                 .endif
 30         .elseif \base == %rbp
 31                 .set sp_reg, ORC_REG_BP
 32         .elseif \base == %rdi
 33                 .set sp_reg, ORC_REG_DI
 34         .elseif \base == %rdx
 35                 .set sp_reg, ORC_REG_DX
 36         .elseif \base == %r10
 37                 .set sp_reg, ORC_REG_R10
 38         .else
 39                 .error "UNWIND_HINT_REGS: bad base register"
 40         .endif
 41 
 42         .set sp_offset, \offset
 43 
 44         .if \partial
 45                 .set type, UNWIND_HINT_TYPE_REGS_PARTIAL
 46         .elseif \extra == 0
 47                 .set type, UNWIND_HINT_TYPE_REGS_PARTIAL
 48                 .set sp_offset, \offset + (16*8)
 49         .else
 50                 .set type, UNWIND_HINT_TYPE_REGS
 51         .endif
 52 
 53         UNWIND_HINT sp_reg=sp_reg sp_offset=sp_offset type=type signal=\signal
 54 .endm
 55 
 56 .macro UNWIND_HINT_IRET_REGS base=%rsp offset=0 signal=1
 57         UNWIND_HINT_REGS base=\base offset=\offset partial=1 signal=\signal
 58 .endm
 59 
 60 .macro UNWIND_HINT_IRET_ENTRY base=%rsp offset=0 signal=1
 61         VALIDATE_UNRET_BEGIN
 62         UNWIND_HINT_IRET_REGS base=\base offset=\offset signal=\signal
 63 .endm
 64 
 65 .macro UNWIND_HINT_FUNC
 66         UNWIND_HINT sp_reg=ORC_REG_SP sp_offset=8 type=UNWIND_HINT_TYPE_FUNC
 67 .endm
 68 
 69 .macro UNWIND_HINT_SAVE
 70         UNWIND_HINT type=UNWIND_HINT_TYPE_SAVE
 71 .endm
 72 
 73 .macro UNWIND_HINT_RESTORE
 74         UNWIND_HINT type=UNWIND_HINT_TYPE_RESTORE
 75 .endm
 76 
 77 #else
 78 
 79 #define UNWIND_HINT_UNDEFINED \
 80         UNWIND_HINT(UNWIND_HINT_TYPE_UNDEFINED, 0, 0, 0)
 81 
 82 #define UNWIND_HINT_FUNC \
 83         UNWIND_HINT(UNWIND_HINT_TYPE_FUNC, ORC_REG_SP, 8, 0)
 84 
 85 #define UNWIND_HINT_SAVE \
 86         UNWIND_HINT(UNWIND_HINT_TYPE_SAVE, 0, 0, 0)
 87 
 88 #define UNWIND_HINT_RESTORE \
 89         UNWIND_HINT(UNWIND_HINT_TYPE_RESTORE, 0, 0, 0)
 90 
 91 #endif /* __ASSEMBLY__ */
 92 
 93 #endif /* _ASM_X86_UNWIND_HINTS_H */
 94 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php