Update include paths following the move of alpha to ports
[glibc.git] / sysdeps / am33 / sysdep.h
blobefd0527144310105b338eafdd98e06c3982ecbb0
1 /* Copyright 2001 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Alexandre Oliva <aoliva@redhat.com>.
4 Based on ../i386/sysdep.h.
6 The GNU C Library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public License as
8 published by the Free Software Foundation; either version 2 of the
9 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 Library General Public License for more details.
16 You should have received a copy of the GNU Library General Public
17 License along with the GNU C Library; see the file COPYING.LIB. If not,
18 write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 #include <sysdeps/generic/sysdep.h>
23 #ifdef __ASSEMBLER__
25 /* Syntactic details of assembler. */
27 #ifdef HAVE_ELF
28 /* For ELF we need the `.type' directive to make shared libs work right. */
29 #define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
30 #define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
32 /* In ELF C symbols are asm symbols. */
33 #undef NO_UNDERSCORES
34 #define NO_UNDERSCORES
35 #else
36 #define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
37 #define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */
38 #endif
40 /* Define an entry point visible from C. */
41 #define ENTRY(name) \
42 ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
43 ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
44 C_LABEL(name) \
45 CALL_MCOUNT
47 #undef END
48 #define END(name) \
49 ASM_SIZE_DIRECTIVE(name) \
51 /* If compiled for profiling, call `mcount' at the start of each function. */
52 #ifdef PROF
53 /* The mcount code relies on a normal frame pointer being on the stack
54 to locate our caller, so push one just for its benefit. */
55 #define CALL_MCOUNT \
56 movm [a3],(sp); mov sp,a3; add -12,sp; \
57 call JUMPTARGET(mcount),[],0; add 12,sp; movm (sp),[a3];
58 #else
59 #define CALL_MCOUNT /* Do nothing. */
60 #endif
62 #ifdef NO_UNDERSCORES
63 /* Since C identifiers are not normally prefixed with an underscore
64 on this system, the asm identifier `syscall_error' intrudes on the
65 C name space. Make sure we use an innocuous name. */
66 #define syscall_error __syscall_error
67 #define mcount _mcount
68 #endif
70 #undef JUMPTARGET
71 #ifdef PIC
72 #define JUMPTARGET(name) name##@PLT
73 #else
74 #define JUMPTARGET(name) name
75 #endif
77 /* Local label name for asm code. */
78 #ifndef L
79 #define L(name) name
80 #endif
82 #endif /* __ASSEMBLER__ */