x86-64: Remove the unnecessary testl in strlen-avx2.S
[glibc.git] / sysdeps / generic / sysdep.h
blob934d4da839f8955a33a692b6157805e6568349d9
1 /* Generic asm macros used on many machines.
2 Copyright (C) 1991-2018 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
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.
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
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
19 #ifndef C_LABEL
21 /* Define a macro we can use to construct the asm name for a C symbol. */
22 # define C_LABEL(name) name##:
24 #endif
26 #ifdef __ASSEMBLER__
27 /* Mark the end of function named SYM. This is used on some platforms
28 to generate correct debugging information. */
29 # ifndef END
30 # define END(sym)
31 # endif
33 # ifndef JUMPTARGET
34 # define JUMPTARGET(sym) sym
35 # endif
36 #endif
38 /* Makros to generate eh_frame unwind information. */
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
59 #else /* ! ASSEMBLER */
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) \
66 ".cfi_def_cfa " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
67 # define CFI_DEF_CFA_REGISTER(reg) \
68 ".cfi_def_cfa_register " CFI_STRINGIFY(reg)
69 # define CFI_DEF_CFA_OFFSET(off) \
70 ".cfi_def_cfa_offset " CFI_STRINGIFY(off)
71 # define CFI_ADJUST_CFA_OFFSET(off) \
72 ".cfi_adjust_cfa_offset " CFI_STRINGIFY(off)
73 # define CFI_OFFSET(reg, off) \
74 ".cfi_offset " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
75 # define CFI_REL_OFFSET(reg, off) \
76 ".cfi_rel_offset " CFI_STRINGIFY(reg) "," CFI_STRINGIFY(off)
77 # define CFI_REGISTER(r1, r2) \
78 ".cfi_register " CFI_STRINGIFY(r1) "," CFI_STRINGIFY(r2)
79 # define CFI_RETURN_COLUMN(reg) \
80 ".cfi_return_column " CFI_STRINGIFY(reg)
81 # define CFI_RESTORE(reg) \
82 ".cfi_restore " CFI_STRINGIFY(reg)
83 # define CFI_UNDEFINED(reg) \
84 ".cfi_undefined " CFI_STRINGIFY(reg)
85 # define CFI_REMEMBER_STATE \
86 ".cfi_remember_state"
87 # define CFI_RESTORE_STATE \
88 ".cfi_restore_state"
89 # define CFI_WINDOW_SAVE \
90 ".cfi_window_save"
91 # define CFI_PERSONALITY(enc, exp) \
92 ".cfi_personality " CFI_STRINGIFY(enc) "," CFI_STRINGIFY(exp)
93 # define CFI_LSDA(enc, exp) \
94 ".cfi_lsda " CFI_STRINGIFY(enc) "," CFI_STRINGIFY(exp)
95 #endif
97 #include "dwarf2.h"