diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-01-20 18:59:08 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-01-20 18:59:08 +0000 |
commit | d5b6c8179917acad6e8b46110179298b47dcaf5c (patch) | |
tree | 81e3f3da880e9bcd16c129cca50bedb2b6ab78d2 | |
parent | 4a9b34fe010debca945da57e04c519b51140045d (diff) | |
download | glibc-d5b6c8179917acad6e8b46110179298b47dcaf5c.zip glibc-d5b6c8179917acad6e8b46110179298b47dcaf5c.tar.gz glibc-d5b6c8179917acad6e8b46110179298b47dcaf5c.tar.bz2 |
Update.
2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
* sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (INTERNAL_SYSCALL):
Fix inline assembler constraints.
* sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (INTERNAL_SYSCALL):
Likewise.
* sysdeps/s390/s390-64/Makefile (pic-ccflag): Use -fpic instead of
-fPIC.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | linuxthreads/ChangeLog | 5 | ||||
-rw-r--r-- | sysdeps/s390/s390-64/Makefile | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h | 79 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h | 39 |
5 files changed, 45 insertions, 90 deletions
@@ -1,3 +1,13 @@ +2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com> + + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (INTERNAL_SYSCALL): + Fix inline assembler constraints. + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (INTERNAL_SYSCALL): + Likewise. + + * sysdeps/s390/s390-64/Makefile (pic-ccflag): Use -fpic instead of + -fPIC. + 2003-01-20 Segher Boessenkool <segher@koffie.nl> * sysdeps/ieee754/dbl-64/sincos32.c (__mpcos): Really diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 7b1fd74..f388b24 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,8 @@ +2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com> + + * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative + reference to __fork. + 2003-01-17 Richard Henderson <rth@redhat.com> * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member. diff --git a/sysdeps/s390/s390-64/Makefile b/sysdeps/s390/s390-64/Makefile index 179c122..0a50514 100644 --- a/sysdeps/s390/s390-64/Makefile +++ b/sysdeps/s390/s390-64/Makefile @@ -1,4 +1,4 @@ -pic-ccflag = -fPIC +pic-ccflag = -fpic ifeq ($(subdir),gmon) sysdep_routines += s390x-mcount diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h index 28600fe..e89e6a1 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h +++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h @@ -132,15 +132,13 @@ #define INTERNAL_SYSCALL(name, err, nr, args...) \ ({ \ DECLARGS_##nr(args) \ - int _ret; \ + register int _ret asm("2"); \ asm volatile ( \ - LOADARGS_##nr \ "svc %b1\n\t" \ - "lr %0,%%r2\n\t" \ : "=d" (_ret) \ - : "I" (__NR_##name) ASMFMT_##nr \ - : "memory", "cc", "2", "3", "4", "5", "6"); \ - (int) _ret; }) + : "i" (__NR_##name) ASMFMT_##nr \ + : "memory" ); \ + _ret; }) #undef INTERNAL_SYSCALL_ERROR_P #define INTERNAL_SYSCALL_ERROR_P(val, err) \ @@ -151,74 +149,25 @@ #define DECLARGS_0() #define DECLARGS_1(arg1) \ - unsigned int gpr2 = (unsigned int) (arg1); -#define DECLARGS_2(arg1, arg2) \ - DECLARGS_1(arg1) \ - unsigned int gpr3 = (unsigned int) (arg2); -#define DECLARGS_3(arg1, arg2, arg3) \ - DECLARGS_2(arg1, arg2) \ - unsigned int gpr4 = (unsigned int) (arg3); -#define DECLARGS_4(arg1, arg2, arg3, arg4) \ - DECLARGS_3(arg1, arg2, arg3) \ - unsigned int gpr5 = (unsigned int) (arg4); -#define DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \ - DECLARGS_4(arg1, arg2, arg3, arg4) \ - unsigned int gpr6 = (unsigned int) (arg5); - -#define LOADARGS_0 -#define LOADARGS_1 "L 2,%2\n\t" -#define LOADARGS_2 LOADARGS_1 "L 3,%3\n\t" -#define LOADARGS_3 LOADARGS_2 "L 4,%4\n\t" -#define LOADARGS_4 LOADARGS_3 "L 5,%5\n\t" -#define LOADARGS_5 LOADARGS_4 "L 6,%6\n\t" - -#define ASMFMT_0 -#define ASMFMT_1 , "m" (gpr2) -#define ASMFMT_2 , "m" (gpr2), "m" (gpr3) -#define ASMFMT_3 , "m" (gpr2), "m" (gpr3), "m" (gpr4) -#define ASMFMT_4 , "m" (gpr2), "m" (gpr3), "m" (gpr4), "m" (gpr5) -#define ASMFMT_5 , "m" (gpr2), "m" (gpr3), "m" (gpr4), "m" (gpr5), "m" (gpr6) - -#if 0 -#undef INLINE_SYSCALL -#define INLINE_SYSCALL(name, nr, args...) \ - ({ \ - DECLARGS_##nr(args) \ - asm volatile ( \ - "svc %b1\n\t" \ - : "+d" (gpr2) \ - : "I" (__NR_##name) ASMFMT_##nr : "memory", "cc"); \ - if (gpr2 >= 0xfffff001) \ - { \ - __set_errno(-gpr2); \ - gpr2 = 0xffffffff; \ - } \ - (int) gpr2; }) - -#define DECLARGS_0() \ - register unsigned int gpr2 asm("2"); -#define DECLARGS_1(arg1) \ - register unsigned int gpr2 asm("2") = (unsigned int) (arg1); + register unsigned long gpr2 asm ("2") = (unsigned long)(arg1); #define DECLARGS_2(arg1, arg2) \ DECLARGS_1(arg1) \ - register unsigned int gpr3 asm("3") = (unsigned int) (arg2); + register unsigned long gpr3 asm ("3") = (unsigned long)(arg2); #define DECLARGS_3(arg1, arg2, arg3) \ DECLARGS_2(arg1, arg2) \ - register unsigned int gpr4 asm("4") = (unsigned int) (arg3); + register unsigned long gpr4 asm ("4") = (unsigned long)(arg3); #define DECLARGS_4(arg1, arg2, arg3, arg4) \ DECLARGS_3(arg1, arg2, arg3) \ - register unsigned int gpr5 asm("5") = (unsigned int) (arg4); + register unsigned long gpr5 asm ("5") = (unsigned long)(arg4); #define DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \ DECLARGS_4(arg1, arg2, arg3, arg4) \ - register unsigned int gpr6 asm("6") = (unsigned int) (arg5); + register unsigned long gpr6 asm ("6") = (unsigned long)(arg5); #define ASMFMT_0 -#define ASMFMT_1 -#define ASMFMT_2 , "d" (gpr3) -#define ASMFMT_3 , "d" (gpr3), "d" (gpr4) -#define ASMFMT_4 , "d" (gpr3), "d" (gpr4), "d" (gpr5) -#define ASMFMT_5 , "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6) - -#endif /* 0 */ +#define ASMFMT_1 , "0" (gpr2) +#define ASMFMT_2 , "0" (gpr2), "d" (gpr3) +#define ASMFMT_3 , "0" (gpr2), "d" (gpr3), "d" (gpr4) +#define ASMFMT_4 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5) +#define ASMFMT_5 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6) #endif /* _LINUX_S390_SYSDEP_H */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h index 5f0c9fd..dbe77df 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h +++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h @@ -19,7 +19,7 @@ 02111-1307 USA. */ #ifndef _LINUX_S390_SYSDEP_H -#define _LINUX_S390_SYSEDP_H +#define _LINUX_S390_SYSDEP_H #include <sysdeps/s390/s390-64/sysdep.h> #include <sysdeps/unix/sysdep.h> @@ -126,15 +126,13 @@ #define INTERNAL_SYSCALL(name, err, nr, args...) \ ({ \ DECLARGS_##nr(args) \ - int _ret; \ + register int _ret asm("2"); \ asm volatile ( \ - LOADARGS_##nr \ "svc %b1\n\t" \ - "lgr %0,%%r2\n\t" \ : "=d" (_ret) \ - : "I" (__NR_##name) ASMFMT_##nr \ - : "memory", "cc", "2", "3", "4", "5", "6"); \ - (int) _ret; }) + : "i" (__NR_##name) ASMFMT_##nr \ + : "memory" ); \ + _ret; }) #undef INTERNAL_SYSCALL_ERROR_P #define INTERNAL_SYSCALL_ERROR_P(val, err) \ @@ -145,32 +143,25 @@ #define DECLARGS_0() #define DECLARGS_1(arg1) \ - unsigned long gpr2 = (unsigned long) (arg1); + register unsigned long gpr2 asm ("2") = (unsigned long)(arg1); #define DECLARGS_2(arg1, arg2) \ DECLARGS_1(arg1) \ - unsigned long gpr3 = (unsigned long) (arg2); + register unsigned long gpr3 asm ("3") = (unsigned long)(arg2); #define DECLARGS_3(arg1, arg2, arg3) \ DECLARGS_2(arg1, arg2) \ - unsigned long gpr4 = (unsigned long) (arg3); + register unsigned long gpr4 asm ("4") = (unsigned long)(arg3); #define DECLARGS_4(arg1, arg2, arg3, arg4) \ DECLARGS_3(arg1, arg2, arg3) \ - unsigned long gpr5 = (unsigned long) (arg4); + register unsigned long gpr5 asm ("5") = (unsigned long)(arg4); #define DECLARGS_5(arg1, arg2, arg3, arg4, arg5) \ DECLARGS_4(arg1, arg2, arg3, arg4) \ - unsigned long gpr6 = (unsigned long) (arg5); - -#define LOADARGS_0 -#define LOADARGS_1 "LG 2,%2\n\t" -#define LOADARGS_2 LOADARGS_1 "LG 3,%3\n\t" -#define LOADARGS_3 LOADARGS_2 "LG 4,%4\n\t" -#define LOADARGS_4 LOADARGS_3 "LG 5,%5\n\t" -#define LOADARGS_5 LOADARGS_4 "LG 6,%6\n\t" + register unsigned long gpr6 asm ("6") = (unsigned long)(arg5); #define ASMFMT_0 -#define ASMFMT_1 , "m" (gpr2) -#define ASMFMT_2 , "m" (gpr2), "m" (gpr3) -#define ASMFMT_3 , "m" (gpr2), "m" (gpr3), "m" (gpr4) -#define ASMFMT_4 , "m" (gpr2), "m" (gpr3), "m" (gpr4), "m" (gpr5) -#define ASMFMT_5 , "m" (gpr2), "m" (gpr3), "m" (gpr4), "m" (gpr5), "m" (gpr6) +#define ASMFMT_1 , "0" (gpr2) +#define ASMFMT_2 , "0" (gpr2), "d" (gpr3) +#define ASMFMT_3 , "0" (gpr2), "d" (gpr3), "d" (gpr4) +#define ASMFMT_4 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5) +#define ASMFMT_5 , "0" (gpr2), "d" (gpr3), "d" (gpr4), "d" (gpr5), "d" (gpr6) #endif /* _LINUX_S390_SYSDEP_H */ |