Merge branch 'master' of git://factorcode.org/git/factor

db4
Slava Pestov 2009-09-08 23:54:05 -05:00
commit db4f8f47ea
2 changed files with 6 additions and 30 deletions

View File

@ -102,31 +102,6 @@ set-default-fp-env
-1.0 3.0 /f double>bits
] unit-test
[
HEX: 0000,0000,0000,07e8
] [
+denormal-keep+ [
10.0 -320.0 ^ double>bits
] with-denormal-mode
] unit-test
[
HEX: 0000,0000,0000,0000
] [
+denormal-flush+ [
10.0 -320.0 ^ double>bits
] with-denormal-mode
] unit-test
! ensure denormal mode is restored to +denormal-keep+
[
HEX: 0000,0000,0000,07e8
] [
+denormal-keep+ [
10.0 -320.0 ^ double>bits
] with-denormal-mode
] unit-test
[ { +fp-zero-divide+ } [ 1.0 0.0 /f ] with-fp-traps ] must-fail
[ { +fp-inexact+ } [ 1.0 3.0 /f ] with-fp-traps ] must-fail
[ { +fp-invalid-operation+ } [ -1.0 fsqrt ] with-fp-traps ] must-fail
@ -136,6 +111,11 @@ set-default-fp-env
! Ensure traps get cleared
[ 1/0. ] [ 1.0 0.0 /f ] unit-test
! Ensure state is back to normal
[ +round-nearest+ ] [ rounding-mode ] unit-test
[ +denormal-keep+ ] [ denormal-mode ] unit-test
[ { } ] [ fp-traps ] unit-test
! In case the tests screw up the FP env because of bugs in math.floats.env
set-default-fp-env

View File

@ -75,12 +75,8 @@ DEF(void,get_x87_env,(void*)):
DEF(void,set_x87_env,(const void*)):
movl 4(%esp), %eax
fldcw 2(%eax)
movb 4(%eax), %dl
test %dl, %dl
jz 1f
fnclex
1:
fldcw 2(%eax)
ret
#include "cpu-x86.S"