mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-04 16:43:40 +01:00
Objtool keeps per instruction CFI state in struct insn_state and will save/restore this where required. However, insn_state has grown some !CFI state, and this must not be saved/restored (that would loose/destroy state). Fix this by moving the CFI specific parts of insn_state into struct cfi_state. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Miroslav Benes <[email protected]> Reviewed-by: Alexandre Chartre <[email protected]> Acked-by: Josh Poimboeuf <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
39 lines
675 B
C
39 lines
675 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* Copyright (C) 2015-2017 Josh Poimboeuf <[email protected]>
|
|
*/
|
|
|
|
#ifndef _OBJTOOL_CFI_H
|
|
#define _OBJTOOL_CFI_H
|
|
|
|
#include "cfi_regs.h"
|
|
|
|
#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;
|
|
};
|
|
|
|
struct cfi_init_state {
|
|
struct cfi_reg regs[CFI_NUM_REGS];
|
|
struct cfi_reg cfa;
|
|
};
|
|
|
|
struct cfi_state {
|
|
struct cfi_reg regs[CFI_NUM_REGS];
|
|
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;
|
|
};
|
|
|
|
#endif /* _OBJTOOL_CFI_H */
|