History log of /openbsd-current/lib/libc/arch/i386/gen/setjmp.S
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.15 10-Dec-2023 deraadt

Populate the non-LOAD openbsd.syscalls section (and PT_OPENBSD_SYSCALL)
with {uint offset, uint syscall#} entries in libc & ld.so.
In libc a few syscall# entries (break, sigprocmask, _tfork, _threxit)
are duplicated because additional or inline uses occur (that situation
is handled elsewhere)
ok kettenis


Revision tags: OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE OPENBSD_7_4_BASE
# 1.14 13-Dec-2020 bluhm

Geode CPU does not support SSE, so MXCSR does not exists there. As
our i386 compiler does not generate SSE instructions by default,
it is not strictly necessary to save MXCSR content between setjmp(3)
and longjmp(3). We do not want to end supporting such old processors
now. Remove the stmxcsr and ldmxcsr instructions from libc.
reported by Johan Huldtgren; OK jsg@ kettenis@


# 1.13 06-Dec-2020 bluhm

On i386 setjmp(3) should store the FPU state and longjmp(3) restore
it. There is enough space in jmp_buf to save MXCSR and CW register.
Idea taken from amd64. This fixes regress/lib/libc/setjmp-fpu .
OK kettenis@


# 1.12 06-Dec-2020 bluhm

Introduce constants to access the setjmp(3) jmp_buf fields from
i386 libc. The assembler code is more readable than with magic
numbers. This brings i386 in line with amd64. No change in object
file.
OK kettenis@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.11 30-May-2016 guenther

Do setjmp cookies for eip, esp, and ebp. For bonus points, mix how
the cookies are used in setjmp/_setjmp/sigsetjmp so that mixing
calls (e.g., longjmp on a _setjmp buffer) will scramble all three
registers and jump you to a random location on a random stack!

ok deraadt@


Revision tags: OPENBSD_5_9_BASE
# 1.10 13-Sep-2015 guenther

Do provide hidden _libc_* aliases for sig{block,setmask} and use them in
the ASM *setjmp implementations.
Skip the PLT when calling them on amd64 (other archs to do this after testing)

ok miod@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.9 22-Aug-2012 pascal

Convert cpp | as rules in bsd.lib.mk and lib/libc/sys/Makefile.inc to pure cc
invocations. This allows us to use the compiler builtin define __PIC__ to check
for PIC/PIEness rather than passing -DPIC. Simplifies PIE work a lot.

ok matthew@, conceptually ok kurt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.8 07-Aug-2005 espie

zap rcsid, tested there. okay deraadt@


# 1.7 01-Apr-2005 hshoexer

Fix typo in comment (_setjmp -> setjmp)

ok deraadt


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.6 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


# 1.5 17-Apr-2003 drahn

ELF fixups, ELF PIC syscall support, asm changes as requested by assembler.


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.4 01-Nov-2001 mickey

use _C_LABEL


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.3 19-Aug-1996 tholo

Fix RCS ids
Make sure everything uses {SYS,}LIBC_SCCS properly


# 1.2 30-Dec-1995 deraadt

from netbsd:
Remove #include "SYS.h"; it is not needed (by normal assembly functions)


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.14 13-Dec-2020 bluhm

Geode CPU does not support SSE, so MXCSR does not exists there. As
our i386 compiler does not generate SSE instructions by default,
it is not strictly necessary to save MXCSR content between setjmp(3)
and longjmp(3). We do not want to end supporting such old processors
now. Remove the stmxcsr and ldmxcsr instructions from libc.
reported by Johan Huldtgren; OK jsg@ kettenis@


# 1.13 06-Dec-2020 bluhm

On i386 setjmp(3) should store the FPU state and longjmp(3) restore
it. There is enough space in jmp_buf to save MXCSR and CW register.
Idea taken from amd64. This fixes regress/lib/libc/setjmp-fpu .
OK kettenis@


# 1.12 06-Dec-2020 bluhm

Introduce constants to access the setjmp(3) jmp_buf fields from
i386 libc. The assembler code is more readable than with magic
numbers. This brings i386 in line with amd64. No change in object
file.
OK kettenis@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.11 30-May-2016 guenther

Do setjmp cookies for eip, esp, and ebp. For bonus points, mix how
the cookies are used in setjmp/_setjmp/sigsetjmp so that mixing
calls (e.g., longjmp on a _setjmp buffer) will scramble all three
registers and jump you to a random location on a random stack!

ok deraadt@


Revision tags: OPENBSD_5_9_BASE
# 1.10 13-Sep-2015 guenther

Do provide hidden _libc_* aliases for sig{block,setmask} and use them in
the ASM *setjmp implementations.
Skip the PLT when calling them on amd64 (other archs to do this after testing)

ok miod@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.9 22-Aug-2012 pascal

Convert cpp | as rules in bsd.lib.mk and lib/libc/sys/Makefile.inc to pure cc
invocations. This allows us to use the compiler builtin define __PIC__ to check
for PIC/PIEness rather than passing -DPIC. Simplifies PIE work a lot.

ok matthew@, conceptually ok kurt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.8 07-Aug-2005 espie

zap rcsid, tested there. okay deraadt@


# 1.7 01-Apr-2005 hshoexer

Fix typo in comment (_setjmp -> setjmp)

ok deraadt


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.6 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


# 1.5 17-Apr-2003 drahn

ELF fixups, ELF PIC syscall support, asm changes as requested by assembler.


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.4 01-Nov-2001 mickey

use _C_LABEL


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.3 19-Aug-1996 tholo

Fix RCS ids
Make sure everything uses {SYS,}LIBC_SCCS properly


# 1.2 30-Dec-1995 deraadt

from netbsd:
Remove #include "SYS.h"; it is not needed (by normal assembly functions)


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.13 06-Dec-2020 bluhm

On i386 setjmp(3) should store the FPU state and longjmp(3) restore
it. There is enough space in jmp_buf to save MXCSR and CW register.
Idea taken from amd64. This fixes regress/lib/libc/setjmp-fpu .
OK kettenis@


# 1.12 06-Dec-2020 bluhm

Introduce constants to access the setjmp(3) jmp_buf fields from
i386 libc. The assembler code is more readable than with magic
numbers. This brings i386 in line with amd64. No change in object
file.
OK kettenis@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE
# 1.11 30-May-2016 guenther

Do setjmp cookies for eip, esp, and ebp. For bonus points, mix how
the cookies are used in setjmp/_setjmp/sigsetjmp so that mixing
calls (e.g., longjmp on a _setjmp buffer) will scramble all three
registers and jump you to a random location on a random stack!

ok deraadt@


Revision tags: OPENBSD_5_9_BASE
# 1.10 13-Sep-2015 guenther

Do provide hidden _libc_* aliases for sig{block,setmask} and use them in
the ASM *setjmp implementations.
Skip the PLT when calling them on amd64 (other archs to do this after testing)

ok miod@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.9 22-Aug-2012 pascal

Convert cpp | as rules in bsd.lib.mk and lib/libc/sys/Makefile.inc to pure cc
invocations. This allows us to use the compiler builtin define __PIC__ to check
for PIC/PIEness rather than passing -DPIC. Simplifies PIE work a lot.

ok matthew@, conceptually ok kurt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.8 07-Aug-2005 espie

zap rcsid, tested there. okay deraadt@


# 1.7 01-Apr-2005 hshoexer

Fix typo in comment (_setjmp -> setjmp)

ok deraadt


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.6 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


# 1.5 17-Apr-2003 drahn

ELF fixups, ELF PIC syscall support, asm changes as requested by assembler.


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.4 01-Nov-2001 mickey

use _C_LABEL


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.3 19-Aug-1996 tholo

Fix RCS ids
Make sure everything uses {SYS,}LIBC_SCCS properly


# 1.2 30-Dec-1995 deraadt

from netbsd:
Remove #include "SYS.h"; it is not needed (by normal assembly functions)


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.11 30-May-2016 guenther

Do setjmp cookies for eip, esp, and ebp. For bonus points, mix how
the cookies are used in setjmp/_setjmp/sigsetjmp so that mixing
calls (e.g., longjmp on a _setjmp buffer) will scramble all three
registers and jump you to a random location on a random stack!

ok deraadt@


Revision tags: OPENBSD_5_9_BASE
# 1.10 13-Sep-2015 guenther

Do provide hidden _libc_* aliases for sig{block,setmask} and use them in
the ASM *setjmp implementations.
Skip the PLT when calling them on amd64 (other archs to do this after testing)

ok miod@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.9 22-Aug-2012 pascal

Convert cpp | as rules in bsd.lib.mk and lib/libc/sys/Makefile.inc to pure cc
invocations. This allows us to use the compiler builtin define __PIC__ to check
for PIC/PIEness rather than passing -DPIC. Simplifies PIE work a lot.

ok matthew@, conceptually ok kurt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE
# 1.8 07-Aug-2005 espie

zap rcsid, tested there. okay deraadt@


# 1.7 01-Apr-2005 hshoexer

Fix typo in comment (_setjmp -> setjmp)

ok deraadt


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.6 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


# 1.5 17-Apr-2003 drahn

ELF fixups, ELF PIC syscall support, asm changes as requested by assembler.


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.4 01-Nov-2001 mickey

use _C_LABEL


Revision tags: OPENBSD_2_0_BASE OPENBSD_2_1_BASE OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.3 19-Aug-1996 tholo

Fix RCS ids
Make sure everything uses {SYS,}LIBC_SCCS properly


# 1.2 30-Dec-1995 deraadt

from netbsd:
Remove #include "SYS.h"; it is not needed (by normal assembly functions)


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision