History log of /src/lib/libc/arch/i386/gen/setjmp.S |
Revision | | Date | Author | Comments |
1.19 |
| 03-May-2025 |
riastradh | libc/i386: Omit needless __PIC__ conditionals.
No binary change.
PR lib/59391: unnecessary __PIC__ conditionals clutter .S files
|
1.18 |
| 04-Apr-2024 |
riastradh | branches: 1.18.2; i386 longjmp: Restore stack first, then signal mask.
Otherwise, a pending signal may be delivered on the wrong stack when we restore the signal mask.
While here:
- Tidy the code a little bit. - Sprinkle comments to explain what's going on. - Use forward branches for statically predicted not-taken. => val==0 is unlikely in longjmp
PR lib/57946
|
1.17 |
| 23-May-2014 |
uebayasi | branches: 1.17.26; 1.17.34; Fix previous.
|
1.16 |
| 23-May-2014 |
uebayasi | Put missing END() markers to set ELF symbol size.
|
1.15 |
| 12-Sep-2013 |
joerg | branches: 1.15.2; Pass PICFLAGS down to cc-as-as and use __PIC__ to decide if it is small vs big PIC mode. Retire -DPIC and -DBIGPIC.
|
1.14 |
| 13-Sep-2005 |
christos | branches: 1.14.44; 1.14.50; compat core reorg.
|
1.13 |
| 07-Aug-2003 |
agc | Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22280, verified by myself.
|
1.12 |
| 13-Feb-1999 |
christos | For don't mess up the stack before calling syscall when using PIC_PROLOGUE.
|
1.11 |
| 08-Feb-1999 |
christos | Amend for the PLT fixes, things broke last night with the changes to SYS.h and cerror.S. In particular, the syscalls in the files committed below were broken.
|
1.10 |
| 01-Jul-1998 |
thorpej | Generate C labels with _C_LABEL().
|
1.9 |
| 16-Jul-1997 |
christos | RCSID fixes: Always use the NetBSD rcsid and the macro RCSID() defined in <machine/asm.h>; Also syscalls should be protected using the SYSLIBC_SCCS define not LIBC_SCCS
|
1.8 |
| 28-Dec-1995 |
jtc | Remove #include "SYS.h"; it is not needed (by normal assembly functions)
|
1.7 |
| 28-Dec-1995 |
jtc | Use <machine/asm.h> instead of DEFS.h
|
1.6 |
| 24-Dec-1994 |
jtc | Replaced pops with adds.
|
1.5 |
| 27-Jan-1994 |
mycroft | Pedanticism.
|
1.4 |
| 21-Oct-1993 |
jtc | So many files in arch/i386 have been changed I might as well run my remove unecessary trailing whitespace script.
|
1.3 |
| 21-Oct-1993 |
jtc | Change instances of LIBC_RCS back to LIBC_SCCS. If we are going to change th LIBC_RCS, the entire source tree should be updated at once. Remove && !defined(lint) from conditionals around rcs id's. No one is ever going to pass a *.s file through lint.
|
1.2 |
| 20-Oct-1993 |
jtc | Replaced instructions with immediate operands with compatible alternatives saving a few bytes while the cycle count remains the same --- could actually be faster, depending on the cache, prefetch queue, etc.
|
1.1 |
| 07-Oct-1993 |
cgd | make an arch directory in libc, and move all machine dirs into it
|
1.14.50.1 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.14.44.1 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.15.2.1 |
| 10-Aug-2014 |
tls | Rebase.
|
1.17.34.1 |
| 23-Aug-2024 |
martin | Pull up following revision(s) (requested by riastradh in ticket #795):
tests/lib/libc/setjmp/Makefile: revision 1.3 distrib/sets/lists/debug/mi: revision 1.425 lib/libc/arch/sh3/gen/setjmp.S: revision 1.12 lib/libc/arch/i386/gen/sigsetjmp.S: revision 1.19 lib/libc/arch/x86_64/gen/__setjmp14.S: revision 1.4 tests/lib/libc/setjmp/t_sigstack.c: revision 1.10 tests/lib/libc/setjmp/t_sigstack.c: revision 1.11 tests/lib/libc/setjmp/t_sigstack.c: revision 1.12 tests/lib/libc/setjmp/t_sigstack.c: revision 1.1 lib/libc/arch/sh3/gen/sigsetjmp.S: revision 1.11 tests/lib/libc/setjmp/t_sigstack.c: revision 1.2 tests/lib/libc/setjmp/t_sigstack.c: revision 1.3 tests/lib/libc/setjmp/t_sigstack.c: revision 1.4 tests/lib/libc/setjmp/t_sigstack.c: revision 1.5 tests/lib/libc/setjmp/t_sigstack.c: revision 1.6 lib/libc/arch/arm/gen/setjmp.S: revision 1.19 tests/lib/libc/setjmp/t_sigstack.c: revision 1.7 tests/lib/libc/setjmp/t_sigstack.c: revision 1.8 tests/lib/libc/setjmp/t_sigstack.c: revision 1.9 lib/libc/arch/i386/gen/setjmp.S: revision 1.18 lib/libc/arch/x86_64/gen/__sigsetjmp14.S: revision 1.4 distrib/sets/lists/tests/mi: revision 1.1306
longjmp(3): Add test for PR lib/57946.
longjmp(3): Paranoia: more error checking in PR lib/57946 test.
longjmp(3): Test signal mask vs stack restore with siglongjmp too. PR lib/57946
longjmp(3) t_sigstack: Print which entry failed. PR lib/57946
longjmp(3) t_sigstack: Note aarch64 seems to DTRT. But only by code inspection; it appears to have another problem: on re-entry, the signal handler is called on the normal stack, not on the alternate signal stack. PR lib/57946
longjmp(3) t_sigstack: Use a sigaltstack per handler entry. longjmp evidently doesn't reset the state of whether the process is executing on the alternate signal stack. So when we re-enter the signal handler, the alternate stack appears to be still in use, and the system chooses the original stack for the second call to the signal handler -- which trips our assertion asking to verify that the signal handler is always using an alternate stack.
Not strictly necessary for the signal handler to use an alternate stack on re-entry, but this makes it clearer that the signal handler itself is always using the alternate stack so we can verify that the interrupted code is _not_ in the signal handler. With this change, the test now passes on aarch64. PR lib/57946
longjmp(3) t_sigstack: Fix fencepost error. Extremely unlikely to cause trouble, but let's just turn that into `never' to keep it easier for readers. PR lib/57946
amd64 longjmp: Restore stack first, then signal mask. Otherwise, a pending signal may be delivered on the wrong stack when we restore the signal mask.
While here: - Tidy the code a little bit. - Sprinkle comments to explain what's going on. - Use `xorl %eXX,%eXX' instead of `xorq %rXX,%rXX'. => Same effect, one byte shorter, breaks dep chain on more uarches. - Use forward branches for statically predicted not-taken. => val==0 is unlikely in longjmp PR lib/57946
i386 longjmp: Restore stack first, then signal mask. Otherwise, a pending signal may be delivered on the wrong stack when we restore the signal mask.
While here: - Tidy the code a little bit. - Sprinkle comments to explain what's going on. - Use forward branches for statically predicted not-taken. => val==0 is unlikely in longjmp PR lib/57946
arm longjmp: Restore stack first, then signal mask. Otherwise, a pending signal may be delivered on the wrong stack when we restore the signal mask.
While here: - Move the botched sp and lr tests earlier. PR lib/57946 arm has been fixed
tests/lib/libc/setjmp/t_sigstack: Add missing comment for 1.10. PR lib/57946
sh3: siglongjmp - restore register context first (PR lib/57946)
|
1.17.26.1 |
| 23-Aug-2024 |
martin | Pull up following revision(s) (requested by riastradh in ticket #795):
tests/lib/libc/setjmp/Makefile: revision 1.3 distrib/sets/lists/debug/mi: revision 1.425 lib/libc/arch/sh3/gen/setjmp.S: revision 1.12 lib/libc/arch/i386/gen/sigsetjmp.S: revision 1.19 lib/libc/arch/x86_64/gen/__setjmp14.S: revision 1.4 tests/lib/libc/setjmp/t_sigstack.c: revision 1.10 tests/lib/libc/setjmp/t_sigstack.c: revision 1.11 tests/lib/libc/setjmp/t_sigstack.c: revision 1.12 tests/lib/libc/setjmp/t_sigstack.c: revision 1.1 lib/libc/arch/sh3/gen/sigsetjmp.S: revision 1.11 tests/lib/libc/setjmp/t_sigstack.c: revision 1.2 tests/lib/libc/setjmp/t_sigstack.c: revision 1.3 tests/lib/libc/setjmp/t_sigstack.c: revision 1.4 tests/lib/libc/setjmp/t_sigstack.c: revision 1.5 tests/lib/libc/setjmp/t_sigstack.c: revision 1.6 lib/libc/arch/arm/gen/setjmp.S: revision 1.19 tests/lib/libc/setjmp/t_sigstack.c: revision 1.7 tests/lib/libc/setjmp/t_sigstack.c: revision 1.8 tests/lib/libc/setjmp/t_sigstack.c: revision 1.9 lib/libc/arch/i386/gen/setjmp.S: revision 1.18 lib/libc/arch/x86_64/gen/__sigsetjmp14.S: revision 1.4 distrib/sets/lists/tests/mi: revision 1.1306 (patch)
longjmp(3): Add test for PR lib/57946.
longjmp(3): Paranoia: more error checking in PR lib/57946 test.
longjmp(3): Test signal mask vs stack restore with siglongjmp too. PR lib/57946
longjmp(3) t_sigstack: Print which entry failed. PR lib/57946
longjmp(3) t_sigstack: Note aarch64 seems to DTRT. But only by code inspection; it appears to have another problem: on re-entry, the signal handler is called on the normal stack, not on the alternate signal stack. PR lib/57946
longjmp(3) t_sigstack: Use a sigaltstack per handler entry. longjmp evidently doesn't reset the state of whether the process is executing on the alternate signal stack. So when we re-enter the signal handler, the alternate stack appears to be still in use, and the system chooses the original stack for the second call to the signal handler -- which trips our assertion asking to verify that the signal handler is always using an alternate stack.
Not strictly necessary for the signal handler to use an alternate stack on re-entry, but this makes it clearer that the signal handler itself is always using the alternate stack so we can verify that the interrupted code is _not_ in the signal handler. With this change, the test now passes on aarch64. PR lib/57946
longjmp(3) t_sigstack: Fix fencepost error. Extremely unlikely to cause trouble, but let's just turn that into `never' to keep it easier for readers. PR lib/57946
amd64 longjmp: Restore stack first, then signal mask. Otherwise, a pending signal may be delivered on the wrong stack when we restore the signal mask.
While here: - Tidy the code a little bit. - Sprinkle comments to explain what's going on. - Use `xorl %eXX,%eXX' instead of `xorq %rXX,%rXX'. => Same effect, one byte shorter, breaks dep chain on more uarches. - Use forward branches for statically predicted not-taken. => val==0 is unlikely in longjmp PR lib/57946
i386 longjmp: Restore stack first, then signal mask. Otherwise, a pending signal may be delivered on the wrong stack when we restore the signal mask.
While here: - Tidy the code a little bit. - Sprinkle comments to explain what's going on. - Use forward branches for statically predicted not-taken. => val==0 is unlikely in longjmp PR lib/57946
arm longjmp: Restore stack first, then signal mask. Otherwise, a pending signal may be delivered on the wrong stack when we restore the signal mask.
While here: - Move the botched sp and lr tests earlier. PR lib/57946 arm has been fixed
tests/lib/libc/setjmp/t_sigstack: Add missing comment for 1.10. PR lib/57946
sh3: siglongjmp - restore register context first (PR lib/57946)
|
1.18.2.1 |
| 02-Aug-2025 |
perseant | Sync with HEAD
|