diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2020-12-13 21:21:33 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2020-12-13 21:21:33 +0000 |
commit | e7b0f0f8f568da30bd82966523367c30188ed9f2 (patch) | |
tree | 6b28646272b350bf36e6fc9f056bdbc95b7991ef /lib/libc | |
parent | 835b466e069df883c8328e84eb15cfe61757207a (diff) |
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@
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/arch/i386/gen/_setjmp.S | 4 | ||||
-rw-r--r-- | lib/libc/arch/i386/gen/setjmp.S | 4 | ||||
-rw-r--r-- | lib/libc/arch/i386/gen/sigsetjmp.S | 4 |
3 files changed, 3 insertions, 9 deletions
diff --git a/lib/libc/arch/i386/gen/_setjmp.S b/lib/libc/arch/i386/gen/_setjmp.S index f1f5d99fd71..08030e2d9cb 100644 --- a/lib/libc/arch/i386/gen/_setjmp.S +++ b/lib/libc/arch/i386/gen/_setjmp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: _setjmp.S,v 1.8 2020/12/06 18:13:15 bluhm Exp $ */ +/* $OpenBSD: _setjmp.S,v 1.9 2020/12/13 21:21:32 bluhm Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -63,7 +63,6 @@ ENTRY(_setjmp) movl %ecx,(_JB_EBP * 4)(%eax) movl %esi,(_JB_ESI * 4)(%eax) movl %edi,(_JB_EDI * 4)(%eax) - stmxcsr (_JB_MXCSR * 4)(%eax) fnstcw (_JB_FCW * 4)(%eax) xorl %eax,%eax ret @@ -75,7 +74,6 @@ ENTRY(_longjmp) addl $__jmpxor-1b,%ecx # load cookie address movl 4(%esp),%edx # parameter, pointer to env movl 8(%esp),%eax # parameter, val - ldmxcsr (_JB_MXCSR * 4)(%edx) fldcw (_JB_FCW * 4)(%edx) movl (_JB_EBX * 4)(%edx),%ebx movl (_JB_ESP * 4)(%edx),%esi diff --git a/lib/libc/arch/i386/gen/setjmp.S b/lib/libc/arch/i386/gen/setjmp.S index 47104a3c8b8..9dbb4ffafc1 100644 --- a/lib/libc/arch/i386/gen/setjmp.S +++ b/lib/libc/arch/i386/gen/setjmp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: setjmp.S,v 1.13 2020/12/06 18:13:15 bluhm Exp $ */ +/* $OpenBSD: setjmp.S,v 1.14 2020/12/13 21:21:32 bluhm Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -78,7 +78,6 @@ ENTRY(setjmp) movl 8(%edx),%edx # load eip cookie over cookie address xorl 0(%esp),%edx # caller address movl %edx,(_JB_EIP * 4)(%ecx) - stmxcsr (_JB_MXCSR * 4)(%ecx) fnstcw (_JB_FCW * 4)(%ecx) xorl %eax,%eax ret @@ -97,7 +96,6 @@ ENTRY(longjmp) movl 4(%esp),%edx # parameter, pointer to env movl 8(%esp),%eax # parameter, val - ldmxcsr (_JB_MXCSR * 4)(%edx) fldcw (_JB_FCW * 4)(%edx) movl (_JB_EBX * 4)(%edx),%ebx movl (_JB_ESP * 4)(%edx),%esi diff --git a/lib/libc/arch/i386/gen/sigsetjmp.S b/lib/libc/arch/i386/gen/sigsetjmp.S index 935d1514230..2c2013257bf 100644 --- a/lib/libc/arch/i386/gen/sigsetjmp.S +++ b/lib/libc/arch/i386/gen/sigsetjmp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: sigsetjmp.S,v 1.12 2020/12/06 18:13:15 bluhm Exp $ */ +/* $OpenBSD: sigsetjmp.S,v 1.13 2020/12/13 21:21:32 bluhm Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -67,7 +67,6 @@ ENTRY(sigsetjmp) movl 4(%edx),%edx # load eip cookie over cookie address xorl 0(%esp),%edx movl %edx,(_JB_EIP * 4)(%ecx) - stmxcsr (_JB_MXCSR * 4)(%ecx) fnstcw (_JB_FCW * 4)(%ecx) xorl %eax,%eax ret @@ -91,7 +90,6 @@ ENTRY(siglongjmp) movl 4(%esp),%edx # reload in case sigprocmask failed movl 8(%esp),%eax # parameter, val - ldmxcsr (_JB_MXCSR * 4)(%edx) fldcw (_JB_FCW * 4)(%edx) movl (_JB_EBX * 4)(%edx),%ebx movl (_JB_ESP * 4)(%edx),%esi |