ffi_cfi.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* -----------------------------------------------------------------------
  2. ffi_cfi.h - Copyright (c) 2014 Red Hat, Inc.
  3. Conditionally assemble cfi directives. Only necessary for building libffi.
  4. Permission is hereby granted, free of charge, to any person
  5. obtaining a copy of this software and associated documentation
  6. files (the ``Software''), to deal in the Software without
  7. restriction, including without limitation the rights to use, copy,
  8. modify, merge, publish, distribute, sublicense, and/or sell copies
  9. of the Software, and to permit persons to whom the Software is
  10. furnished to do so, subject to the following conditions:
  11. The above copyright notice and this permission notice shall be
  12. included in all copies or substantial portions of the Software.
  13. THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND,
  14. EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  15. MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  16. NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  17. HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  18. WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. DEALINGS IN THE SOFTWARE.
  21. ----------------------------------------------------------------------- */
  22. #ifndef FFI_CFI_H
  23. #define FFI_CFI_H
  24. #ifdef HAVE_AS_CFI_PSEUDO_OP
  25. # define cfi_startproc .cfi_startproc
  26. # define cfi_endproc .cfi_endproc
  27. # define cfi_def_cfa(reg, off) .cfi_def_cfa reg, off
  28. # define cfi_def_cfa_register(reg) .cfi_def_cfa_register reg
  29. # define cfi_def_cfa_offset(off) .cfi_def_cfa_offset off
  30. # define cfi_adjust_cfa_offset(off) .cfi_adjust_cfa_offset off
  31. # define cfi_offset(reg, off) .cfi_offset reg, off
  32. # define cfi_rel_offset(reg, off) .cfi_rel_offset reg, off
  33. # define cfi_register(r1, r2) .cfi_register r1, r2
  34. # define cfi_return_column(reg) .cfi_return_column reg
  35. # define cfi_restore(reg) .cfi_restore reg
  36. # define cfi_same_value(reg) .cfi_same_value reg
  37. # define cfi_undefined(reg) .cfi_undefined reg
  38. # define cfi_remember_state .cfi_remember_state
  39. # define cfi_restore_state .cfi_restore_state
  40. # define cfi_window_save .cfi_window_save
  41. # define cfi_personality(enc, exp) .cfi_personality enc, exp
  42. # define cfi_lsda(enc, exp) .cfi_lsda enc, exp
  43. # define cfi_escape(...) .cfi_escape __VA_ARGS__
  44. #else
  45. # define cfi_startproc
  46. # define cfi_endproc
  47. # define cfi_def_cfa(reg, off)
  48. # define cfi_def_cfa_register(reg)
  49. # define cfi_def_cfa_offset(off)
  50. # define cfi_adjust_cfa_offset(off)
  51. # define cfi_offset(reg, off)
  52. # define cfi_rel_offset(reg, off)
  53. # define cfi_register(r1, r2)
  54. # define cfi_return_column(reg)
  55. # define cfi_restore(reg)
  56. # define cfi_same_value(reg)
  57. # define cfi_undefined(reg)
  58. # define cfi_remember_state
  59. # define cfi_restore_state
  60. # define cfi_window_save
  61. # define cfi_personality(enc, exp)
  62. # define cfi_lsda(enc, exp)
  63. # define cfi_escape(...)
  64. #endif /* HAVE_AS_CFI_PSEUDO_OP */
  65. #endif /* FFI_CFI_H */