chiark / gitweb /
eglibc (2.11.3-4+deb6u3) squeeze-lts; urgency=medium
[eglibc.git] / ports / sysdeps / unix / sysv / sysv4 / solaris2 / sparc / sysdep.h
1 /* Copyright (C) 1993,1994,1995,1997,1998,2002 Free Software Foundation, Inc.
2    This file is part of the GNU C Library.
3    Contributed by Brendan Kehoe (brendan@zen.org).
4
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.
9
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.
14
15    You should have received a copy of the GNU Lesser General Public
16    License along with the GNU C Library; if not, write to the Free
17    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18    02111-1307 USA.  */
19
20 /* Solaris 2 does not precede the asm names of C symbols with a `_'. */
21 #ifndef NO_UNDERSCORES
22 #define NO_UNDERSCORES
23 #endif
24
25 #include <sysdeps/unix/sysdep.h>
26
27 #ifdef  __ASSEMBLER__
28
29 /* As of gcc-2.6.0, it complains about pound signs in front of things
30    that aren't arguments to the macro.  So we use this to pull it off
31    instead.  */
32 #define cat(a,b) a##b
33 #define poundfnc cat(#,function)
34
35 #define ENTRY(name)                                                           \
36   .section ".text";                                                           \
37   .align 4;                                                                   \
38   .global C_SYMBOL_NAME(name);                                                \
39   .type  C_SYMBOL_NAME(name), poundfnc;                                       \
40   C_LABEL(name)
41
42 #define PSEUDO(name, syscall_name, args)                                      \
43   ENTRY (name)                                                                \
44   mov SYS_ify(syscall_name), %g1;                                             \
45   ta 8;                                                                       \
46   bcs C_SYMBOL_NAME(syscall_error);                                           \
47   nop
48
49 #define ret             retl; nop
50 #define r0              %o0
51 #define r1              %o1
52 #define MOVE(x,y)       mov x, y
53
54 #define LOC(name)       .L##name
55
56 #endif  /* __ASSEMBLER__ */