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