ffi_cfi.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* -----------------------------------------------------------------------
  2. ffi_cfi.h - Copyright (c) 2014 Red Hat, Inc.
  3. Conditionally assemble cfi directives. Only necessary for building libffi.
  4. ----------------------------------------------------------------------- */
  5. #ifndef FFI_CFI_H
  6. #define FFI_CFI_H
  7. #ifdef HAVE_AS_CFI_PSEUDO_OP
  8. # define cfi_startproc .cfi_startproc
  9. # define cfi_endproc .cfi_endproc
  10. # define cfi_def_cfa(reg, off) .cfi_def_cfa reg, off
  11. # define cfi_def_cfa_register(reg) .cfi_def_cfa_register reg
  12. # define cfi_def_cfa_offset(off) .cfi_def_cfa_offset off
  13. # define cfi_adjust_cfa_offset(off) .cfi_adjust_cfa_offset off
  14. # define cfi_offset(reg, off) .cfi_offset reg, off
  15. # define cfi_rel_offset(reg, off) .cfi_rel_offset reg, off
  16. # define cfi_register(r1, r2) .cfi_register r1, r2
  17. # define cfi_return_column(reg) .cfi_return_column reg
  18. # define cfi_restore(reg) .cfi_restore reg
  19. # define cfi_same_value(reg) .cfi_same_value reg
  20. # define cfi_undefined(reg) .cfi_undefined reg
  21. # define cfi_remember_state .cfi_remember_state
  22. # define cfi_restore_state .cfi_restore_state
  23. # define cfi_window_save .cfi_window_save
  24. # define cfi_personality(enc, exp) .cfi_personality enc, exp
  25. # define cfi_lsda(enc, exp) .cfi_lsda enc, exp
  26. # define cfi_escape(...) .cfi_escape __VA_ARGS__
  27. #else
  28. # define cfi_startproc
  29. # define cfi_endproc
  30. # define cfi_def_cfa(reg, off)
  31. # define cfi_def_cfa_register(reg)
  32. # define cfi_def_cfa_offset(off)
  33. # define cfi_adjust_cfa_offset(off)
  34. # define cfi_offset(reg, off)
  35. # define cfi_rel_offset(reg, off)
  36. # define cfi_register(r1, r2)
  37. # define cfi_return_column(reg)
  38. # define cfi_restore(reg)
  39. # define cfi_same_value(reg)
  40. # define cfi_undefined(reg)
  41. # define cfi_remember_state
  42. # define cfi_restore_state
  43. # define cfi_window_save
  44. # define cfi_personality(enc, exp)
  45. # define cfi_lsda(enc, exp)
  46. # define cfi_escape(...)
  47. #endif /* HAVE_AS_CFI_PSEUDO_OP */
  48. #endif /* FFI_CFI_H */