diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/s390/s390-32')
43 files changed, 172 insertions, 53 deletions
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/____longjmp_chk.c b/sysdeps/unix/sysv/linux/s390/s390-32/____longjmp_chk.c index 606c2b50b9..a1b7a6a1ae 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/____longjmp_chk.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/____longjmp_chk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2013 Free Software Foundation, Inc. +/* Copyright (C) 2009-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>. @@ -26,8 +26,8 @@ #include <stdint.h> #include <signal.h> #include <sys/syscall.h> - -#define __longjmp ____longjmp_chk +#include <libc-symbols.h> +#include <shlib-compat.h> #define CHECK_SP(env, guard) \ do \ @@ -51,4 +51,22 @@ } \ } while (0) -#include "__longjmp.c" + +#if defined NOT_IN_libc +/* Build a non-versioned object for rtld-*. */ +# define __longjmp ____longjmp_chk +# include "__longjmp-common.c" + +#else /* !NOT_IN_libc */ +# define __longjmp ____v2__longjmp_chk +# include "__longjmp-common.c" + +# if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_11, GLIBC_2_19) +# undef __longjmp +# define __V1_JMPBUF +# define __longjmp ____v1__longjmp_chk +# include "__longjmp-common.c" +# undef __longjmp + +# endif +#endif /* !NOT_IN_libc */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S b/sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S index 2a22834108..83cf0d8ffa 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/__makecontext_ret.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2012-2013 Free Software Foundation, Inc. +/* Copyright (C) 2012-2014 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 diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/chown.c b/sysdeps/unix/sysv/linux/s390/s390-32/chown.c index 7fbd28a255..1fee84af1f 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/chown.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/chown.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 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 diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/clone.S b/sysdeps/unix/sysv/linux/s390/s390-32/clone.S index dc7835dfd8..f26c22936a 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/clone.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S b/sysdeps/unix/sysv/linux/s390/s390-32/getcontext-common.S index 6923f0eb11..4992030239 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/getcontext.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/getcontext-common.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2013 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). @@ -19,6 +19,7 @@ #include <sysdep.h> #include <features.h> +#include "rtld-global-offsets.h" #include "ucontext_i.h" /* __getcontext (const ucontext_t *ucp) @@ -33,10 +34,10 @@ ENTRY(__getcontext) lr %r1,%r2 - /* sigprocmask (SIG_BLOCK, NULL, &sc->sc_mask). */ + /* rt_sigprocmask (SIG_BLOCK, NULL, &sc->sc_mask, sigsetsize). */ la %r2,SIG_BLOCK slr %r3,%r3 - la %r4,SC_MASK(%r1) + la %r4,SC_MASK(%r1) lhi %r5,_NSIG8 svc SYS_ify(rt_sigprocmask) @@ -59,6 +60,42 @@ ENTRY(__getcontext) std %f14,SC_FPRS+112(%r1) std %f15,SC_FPRS+120(%r1) + lhi %r2,0 +#ifndef __V1_UCONTEXT + bras %r3,0f +# ifdef IS_IN_rtld + /* Within ld.so we can do slightly better by addressing dl_hwap + relative to GOT start. */ +1: .long _GLOBAL_OFFSET_TABLE_ - 1b + .long C_SYMBOL_NAME(_rtld_global_ro)@GOTOFF +0: l %r4,0(%r3) + la %r4,0(%r3,%r4) + l %r5,4(%r3) + /* _dl_hwcap is 64 bit and we need the lower 32. */ + l %r3,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+4(%r4,%r5) +# elif PIC +1: .long _GLOBAL_OFFSET_TABLE_ - 1b + .long C_SYMBOL_NAME(_rtld_global_ro)@GOT +0: l %r4,0(%r3) + la %r4,0(%r3,%r4) /* GOT pointer -> r4 */ + l %r5,4(%r3) /* GOT offset -> r5 */ + l %r5,0(%r4,%r5) /* GOT slot -> r5 */ + l %r3,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET+4(%r5) +# else + .long C_SYMBOL_NAME(_dl_hwcap) +0: l %r3,0(%r3) + l %r3,0(%r3) +# endif + tml %r3,512 /* HWCAP_S390_HIGH_GPRS */ + jz 2f + /* highgprs implies zarch so stmh/oill is ok here. */ + .machine "z900" + .machinemode "zarch_nohighgprs" + stmh %r0,%r15,SC_HIGHGPRS(%r1) + oill %r2,1 /* UCONTEXT_UC_FLAGS_HIGH_GPRS */ +#endif +2: st %r2,SC_FLGS(%r1) + /* Set __getcontext return value to 0. */ slr %r2,%r2 diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutent.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutent.c index b7042d3c7b..89641c9ae2 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutent.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/getutent.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c index e1afcc0bff..db24515051 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/getutent_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutid.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutid.c index 32f1f25981..263ecd46f9 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutid.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/getutid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c index 2f787ae616..df8c7de0e5 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/getutid_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutline.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutline.c index b785176557..273eb6de2d 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutline.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/getutline.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c index 6066b94efa..385bfb9158 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c index 8d715dee6a..e6273328e1 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/getutmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c index f9b7f6d5f4..f1c2c00a09 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/getutxent.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c index 3dfca4f6c0..0181ed9195 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/getutxid.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c b/sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c index e31c93b2d7..f401c92113 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/getutxline.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/lchown.c b/sysdeps/unix/sysv/linux/s390/s390-32/lchown.c index 0b7073c14a..cfa7e97a2e 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/lchown.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/lchown.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 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 diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/login.c b/sysdeps/unix/sysv/linux/s390/s390-32/login.c index 83bf5120e7..487ac45668 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/login.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/login.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/login32.c b/sysdeps/unix/sysv/linux/s390/s390-32/login32.c index 1ee6401cd3..0007f9cd1f 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/login32.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/login32.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c b/sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c index d7a6994a8e..220706c755 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/makecontext.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2013 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S b/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S index 8f6ac641b2..8844d4272e 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/mmap.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S b/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S index fd543be971..e747beb59c 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/mmap64.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist index b6256d5c25..03f2e83805 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libc.abilist @@ -1774,6 +1774,17 @@ GLIBC_2.17 GLIBC_2.18 GLIBC_2.18 A __cxa_thread_atexit_impl F +GLIBC_2.19 + GLIBC_2.19 A + __longjmp_chk F + __setjmp F + __sigsetjmp F + _longjmp F + _setjmp F + getcontext F + longjmp F + setjmp F + siglongjmp F GLIBC_2.2 GLIBC_2.2 A _IO_adjust_wcolumn F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libpthread.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libpthread.abilist index 865364e130..699de0160c 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libpthread.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/nptl/libpthread.abilist @@ -178,6 +178,10 @@ GLIBC_2.18 GLIBC_2.18 A pthread_getattr_default_np F pthread_setattr_default_np F +GLIBC_2.19 + GLIBC_2.19 A + longjmp F + siglongjmp F GLIBC_2.2 GLIBC_2.2 A __open64 F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c b/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c index 08032bddab..ffcb454f8f 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2013 Free Software Foundation, Inc. +/* Copyright (C) 2003-2014 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 diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/profil-counter.h b/sysdeps/unix/sysv/linux/s390/s390-32/profil-counter.h index 78a86d820b..7f279072b4 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/profil-counter.h +++ b/sysdeps/unix/sysv/linux/s390/s390-32/profil-counter.h @@ -1,5 +1,5 @@ /* Low-level statistical profiling support function. Linux/s390 version. - Copyright (C) 2000-2013 Free Software Foundation, Inc. + Copyright (C) 2000-2014 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 diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c b/sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c index 8d9c9e0670..9b27396057 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/pututxline.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h b/sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h index 41e6ba5731..fc58e0b7b0 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h +++ b/sysdeps/unix/sysv/linux/s390/s390-32/register-dump.h @@ -1,5 +1,5 @@ /* Dump registers. - Copyright (C) 2000-2013 Free Software Foundation, Inc. + Copyright (C) 2000-2014 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S b/sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S index 03d200880b..fbe8b77caf 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/setcontext.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2013 Free Software Foundation, Inc. +/* Copyright (C) 2001-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). @@ -33,7 +33,7 @@ ENTRY(__setcontext) lr %r1,%r2 - /* sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL). */ + /* rt_sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL, sigsetsize). */ la %r2,SIG_BLOCK la %r3,SC_MASK(%r1) slr %r4,%r4 @@ -62,8 +62,16 @@ ENTRY(__setcontext) /* Don't touch %a0, used for thread purposes. */ lam %a1,%a15,SC_ACRS+4(%r1) + /* Restore the upper halfs if available. */ + l %r2,SC_FLGS(%r1) + tml %r2,1 /* UCONTEXT_UC_FLAGS_HIGH_GPRS */ + jz 0f + .machine "z900" + .machinemode "zarch_nohighgprs" + lmh %r0,%r15,SC_HIGHGPRS(%r1) + /* Load general purpose registers. */ - lm %r0,%r15,SC_GPRS(%r1) +0: lm %r0,%r15,SC_GPRS(%r1) /* Return. */ br %r14 diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/socket.S b/sysdeps/unix/sysv/linux/s390/s390-32/socket.S index 6c9111574a..f3ebb5a55f 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/socket.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/socket.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S b/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S index b022f2ca74..41ede4b7b2 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/swapcontext.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2002-2013 Free Software Foundation, Inc. +/* Copyright (C) 2002-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). @@ -33,6 +33,9 @@ other than the PRESERVED state. */ ENTRY(__swapcontext) + /* While not part of the ABI a system call never clobbers r0 + or r1. So keeping the values here while calling + rt_sigprocmask is ok. */ lr %r1,%r2 lr %r0,%r3 @@ -62,19 +65,31 @@ ENTRY(__swapcontext) std %f14,SC_FPRS+112(%r1) std %f15,SC_FPRS+120(%r1) - /* Set __swapcontext return value to 0. */ - slr %r2,%r2 - /* Store access registers. */ stam %a0,%a15,SC_ACRS(%r1) + /* Set __swapcontext return value to 0. */ + slr %r2,%r2 + /* Store general purpose registers. */ stm %r0,%r15,SC_GPRS(%r1) - /* sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL). */ - la %r2,SIG_BLOCK + /* Copy uc_flags into the new ucontext_t. */ lr %r5,%r0 - la %r3,SC_MASK(%r5) + l %r2,SC_FLGS(%r5) + st %r2,SC_FLGS(%r1) + + /* Save/restore the upper halfs if necessary. */ + tml %r2,1 /* UCONTEXT_UC_FLAGS_HIGH_GPRS */ + jz 0f + .machine "z900" + .machinemode "zarch_nohighgprs" + stmh %r0,%r15,SC_HIGHGPRS(%r1) + lmh %r0,%r15,SC_HIGHGPRS(%r5) + + /* rt_sigprocmask (SIG_SETMASK, &sc->sc_mask, NULL, sigsetsize). */ +0: la %r2,SIG_BLOCK + la %r3,SC_MASK(%r5) slr %r4,%r4 lhi %r5,_NSIG8 svc SYS_ify(rt_sigprocmask) diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/syscall.S b/sysdeps/unix/sysv/linux/s390/s390-32/syscall.S index 7037119ab1..c901cc2df8 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/syscall.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/syscall.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S index 66eb6053d6..de3f8a4e84 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S +++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h index 18a7ad4b57..fa7c8c50e5 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-2013 Free Software Foundation, Inc. +/* Copyright (C) 2000-2014 Free Software Foundation, Inc. Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com). This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.sym b/sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.sym new file mode 100644 index 0000000000..705c7ab6cf --- /dev/null +++ b/sysdeps/unix/sysv/linux/s390/s390-32/ucontext_i.sym @@ -0,0 +1,26 @@ +#include <stddef.h> +#include <signal.h> +#include <sys/ucontext.h> + +-- + +SIG_BLOCK +SIG_UNBLOCK +SIG_SETMASK + +_NSIG8 (_NSIG / 8) + +#define ucontext(member) offsetof (ucontext_t, member) +#define mcontext(member) ucontext (uc_mcontext.member) + +SC_FLGS ucontext (uc_flags) +SC_LINK ucontext (uc_link) +SC_STCK ucontext (uc_stack.ss_sp) +SC_STSZ ucontext (uc_stack.ss_size) +SC_PSW mcontext (psw) +SC_GPRS mcontext (gregs) +SC_ACRS mcontext (aregs) +SC_FPC mcontext (fpregs.fpc) +SC_FPRS mcontext (fpregs.fprs) +SC_MASK ucontext (uc_sigmask) +SC_HIGHGPRS ucontext (uc_high_gprs) diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c b/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c index f79fbcc990..3345483ce0 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/updwtmp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c b/sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c index 75869e5bdb..5afb8468a0 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/updwtmpx.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmp-compat.h b/sysdeps/unix/sysv/linux/s390/s390-32/utmp-compat.h index 53a778d087..655cdfd892 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/utmp-compat.h +++ b/sysdeps/unix/sysv/linux/s390/s390-32/utmp-compat.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmp-convert.h b/sysdeps/unix/sysv/linux/s390/s390-32/utmp-convert.h index 90324ebfad..ad4f937b8d 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/utmp-convert.h +++ b/sysdeps/unix/sysv/linux/s390/s390-32/utmp-convert.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c b/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c index 37e0950578..510765bc3a 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.h b/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.h index ae7f04d0b9..3eb23f90e4 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.h +++ b/sysdeps/unix/sysv/linux/s390/s390-32/utmp32.h @@ -1,5 +1,5 @@ /* The `struct utmp' type, describing entries in the utmp file. GNU version. - Copyright (C) 1993-2013 Free Software Foundation, Inc. + Copyright (C) 1993-2014 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 diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx-convert.h b/sysdeps/unix/sysv/linux/s390/s390-32/utmpx-convert.h index 0a96f79ac9..4dae6c2142 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx-convert.h +++ b/sysdeps/unix/sysv/linux/s390/s390-32/utmpx-convert.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c b/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c index fc134f378b..df67a7776d 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c +++ b/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2013 Free Software Foundation, Inc. +/* Copyright (C) 2008-2014 Free Software Foundation, Inc. Contributed by Andreas Krebbel <Andreas.Krebbel@de.ibm.com>. This file is part of the GNU C Library. diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h b/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h index 9e4f33d485..d9fbf4e915 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h +++ b/sysdeps/unix/sysv/linux/s390/s390-32/utmpx32.h @@ -1,5 +1,5 @@ /* The `struct utmp' type, describing entries in the utmp file. GNU version. - Copyright (C) 1993-2013 Free Software Foundation, Inc. + Copyright (C) 1993-2014 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 |