summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/s390
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-09-23 05:17:06 +0000
committerUlrich Drepper <drepper@redhat.com>2004-09-23 05:17:06 +0000
commitbbb5e55c10a1b075089a9e54150010a6f202b567 (patch)
tree25b15de0d91644905a40f0348fa8e145b5ab1204 /sysdeps/unix/sysv/linux/s390
parent54915e9e373fdd0c15deca970ae4a04a17c598ad (diff)
Update.
2004-09-23 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/alpha/sysdep.h (inline_syscall[0-6]): Change name argument to numbers from syscall names. (INLINE_SYSCALL1): Pass __NR_##name to inline_syscall##nr. (INTERNAL_SYSCALL_NCS): Renamed from... (INTERNAL_SYSCALL_1): ... this. Use INTERNAL_SYSCALL_NCS. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (INTERNAL_SYSCALL_NCS): Define. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (INTERNAL_SYSCALL_NCS): Likewise. * sysdeps/unix/sysv/linux/sparc/sysdep.h (inline_syscall[0-6]): Change name argument to numbers from syscall names. (INLINE_SYSCALL, INTERNAL_SYSCALL): Adjust. (INTERNAL_SYSCALL_NCS): Define.
Diffstat (limited to 'sysdeps/unix/sysv/linux/s390')
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h17
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h17
2 files changed, 30 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
index d759e4a664..55a2cd7443 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
@@ -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.
@@ -207,7 +207,20 @@
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; })
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
index f0d7cbe2d9..c7f3a03f26 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
@@ -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.
@@ -209,7 +209,20 @@
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; })