|
@@ -100,21 +100,27 @@ should be simply `softfloat_exception_flags |= flags;'.
|
|
-------------------------------------------------------------------------------
|
|
-------------------------------------------------------------------------------
|
|
*}
|
|
*}
|
|
procedure float_raise(i: shortint);
|
|
procedure float_raise(i: shortint);
|
|
|
|
+var
|
|
|
|
+ pflags: pbyte;
|
|
|
|
+ unmasked_flags: byte;
|
|
Begin
|
|
Begin
|
|
- softfloat_exception_flags := softfloat_exception_flags or i;
|
|
|
|
- if ((softfloat_exception_flags and not(softfloat_exception_mask)) and float_flag_invalid) <> 0 then
|
|
|
|
|
|
+ { taking address of threadvar produces somewhat more compact code }
|
|
|
|
+ pflags := @softfloat_exception_flags;
|
|
|
|
+ pflags^ := pflags^ or i;
|
|
|
|
+ unmasked_flags := pflags^ and (not softfloat_exception_mask);
|
|
|
|
+ if (unmasked_flags and float_flag_invalid) <> 0 then
|
|
HandleError(207)
|
|
HandleError(207)
|
|
else
|
|
else
|
|
- if ((softfloat_exception_flags and not(softfloat_exception_mask)) and float_flag_divbyzero) <> 0 then
|
|
|
|
|
|
+ if (unmasked_flags and float_flag_divbyzero) <> 0 then
|
|
HandleError(200)
|
|
HandleError(200)
|
|
else
|
|
else
|
|
- if ((softfloat_exception_flags and not(softfloat_exception_mask)) and float_flag_overflow) <> 0 then
|
|
|
|
|
|
+ if (unmasked_flags and float_flag_overflow) <> 0 then
|
|
HandleError(205)
|
|
HandleError(205)
|
|
else
|
|
else
|
|
- if ((softfloat_exception_flags and not(softfloat_exception_mask)) and float_flag_underflow) <> 0 then
|
|
|
|
|
|
+ if (unmasked_flags and float_flag_underflow) <> 0 then
|
|
HandleError(206)
|
|
HandleError(206)
|
|
else
|
|
else
|
|
- if ((softfloat_exception_flags and not(softfloat_exception_mask)) and float_flag_inexact) <> 0 then
|
|
|
|
|
|
+ if (unmasked_flags and float_flag_inexact) <> 0 then
|
|
HandleError(207);
|
|
HandleError(207);
|
|
end;
|
|
end;
|
|
|
|
|