Back to index

glibc  2.9
sysdep.h
Go to the documentation of this file.
00001 /* Copyright (C) 1993,1994,1995,1997,1998,2002 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003    Contributed by Brendan Kehoe (brendan@zen.org).
00004 
00005    The GNU C Library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) any later version.
00009 
00010    The GNU C Library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014 
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with the GNU C Library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA.  */
00019 
00020 /* Solaris 2 does not precede the asm names of C symbols with a `_'. */
00021 #ifndef NO_UNDERSCORES
00022 #define       NO_UNDERSCORES
00023 #endif
00024 
00025 #include <sysdeps/unix/sysdep.h>
00026 
00027 #ifdef __ASSEMBLER__
00028 
00029 /* As of gcc-2.6.0, it complains about pound signs in front of things
00030    that aren't arguments to the macro.  So we use this to pull it off
00031    instead.  */
00032 #define cat(a,b) a##b
00033 #define poundfnc cat(#,function)
00034 
00035 #define       ENTRY(name)                                                   \
00036   .section ".text";                                                  \
00037   .align 4;                                                          \
00038   .global C_SYMBOL_NAME(name);                                              \
00039   .type  C_SYMBOL_NAME(name), poundfnc;                                     \
00040   C_LABEL(name)
00041 
00042 #define       PSEUDO(name, syscall_name, args)                              \
00043   ENTRY (name)                                                              \
00044   mov SYS_ify(syscall_name), %g1;                                    \
00045   ta 8;                                                                     \
00046   bcs C_SYMBOL_NAME(syscall_error);                                         \
00047   nop
00048 
00049 #define       ret           retl; nop
00050 #define       r0            %o0
00051 #define       r1            %o1
00052 #define       MOVE(x,y)     mov x, y
00053 
00054 #define LOC(name)    .L##name
00055 
00056 #endif /* __ASSEMBLER__ */