Back to index

glibc  2.9
sysdep.h
Go to the documentation of this file.
00001 /* Copyright (C) 1992, 1995, 1997, 1999, 2000, 2002, 2003
00002    Free Software Foundation, Inc.
00003    This file is part of the GNU C Library.
00004    Contributed by Brendan Kehoe (brendan@zen.org).
00005 
00006    The GNU C Library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Lesser General Public
00008    License as published by the Free Software Foundation; either
00009    version 2.1 of the License, or (at your option) any later version.
00010 
00011    The GNU C Library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Lesser General Public License for more details.
00015 
00016    You should have received a copy of the GNU Lesser General Public
00017    License along with the GNU C Library; if not, write to the Free
00018    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00019    02111-1307 USA.  */
00020 
00021 #include <sysdeps/unix/mips/sysdep.h>
00022 
00023 /* Note that while it's better structurally, going back to call __syscall_error
00024    can make things confusing if you're debugging---it looks like it's jumping
00025    backwards into the previous fn.  */
00026 #ifdef __PIC__
00027 #define PSEUDO(name, syscall_name, args) \
00028   .align 2;                                                          \
00029   99: la t9,__syscall_error;                                                \
00030   jr t9;                                                             \
00031   ENTRY(name)                                                        \
00032   .set noreorder;                                                    \
00033   .cpload t9;                                                        \
00034   li v0, SYS_ify(syscall_name);                                             \
00035   syscall;                                                           \
00036   .set reorder;                                                             \
00037   bne a3, zero, 99b;                                                 \
00038 L(syse1):
00039 #else
00040 #define PSEUDO(name, syscall_name, args) \
00041   .set noreorder;                                                    \
00042   .align 2;                                                          \
00043   99: j __syscall_error;                                             \
00044   nop;                                                               \
00045   ENTRY(name)                                                        \
00046   .set noreorder;                                                    \
00047   li v0, SYS_ify(syscall_name);                                             \
00048   syscall;                                                           \
00049   .set reorder;                                                             \
00050   bne a3, zero, 99b;                                                 \
00051 L(syse1):
00052 #endif