Define PSEUDO_NOERRNO, PSEUDO_END_NOERRNO, and ret_NOERRNO.
authorUlrich Drepper <drepper@redhat.com>
Sun, 23 Mar 2003 19:42:23 +0000 (19:42 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 23 Mar 2003 19:42:23 +0000 (19:42 +0000)
sysdeps/unix/alpha/sysdep.h
sysdeps/unix/sysv/linux/arm/sysdep.h
sysdeps/unix/sysv/linux/cris/sysdep.h
sysdeps/unix/sysv/linux/hppa/sysdep.h
sysdeps/unix/sysv/linux/m68k/sysdep.h

index cb04cec..6e55061 100644 (file)
@@ -119,6 +119,21 @@ $syscall_error:                                    \
        END(sym)
 #endif
 
+#define PSEUDO_NOERRNO(name, syscall_name, args)       \
+       .globl name;                                    \
+       .align 4;                                       \
+       .ent name,0;                                    \
+__LABEL(name)                                          \
+       PSEUDO_PROLOGUE;                                \
+       PSEUDO_PREPARE_ARGS                             \
+       lda     v0, SYS_ify(syscall_name);              \
+       call_pal PAL_callsys;
+
+#undef PSEUDO_END_NOERRNO
+#define PSEUDO_END_NOERRNO(sym)  END(sym)
+
+#define ret_NOERRNO ret
+
 #define r0     v0
 #define r1     a4
 
@@ -167,8 +182,8 @@ $syscall_error:                                     \
 /* If TLS is in use, we have a conflict between the PAL_rduniq primitive,
    as modeled within GCC, and explicit use of the R0 register.  If we use
    the register via the asm, the scheduler may place the PAL_rduniq insn
-   before we've copied the data from R0 into _sc_ret.  If this happens 
-   we'll get a reload abort, since R0 is live at the same time it is 
+   before we've copied the data from R0 into _sc_ret.  If this happens
+   we'll get a reload abort, since R0 is live at the same time it is
    needed for the PAL_rduniq.
 
    Solve this by using the "v" constraint instead of an asm for the syscall
index 785d3cf..3e3c874 100644 (file)
   SYSCALL_ERROR_HANDLER                                                              \
   END (name)
 
+#undef PSEUDO_NOERRNO
+#define        PSEUDO_NOERRNO(name, syscall_name, args)                              \
+  .text;                                                                     \
+  ENTRY (name);                                                                      \
+    DO_CALL (syscall_name, args);
+
+#define PSEUDO_RET_NOERRNO                                                   \
+    RETINSTR(movcc, pc, lr);                                                 \
+    nop
+#undef ret_NOERRNO
+#define ret_NOERRNO PSEUDO_RET_NOERRNO
+
+#undef PSEUDO_END_NOERRNO
+#define        PSEUDO_END_NOERRNO(name)                                              \
+  END (name)
+
 #if NOT_IN_libc
 # define SYSCALL_ERROR __local_syscall_error
 # define SYSCALL_ERROR_HANDLER                                 \
index 4446b26..f22a3d2 100644 (file)
@@ -1,5 +1,5 @@
 /* Assembler macros for CRIS.
-   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
   PLTJUMP (syscall_error)                              @ \
   END (name)
 
+#define        PSEUDO_NOERRNO(name, syscall_name, args) \
+  ENTRY        (name)                                          @ \
+  DOARGS_##args                                                @ \
+  movu.w SYS_ify (syscall_name),$r9                    @ \
+  break        13                                              @ \
+  UNDOARGS_return_##args
+
+#define ret_NOERRNO
+
+#define        PSEUDO_END_NOERRNO(name) \
+  END (name)
+
 #define DOARGS_0
 #define DOARGS_1
 #define DOARGS_2
index 4f08cc6..771c55c 100644 (file)
@@ -1,5 +1,5 @@
 /* Assembler macros for PA-RISC.
-   Copyright (C) 1999,2001,02 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper, <drepper@cygnus.com>, August 1999.
    Linux/PA-RISC changes by Philipp Rumpf, <prumpf@tux.org>, March 2000.
        bv 0(2)                                 ASM_LINE_SEP    \
        nop
 
+#define ret_NOERRNO \
+       bv 0(2)                                 ASM_LINE_SEP    \
+       nop
+
 #undef END
 #define END(name)                                              \
 1:     .size   C_SYMBOL_NAME(name),1b-C_SYMBOL_NAME(name)
 #define        PSEUDO_END(name)                                                      \
   END (name)
 
+#define        PSEUDO_NOERRNO(name, syscall_name, args)                              \
+  ENTRY (name)                                                               \
+  DO_CALL(syscall_name, args)                                  ASM_LINE_SEP  \
+  nop
+
+#undef PSEUDO_END_NOERRNO
+#define        PSEUDO_END_NOERRNO(name)                                              \
+  END (name)
+
 #define JUMPTARGET(name)       name
 #define SYSCALL_PIC_SETUP      /* Nothing.  */
 
index 125c584..23e4202 100644 (file)
   SYSCALL_ERROR_HANDLER;                                                     \
   END (name)
 
+#undef PSEUDO_NOERRNO
+#define        PSEUDO_NOERRNO(name, syscall_name, args)                              \
+  .text;                                                                     \
+  ENTRY (name)                                                               \
+    DO_CALL (syscall_name, args)
+
+#undef PSEUDO_END_NOERRNO
+#define PSEUDO_END_NOERRNO(name)                                             \
+  END (name)
+
 #ifdef PIC
 # if RTLD_PRIVATE_ERRNO
 #  define SYSCALL_ERROR_HANDLER                                                      \