1 /* Copyright 2001-2014 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. If not, see
18 <http://www.gnu.org/licenses/>. */
20 #include <sysdeps/generic/sysdep.h>
24 /* Syntactic details of assembler. */
27 /* For ELF we need the `.type' directive to make shared libs work right. */
28 #define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
29 #define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
31 /* In ELF C symbols are asm symbols. */
33 #define NO_UNDERSCORES
35 #define ASM_TYPE_DIRECTIVE(name,type) /* Nothing is specified. */
36 #define ASM_SIZE_DIRECTIVE(name) /* Nothing is specified. */
39 /* Define an entry point visible from C. */
41 ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name); \
42 ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
48 ASM_SIZE_DIRECTIVE(name) \
50 /* If compiled for profiling, call `mcount' at the start of each function. */
52 /* The mcount code relies on a normal frame pointer being on the stack
53 to locate our caller, so push one just for its benefit. */
55 movm [a3],(sp); mov sp,a3; add -12,sp; \
56 call JUMPTARGET(mcount),[],0; add 12,sp; movm (sp),[a3];
58 #define CALL_MCOUNT /* Do nothing. */
62 /* Since C identifiers are not normally prefixed with an underscore
63 on this system, the asm identifier `syscall_error' intrudes on the
64 C name space. Make sure we use an innocuous name. */
65 #define syscall_error __syscall_error
66 #define mcount _mcount
71 #define JUMPTARGET(name) name##@PLT
73 #define JUMPTARGET(name) name
76 /* Local label name for asm code. */
81 #endif /* __ASSEMBLER__ */