2019-05-19 13:51:43 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2017-06-28 15:11:07 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2015-2017 Josh Poimboeuf <jpoimboe@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _OBJTOOL_CFI_H
|
|
|
|
#define _OBJTOOL_CFI_H
|
|
|
|
|
2020-03-27 15:28:46 +00:00
|
|
|
#include "cfi_regs.h"
|
|
|
|
|
2017-06-28 15:11:07 +00:00
|
|
|
#define CFI_UNDEFINED -1
|
|
|
|
#define CFI_CFA -2
|
|
|
|
#define CFI_SP_INDIRECT -3
|
|
|
|
#define CFI_BP_INDIRECT -4
|
|
|
|
|
|
|
|
struct cfi_reg {
|
|
|
|
int base;
|
|
|
|
int offset;
|
|
|
|
};
|
|
|
|
|
2020-03-25 14:34:50 +00:00
|
|
|
struct cfi_init_state {
|
2020-03-25 13:04:45 +00:00
|
|
|
struct cfi_reg regs[CFI_NUM_REGS];
|
2017-06-28 15:11:07 +00:00
|
|
|
struct cfi_reg cfa;
|
2020-03-25 13:04:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct cfi_state {
|
2017-06-28 15:11:07 +00:00
|
|
|
struct cfi_reg regs[CFI_NUM_REGS];
|
2020-03-25 13:04:45 +00:00
|
|
|
struct cfi_reg vals[CFI_NUM_REGS];
|
|
|
|
struct cfi_reg cfa;
|
|
|
|
int stack_size;
|
|
|
|
int drap_reg, drap_offset;
|
|
|
|
unsigned char type;
|
|
|
|
bool bp_scratch;
|
|
|
|
bool drap;
|
|
|
|
bool end;
|
2017-06-28 15:11:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _OBJTOOL_CFI_H */
|