Merge branch 'master' of git://factorcode.org/git/factor
commit
db4f8f47ea
|
@ -102,31 +102,6 @@ set-default-fp-env
|
||||||
-1.0 3.0 /f double>bits
|
-1.0 3.0 /f double>bits
|
||||||
] unit-test
|
] 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-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-inexact+ } [ 1.0 3.0 /f ] with-fp-traps ] must-fail
|
||||||
[ { +fp-invalid-operation+ } [ -1.0 fsqrt ] 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
|
! Ensure traps get cleared
|
||||||
[ 1/0. ] [ 1.0 0.0 /f ] unit-test
|
[ 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
|
! In case the tests screw up the FP env because of bugs in math.floats.env
|
||||||
set-default-fp-env
|
set-default-fp-env
|
||||||
|
|
||||||
|
|
|
@ -75,12 +75,8 @@ DEF(void,get_x87_env,(void*)):
|
||||||
|
|
||||||
DEF(void,set_x87_env,(const void*)):
|
DEF(void,set_x87_env,(const void*)):
|
||||||
movl 4(%esp), %eax
|
movl 4(%esp), %eax
|
||||||
fldcw 2(%eax)
|
|
||||||
movb 4(%eax), %dl
|
|
||||||
test %dl, %dl
|
|
||||||
jz 1f
|
|
||||||
fnclex
|
fnclex
|
||||||
1:
|
fldcw 2(%eax)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
#include "cpu-x86.S"
|
#include "cpu-x86.S"
|
||||||
|
|
Loading…
Reference in New Issue