diff options
author | John David Anglin <danglin@gcc.gnu.org> | 2022-02-22 17:28:46 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2022-02-22 17:28:46 +0000 |
commit | 9e7e5fda38471e00d1190479ea91d7b08ae3e304 (patch) | |
tree | 7a811ee404068f85a8bc877c029daaa1f04c0793 /sysvipc | |
parent | fdc1ae67fef27eea1445bab4bdfe2f0fb3bc7aa1 (diff) | |
download | glibc-9e7e5fda38471e00d1190479ea91d7b08ae3e304.tar.gz glibc-9e7e5fda38471e00d1190479ea91d7b08ae3e304.tar.xz glibc-9e7e5fda38471e00d1190479ea91d7b08ae3e304.zip |
hppa: Revise gettext trampoline design
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.
Diffstat (limited to 'sysvipc')
0 files changed, 0 insertions, 0 deletions