x86_64 mathu.inc missing handling of softfloat_rounding_mode and softfloat_exception_mask
Original Reporter info from Mantis: benjamin@0ok.de @bero1985
-
Reporter name: Benjamin Rosseaux
Original Reporter info from Mantis: benjamin@0ok.de @bero1985
- Reporter name: Benjamin Rosseaux
Description:
The x86_64 mathu.inc (and some of the other targets also, which depends on softfloat-partly-fallback-functions) is missing handling of softfloat_rounding_mode and softfloat_exception_mask. Patch is attached at least for x86_64, and a testcase.
Following code is failing in the moment, since it raises a div-by-zero exception, although it shouldn't:
var x:double;
...
SetExceptionMask([exInvalidOp,exDenormalized,exZeroDivide,exOverflow,exUnderflow,exPrecision]);
x:=0;
writeln(ln(x));
writeln(1/x);