(INTERNAL_SYSCALL_NCS): Define.
authordrepper <drepper>
Thu, 23 Sep 2004 05:16:04 +0000 (05:16 +0000)
committerdrepper <drepper>
Thu, 23 Sep 2004 05:16:04 +0000 (05:16 +0000)
sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h

index d759e4a..55a2cd7 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000,01,02,03 Free Software Foundation, Inc.
+/* Copyright (C) 2000,01,02,03,04 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
     asm volatile (                                                           \
     "svc    0\n\t"                                                           \
     : "=d" (_ret)                                                            \
-    : "d" (_nr), "i" (__NR_##name) ASMFMT_##nr                               \
+    : "d" (_nr) ASMFMT_##nr                                                  \
+    : "memory" );                                                            \
+    _ret; })
+
+#undef INTERNAL_SYSCALL_NCS
+#define INTERNAL_SYSCALL_NCS(no, err, nr, args...)                           \
+  ({                                                                         \
+    DECLARGS_##nr(args)                                                              \
+    register unsigned long _nr asm("1") = (unsigned long)(no);               \
+    register int _ret asm("2");                                                      \
+    asm volatile (                                                           \
+    "svc    0\n\t"                                                           \
+    : "=d" (_ret)                                                            \
+    : "d" (_nr) ASMFMT_##nr                                                  \
     : "memory" );                                                            \
     _ret; })
 
index f0d7cbe..c7f3a03 100644 (file)
@@ -1,5 +1,5 @@
 /* Assembler macros for 64 bit S/390.
-   Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
     asm volatile (                                                           \
     "svc    0\n\t"                                                           \
     : "=d" (_ret)                                                            \
-    : "d" (_nr), "i" (__NR_##name) ASMFMT_##nr                               \
+    : "d" (_nr) ASMFMT_##nr                                                  \
+    : "memory" );                                                            \
+    _ret; })
+
+#undef INTERNAL_SYSCALL_NCS
+#define INTERNAL_SYSCALL_NCS(no, err, nr, args...)                           \
+  ({                                                                         \
+    DECLARGS_##nr(args)                                                              \
+    register unsigned long _nr asm("1") = (unsigned long)(no);               \
+    register long _ret asm("2");                                             \
+    asm volatile (                                                           \
+    "svc    0\n\t"                                                           \
+    : "=d" (_ret)                                                            \
+    : "d" (_nr) ASMFMT_##nr                                                  \
     : "memory" );                                                            \
     _ret; })