1 /* Generic asm macros used on many machines.
2 Copyright (C) 1991-1993,96,98,2002,2003,2009,2011,2012
3 Free Software Foundation, Inc.
4 This file is part of the GNU C Library.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 The GNU C Library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with the GNU C Library; if not, see
18 <http://www.gnu.org/licenses/>. */
22 /* Define a macro we can use to construct the asm name for a C symbol. */
23 # define C_LABEL(name) name##:
28 /* Mark the end of function named SYM. This is used on some platforms
29 to generate correct debugging information. */
35 # define JUMPTARGET(sym) sym
39 /* Makros to generate eh_frame unwind information. */
40 #ifdef HAVE_ASM_CFI_DIRECTIVES
42 # define cfi_startproc .cfi_startproc
43 # define cfi_endproc .cfi_endproc
44 # define cfi_def_cfa(reg, off) .cfi_def_cfa reg, off
45 # define cfi_def_cfa_register(reg) .cfi_def_cfa_register reg
46 # define cfi_def_cfa_offset(off) .cfi_def_cfa_offset off
47 # define cfi_adjust_cfa_offset(off) .cfi_adjust_cfa_offset off
48 # define cfi_offset(reg, off) .cfi_offset reg, off
49 # define cfi_rel_offset(reg, off) .cfi_rel_offset reg, off
50 # define cfi_register(r1, r2) .cfi_register r1, r2
51 # define cfi_return_column(reg) .cfi_return_column reg
52 # define cfi_restore(reg) .cfi_restore reg
53 # define cfi_same_value(reg) .cfi_same_value reg
54 # define cfi_undefined(reg) .cfi_undefined reg
55 # define cfi_remember_state .cfi_remember_state
56 # define cfi_restore_state .cfi_restore_state
57 # define cfi_window_save .cfi_window_save
58 # define cfi_personality(enc, exp) .cfi_personality enc, exp
59 # define cfi_lsda(enc, exp) .cfi_lsda enc, exp
61 # else /* ! ASSEMBLER */
63 # define CFI_STRINGIFY(Name) CFI_STRINGIFY2 (Name)
64 # define CFI_STRINGIFY2(Name) #Name
65 # define CFI_STARTPROC ".cfi_startproc"
66 # define CFI_ENDPROC ".cfi_endproc"
67 # define CFI_DEF_CFA(reg, off) \
68 ".cfi_def_cfa " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
69 # define CFI_DEF_CFA_REGISTER(reg) \
70 ".cfi_def_cfa_register " CFI_STRINGIFY(reg)
71 # define CFI_DEF_CFA_OFFSET(off) \
72 ".cfi_def_cfa_offset " CFI_STRINGIFY(off)
73 # define CFI_ADJUST_CFA_OFFSET(off) \
74 ".cfi_adjust_cfa_offset " CFI_STRINGIFY(off)
75 # define CFI_OFFSET(reg, off) \
76 ".cfi_offset " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
77 # define CFI_REL_OFFSET(reg, off) \
78 ".cfi_rel_offset " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
79 # define CFI_REGISTER(r1, r2) \
80 ".cfi_register " CFI_STRINGIFY(r1) "," CFI_STRINGIFY(r2)
81 # define CFI_RETURN_COLUMN(reg) \
82 ".cfi_return_column " CFI_STRINGIFY(reg)
83 # define CFI_RESTORE(reg) \
84 ".cfi_restore " CFI_STRINGIFY(reg)
85 # define CFI_UNDEFINED(reg) \
86 ".cfi_undefined " CFI_STRINGIFY(reg)
87 # define CFI_REMEMBER_STATE \
89 # define CFI_RESTORE_STATE \
91 # define CFI_WINDOW_SAVE \
93 # define CFI_PERSONALITY(enc, exp) \
94 ".cfi_personality " CFI_STRINGIFY(enc) "," CFI_STRINGIFY(exp)
95 # define CFI_LSDA(enc, exp) \
96 ".cfi_lsda " CFI_STRINGIFY(enc) "," CFI_STRINGIFY(exp)
101 # define CFI_STARTPROC
103 # define CFI_DEF_CFA(reg, off)
104 # define CFI_DEF_CFA_REGISTER(reg)
105 # define CFI_DEF_CFA_OFFSET(off)
106 # define CFI_ADJUST_CFA_OFFSET(off)
107 # define CFI_OFFSET(reg, off)
108 # define CFI_REL_OFFSET(reg, off)
109 # define CFI_REGISTER(r1, r2)
110 # define CFI_RETURN_COLUMN(reg)
111 # define CFI_RESTORE(reg)
112 # define CFI_UNDEFINED(reg)
113 # define CFI_REMEMBER_STATE
114 # define CFI_RESTORE_STATE
115 # define CFI_WINDOW_SAVE
116 # define CFI_PERSONALITY(enc, exp)
117 # define CFI_LSDA(enc, exp)