1 /* Assembler macros for SH.
2 Copyright (C) 1999, 2000 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 Library General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 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 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with the GNU C Library; see the file COPYING.LIB. If not,
17 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. */
20 #define __need_uClibc_config_h 1
21 #include <bits/uClibc_config.h>
23 /* Define a macro we can use to construct the asm name for a C symbol. */
24 #ifdef __NO_UNDERSCORES__
26 #define C_LABEL(name) name##:
28 #define C_LABEL(name) name/**/:
32 #define C_LABEL(name) _##name##:
34 #define C_LABEL(name) _/**/name/**/:
38 /* Mark the end of function named SYM. This is used on some platforms
39 to generate correct debugging information. */
44 #ifndef ASM_GLOBAL_DIRECTIVE
45 #define ASM_GLOBAL_DIRECTIVE .global
49 #define C_SYMBOL_NAME(name) name
54 /* Syntactic details of assembler. */
58 #define ALIGNARG(log2) log2
59 /* For ELF we need the `.type' directive to make shared libs work right. */
60 #define ASM_TYPE_DIRECTIVE(name,typearg) .type name,@##typearg;
61 #define ASM_SIZE_DIRECTIVE(name) .size name,.-name
64 #define PLTJMP(_x) _x##@PLT
71 #define ALIGNARG(log2) log2
72 #define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
73 #define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */
74 #define C_SYMBOL_NAME(name) name /* Nothing is specified. */
79 /* Define an entry point visible from C. */
81 ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
82 ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),function) \
89 ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(name))
91 /* If compiled for profiling, call `mcount' at the start of each function. */
93 #define CALL_MCOUNT /* NOTYET */
95 #define CALL_MCOUNT /* Do nothing. */
98 #ifdef __NO_UNDERSCORES__
99 /* Since C identifiers are not normally prefixed with an underscore
100 on this system, the asm identifier `syscall_error' intrudes on the
101 C name space. Make sure we use an innocuous name. */
102 #define syscall_error __syscall_error
103 #define mcount _mcount
106 #endif /* __ASSEMBLER__ */