]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/generic/sysdep.h
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / generic / sysdep.h
CommitLineData
e75154a6 1/* Generic asm macros used on many machines.
b168057a 2 Copyright (C) 1991-2015 Free Software Foundation, Inc.
2c6fe0bd 3 This file is part of the GNU C Library.
e75154a6 4
2c6fe0bd 5 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
e75154a6 9
2c6fe0bd
UD
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 13 Lesser General Public License for more details.
e75154a6 14
41bdb6e2 15 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
e75154a6
RM
18
19#ifndef C_LABEL
20
21/* Define a macro we can use to construct the asm name for a C symbol. */
965a54a4 22# define C_LABEL(name) name##:
e75154a6
RM
23
24#endif
6ed0492f 25
c2afe833 26#ifdef __ASSEMBLER__
6ed0492f
UD
27/* Mark the end of function named SYM. This is used on some platforms
28 to generate correct debugging information. */
63601ccd 29# ifndef END
874e0564 30# define END(sym)
63601ccd 31# endif
29d9a17d 32
63601ccd 33# ifndef JUMPTARGET
874e0564 34# define JUMPTARGET(sym) sym
63601ccd 35# endif
874e0564 36#endif
50189569
AJ
37
38/* Makros to generate eh_frame unwind information. */
a8779c28
JM
39#ifdef __ASSEMBLER__
40# define cfi_startproc .cfi_startproc
41# define cfi_endproc .cfi_endproc
42# define cfi_def_cfa(reg, off) .cfi_def_cfa reg, off
43# define cfi_def_cfa_register(reg) .cfi_def_cfa_register reg
44# define cfi_def_cfa_offset(off) .cfi_def_cfa_offset off
45# define cfi_adjust_cfa_offset(off) .cfi_adjust_cfa_offset off
46# define cfi_offset(reg, off) .cfi_offset reg, off
47# define cfi_rel_offset(reg, off) .cfi_rel_offset reg, off
48# define cfi_register(r1, r2) .cfi_register r1, r2
49# define cfi_return_column(reg) .cfi_return_column reg
50# define cfi_restore(reg) .cfi_restore reg
51# define cfi_same_value(reg) .cfi_same_value reg
52# define cfi_undefined(reg) .cfi_undefined reg
53# define cfi_remember_state .cfi_remember_state
54# define cfi_restore_state .cfi_restore_state
55# define cfi_window_save .cfi_window_save
56# define cfi_personality(enc, exp) .cfi_personality enc, exp
57# define cfi_lsda(enc, exp) .cfi_lsda enc, exp
50189569 58
a8779c28 59#else /* ! ASSEMBLER */
874e0564 60
a8779c28
JM
61# define CFI_STRINGIFY(Name) CFI_STRINGIFY2 (Name)
62# define CFI_STRINGIFY2(Name) #Name
63# define CFI_STARTPROC ".cfi_startproc"
64# define CFI_ENDPROC ".cfi_endproc"
65# define CFI_DEF_CFA(reg, off) \
2b1c0eea 66 ".cfi_def_cfa " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
a8779c28 67# define CFI_DEF_CFA_REGISTER(reg) \
2b1c0eea 68 ".cfi_def_cfa_register " CFI_STRINGIFY(reg)
a8779c28 69# define CFI_DEF_CFA_OFFSET(off) \
2b1c0eea 70 ".cfi_def_cfa_offset " CFI_STRINGIFY(off)
a8779c28 71# define CFI_ADJUST_CFA_OFFSET(off) \
2b1c0eea 72 ".cfi_adjust_cfa_offset " CFI_STRINGIFY(off)
a8779c28 73# define CFI_OFFSET(reg, off) \
2b1c0eea 74 ".cfi_offset " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
a8779c28 75# define CFI_REL_OFFSET(reg, off) \
a29f0509 76 ".cfi_rel_offset " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
a8779c28 77# define CFI_REGISTER(r1, r2) \
f212e8dc 78 ".cfi_register " CFI_STRINGIFY(r1) "," CFI_STRINGIFY(r2)
a8779c28 79# define CFI_RETURN_COLUMN(reg) \
f212e8dc 80 ".cfi_return_column " CFI_STRINGIFY(reg)
a8779c28 81# define CFI_RESTORE(reg) \
f212e8dc 82 ".cfi_restore " CFI_STRINGIFY(reg)
a8779c28 83# define CFI_UNDEFINED(reg) \
f212e8dc 84 ".cfi_undefined " CFI_STRINGIFY(reg)
a8779c28 85# define CFI_REMEMBER_STATE \
f212e8dc 86 ".cfi_remember_state"
a8779c28 87# define CFI_RESTORE_STATE \
f212e8dc 88 ".cfi_restore_state"
a8779c28 89# define CFI_WINDOW_SAVE \
b5bc52ef 90 ".cfi_window_save"
a8779c28 91# define CFI_PERSONALITY(enc, exp) \
63601ccd 92 ".cfi_personality " CFI_STRINGIFY(enc) "," CFI_STRINGIFY(exp)
a8779c28 93# define CFI_LSDA(enc, exp) \
63601ccd 94 ".cfi_lsda " CFI_STRINGIFY(enc) "," CFI_STRINGIFY(exp)
874e0564
UD
95#endif
96
874e0564 97#include "dwarf2.h"