summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/getwchar.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2008-01-11 17:11:32 +0000
committerbde <bde@FreeBSD.org>2008-01-11 17:11:32 +0000
commit369b6ad6b5135717ecaa2a37fe06b76f38f19948 (patch)
tree72300e360553c07432bd4306de5d2b71969f4a99 /lib/libc/stdio/getwchar.c
parent508466854a8b80a9c20126b0aee844486b4a2b3d (diff)
downloadFreeBSD-src-369b6ad6b5135717ecaa2a37fe06b76f38f19948.zip
FreeBSD-src-369b6ad6b5135717ecaa2a37fe06b76f38f19948.tar.gz
Fix fpset*() to not trap if there is a currently unmasked exception.
Unmasked exceptions (which can be fixed up using fpset*() before they trap) are very rare, especially on amd64 since SSE exceptions trap synchronously, but I want to merge the faster amd64 implementations of fpset*() back to i386 without introducing the bug on i386. The i386 implementation has always avoided the trap automatically by changing things using load/store of the FP environment, but this is very slow. Most changes only affect the control word, so they can usually be done much more efficiently, and amd64 has always done this, but loading the control word can trap. This version use the fast method only in the usual case where it will not trap. This only costs a couple of integer instructions (including one branch which I haven't optimized carefully yet) in the usual case, but bloats the inlines a lot. The inlines were already a bit too large to handle both the FPU and SSE.
Diffstat (limited to 'lib/libc/stdio/getwchar.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud