about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/hppa/setcontext.S
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrightsJoseph Myers2023-01-061-1/+1
|
* hppa: Revise gettext trampoline designJohn David Anglin2022-02-221-1/+5
| | | | | | | | | | | | | | | | | | | The current getcontext return trampoline is overly complex and it unnecessarily clobbers several registers. By saving the context pointer (r26) in the context, __getcontext_ret can restore any registers not restored by setcontext. This allows getcontext to save and restore the entire register context present when getcontext is entered. We use the unused oR0 context slot for the return from __getcontext_ret. While this is not directly useful in C, it can be exploited in assembly code. Registers r20, r23, r24 and r25 are not clobbered in the call path to getcontext. This allows a small simplification of swapcontext. It also allows saving and restoring the 6-bit SAR register in the LSB of the oSAR context slot. The getcontext flag value can be stored in the MSB of the oSAR slot.
* hppa: Fix swapcontextJohn David Anglin2022-02-181-0/+3
| | | | | | | | | | | | | | | | | This change fixes the failure of stdlib/tst-setcontext2 and stdlib/tst-setcontext7 on hppa. The implementation of swapcontext in C is broken. C saves the return pointer (rp) and any non call-clobbered registers (in this case r3, r4 and r5) on the stack. However, the setcontext call in swapcontext pops the stack and subsequent calls clobber the saved registers. When the context in oucp is restored, both tests fault. Here we rewrite swapcontext in assembly code to avoid using the stack for register values that need to be used after restoration. The getcontext and setcontext routines are revised to save and restore register ret1 for normal returns. We copy the oucp pointer to ret1. This allows access to the old context after calling getcontext and setcontext.
* Update copyright dates with scripts/update-copyrightsPaul Eggert2022-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 7061 files FOO. I then removed trailing white space from math/tgmath.h, support/tst-support-open-dev-null-range.c, and sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following obscure pre-commit check failure diagnostics from Savannah. I don't know why I run into these diagnostics whereas others evidently do not. remote: *** 912-#endif remote: *** 913: remote: *** 914- remote: *** error: lines with trailing whitespace found ... remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
* Remove "Contributed by" linesSiddhesh Poyarekar2021-09-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | We stopped adding "Contributed by" or similar lines in sources in 2012 in favour of git logs and keeping the Contributors section of the glibc manual up to date. Removing these lines makes the license header a bit more consistent across files and also removes the possibility of error in attribution when license blocks or files are copied across since the contributed-by lines don't actually reflect reality in those cases. Move all "Contributed by" and similar lines (Written by, Test by, etc.) into a new file CONTRIBUTED-BY to retain record of these contributions. These contributors are also mentioned in manual/contrib.texi, so we just maintain this additional record as a courtesy to the earlier developers. The following scripts were used to filter a list of files to edit in place and to clean up the CONTRIBUTED-BY file respectively. These were not added to the glibc sources because they're not expected to be of any use in future given that this is a one time task: https://gist.github.com/siddhesh/b5ecac94eabfd72ed2916d6d8157e7dc https://gist.github.com/siddhesh/15ea1f5e435ace9774f485030695ee02 Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Update copyright dates with scripts/update-copyrightsPaul Eggert2021-01-021-1/+1
| | | | | | | | | | | | | | | | I used these shell commands: ../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright (cd ../glibc && git commit -am"[this commit message]") and then ignored the output, which consisted lines saying "FOO: warning: copyright statement not found" for each of 6694 files FOO. I then removed trailing white space from benchtests/bench-pthread-locks.c and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this diagnostic from Savannah: remote: *** pre-commit check failed ... remote: *** error: lines with trailing whitespace found remote: error: hook declined to update refs/heads/master
* Update copyright dates with scripts/update-copyrights.Joseph Myers2020-01-011-1/+1
|
* Prefer https to http for gnu.org and fsf.org URLsPaul Eggert2019-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
* Update copyright dates with scripts/update-copyrights.Joseph Myers2019-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Fix hppa local PLT entries for sigprocmask (bug 18124).Joseph Myers2018-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When adding/updating localplt.data for various architectures to get the compilation tests passing everywhere, I generally made it reflect the existing state of what local PLT entries were actually seen, rather than an ideal state with as few as possible such entries, mainly for functions that are intended to be interposable. This patch eliminates some local PLT entries for hppa by using __sigprocmask instead of sigprocmask in getcontext and setcontext. The specific case of sigprocmask called by setcontext is the third of four items in bug 18124 (the other three have already been fixed for 2.26 or earlier releases). Note that hppa-specific localplt.data entries for __sigsetjmp, _IO_funlockfile and __errno_location remain, but the causes / fixes are less immediately obvious from source inspection. Tested (compilation tests only) with build-many-glibcs.py for hppa-linux-gnu. [BZ #18124] * sysdeps/hppa/bsd-setjmp.S: Include <sysdep.h>. (setjmp): Use HIDDEN_JUMPTARGET with __sigsetjmp. * sysdeps/unix/sysv/linux/hppa/getcontext.S (__getcontext): Call __sigprocmask instead of sigprocmask. * sysdeps/unix/sysv/linux/hppa/setcontext.S (__setcontext): Likewise. * sysdeps/unix/sysv/linux/hppa/localplt.data: Remove entries for __sigsetjmp and sigprocmask.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* Fix return pointer save and PIC register restore in __getcontext andJohn David Anglin2017-10-011-1/+3
| | | | | | | | | __setcontext on hppa. * sysdeps/unix/sysv/linux/hppa/getcontext.S (__getcontext): Save return pointer in frame. * sysdeps/unix/sysv/linux/hppa/setcontext.S (__setcontext): Likewise. Correct offset used to restore PIC register.
* Add CFI annotation.John David Anglin2017-07-161-0/+3
|
* Fix __setcontext return value on hppa.John David Anglin2017-07-161-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* Update copyright dates with scripts/update-copyrights.Joseph Myers2016-01-041-1/+1
|
* Bug 18125: Call exit after last linked context.Carlos O'Donell2015-05-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There appears to be a discrepancy among the implementations of setcontext with regards to the function called once the last linked-to context has finished executing via setcontext. The POSIX standard says: ~~~ If the uc_link member of the ucontext_t structure pointed to by the ucp argument is equal to 0, then this context is the main context, and the thread will exit when this context returns. ~~~ It says "exit" not "exit immediately" nor "exit without running functions registered with atexit or on_exit." Therefore the AArch64, ARM, hppa and NIOS II implementations are wrong and no test detects it. It is questionable if this should even be fixed or just documented that the above 4 targets are wrong. The functions are deprecated and nobody should be using them, but at the same time it silly to have cross-target differences that make it hard to port old applications from say x86_64 to AArch64. Therefore I will ix the 4 arches, and checkin a regression test to prevent it from changing again. https://sourceware.org/ml/libc-alpha/2015-03/msg00720.html
* Update copyright dates with scripts/update-copyrights.Joseph Myers2015-01-021-1/+1
|
* Relocate hppa from ports to libc.Carlos O'Donell2014-04-291-0/+157