Back to index

glibc  2.9
sysdep.h
Go to the documentation of this file.
00001 /* Copyright (C) 1991, 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 #include <sysdeps/unix/sysdep.h>
00020 
00021 #ifdef __ASSEMBLER__
00022 
00023 #define       POUND  #
00024 
00025 #ifdef __STDC__
00026 #define       ENTRY(name)                                                   \
00027   .globl _##name;                                                    \
00028   .even;                                                             \
00029   _##name##:
00030 #else
00031 #define       ENTRY(name)                                                   \
00032   .globl _name;                                                      \
00033   .even;                                                             \
00034   _name:
00035 #endif
00036 
00037 #ifdef __STDC__
00038 #define       PSEUDO(name, syscall_name, args)                              \
00039   .even;                                                             \
00040   .globl syscall_error;                                                     \
00041   error: jmp syscall_error;                                          \
00042   ENTRY (name)                                                              \
00043   pea SYS_##syscall_name;                                            \
00044   trap POUND 0;                                                             \
00045   bcs error
00046 #else
00047 #define       PSEUDO(name, syscall_name, args)                              \
00048   .even;                                                             \
00049   .globl syscall_error;                                                     \
00050   error: jmp syscall_error;                                          \
00051   ENTRY (name)                                                              \
00052   pea SYS_syscall_name;                                              \
00053   trap POUND 0;                                                             \
00054   bcs error
00055 #endif
00056 
00057 #define       ret    rts
00058 #define       r0     d0
00059 #define       r1     d1
00060 #define       MOVE(x,y)     movel x , y
00061 
00062 #endif /* __ASSEMBLER__ */