]>
Commit | Line | Data |
---|---|---|
1ccea77e | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
baa41469 JP |
2 | /* |
3 | * Copyright (C) 2015-2017 Josh Poimboeuf <jpoimboe@redhat.com> | |
baa41469 JP |
4 | */ |
5 | ||
6 | #ifndef _OBJTOOL_CFI_H | |
7 | #define _OBJTOOL_CFI_H | |
8 | ||
6f8ca676 JT |
9 | #include "cfi_regs.h" |
10 | ||
baa41469 JP |
11 | #define CFI_UNDEFINED -1 |
12 | #define CFI_CFA -2 | |
13 | #define CFI_SP_INDIRECT -3 | |
14 | #define CFI_BP_INDIRECT -4 | |
15 | ||
baa41469 JP |
16 | struct cfi_reg { |
17 | int base; | |
18 | int offset; | |
19 | }; | |
20 | ||
a3608f59 | 21 | struct cfi_init_state { |
e7c0219b | 22 | struct cfi_reg regs[CFI_NUM_REGS]; |
baa41469 | 23 | struct cfi_reg cfa; |
e7c0219b PZ |
24 | }; |
25 | ||
26 | struct cfi_state { | |
baa41469 | 27 | struct cfi_reg regs[CFI_NUM_REGS]; |
e7c0219b PZ |
28 | struct cfi_reg vals[CFI_NUM_REGS]; |
29 | struct cfi_reg cfa; | |
30 | int stack_size; | |
31 | int drap_reg, drap_offset; | |
32 | unsigned char type; | |
33 | bool bp_scratch; | |
34 | bool drap; | |
35 | bool end; | |
baa41469 JP |
36 | }; |
37 | ||
38 | #endif /* _OBJTOOL_CFI_H */ |