cfi.h 786 B

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