[fpc-devel] FPC SoftFPU implementation

Max Nazhalov stein_nospam at mail.ru
Wed Jun 12 15:45:20 CEST 2013


Wednesday, June 12, 2013, 4:00:52 AM, Florian wrote:

FK> Am 09.06.2013 18:22, schrieb Max Nazhalov:
>> 
>> Could this patch be reviewed and accepted/adapted/rejected?

FK> Thanks, I applied it and fixed a few more things.

Thanks a lot! Just two addition notes:

1. Catched another 4 missing exits

Index: softfpu.pp
===================================================================
--- softfpu.pp  (revision 24880)
+++ softfpu.pp  (working copy)
@@ -3468,6 +3468,7 @@
             End;
         end;
         float32_round_to_int.float32 := packFloat32( aSign, 0, 0 );
+        exit;
       End;
     lastBitMask := 1;
     {_____________________________!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!}
@@ -3774,6 +3775,7 @@
         if ( (aSig<>0) OR ( ( bExp = $FF ) AND  (bSig<>0) ) ) then
         Begin
             float32_mul.float32 := propagateFloat32NaN( a.float32, b.float32 );
+            exit;
         End;
         if ( ( bExp OR  bSig ) = 0 ) then
         Begin
@@ -3863,6 +3865,7 @@
             if ( bSig <> 0) then
             Begin
               float32_div.float32 := propagateFloat32NaN( a.float32, b.float32 );
+              exit;
             End;
             float_raise( float_flag_invalid );
             float32_div.float32 := float32_default_nan;
@@ -4849,6 +4852,7 @@
                exit;
             End;
             packFloat64( zSign, $7FF, 0, 0, out );
+            exit;
         End;
         if ( aExp = 0 ) then
         Begin

2. r24872 seems to revert r24864 by Pierre Muller (see above in mail list) --
was this intended?..

-- 
WBR,
Max




More information about the fpc-devel mailing list