1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 /* 3 * Copyright (C) 2015-2017 Josh Poimboeuf <jpoimboe@redhat.com> 4 */ 5 6 #ifndef _OBJTOOL_CFI_H 7 #define _OBJTOOL_CFI_H 8 9 #define CFI_UNDEFINED -1 10 #define CFI_CFA -2 11 #define CFI_SP_INDIRECT -3 12 #define CFI_BP_INDIRECT -4 13 14 #define CFI_AX 0 15 #define CFI_DX 1 16 #define CFI_CX 2 17 #define CFI_BX 3 18 #define CFI_SI 4 19 #define CFI_DI 5 20 #define CFI_BP 6 21 #define CFI_SP 7 22 #define CFI_R8 8 23 #define CFI_R9 9 24 #define CFI_R10 10 25 #define CFI_R11 11 26 #define CFI_R12 12 27 #define CFI_R13 13 28 #define CFI_R14 14 29 #define CFI_R15 15 30 #define CFI_RA 16 31 #define CFI_NUM_REGS 17 32 33 struct cfi_reg { 34 int base; 35 int offset; 36 }; 37 38 struct cfi_state { 39 struct cfi_reg cfa; 40 struct cfi_reg regs[CFI_NUM_REGS]; 41 }; 42 43 #endif /* _OBJTOOL_CFI_H */ 44