diff options
Diffstat (limited to 'arch/arm/nwfpe/softfloat.c')
-rw-r--r-- | arch/arm/nwfpe/softfloat.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/nwfpe/softfloat.c b/arch/arm/nwfpe/softfloat.c index 9d743ae29062..e038dd3be9b3 100644 --- a/arch/arm/nwfpe/softfloat.c +++ b/arch/arm/nwfpe/softfloat.c | |||
@@ -28,6 +28,8 @@ this code that are retained. | |||
28 | =============================================================================== | 28 | =============================================================================== |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <asm/div64.h> | ||
32 | |||
31 | #include "fpa11.h" | 33 | #include "fpa11.h" |
32 | //#include "milieu.h" | 34 | //#include "milieu.h" |
33 | //#include "softfloat.h" | 35 | //#include "softfloat.h" |
@@ -1331,7 +1333,11 @@ float32 float32_div( float32 a, float32 b ) | |||
1331 | aSig >>= 1; | 1333 | aSig >>= 1; |
1332 | ++zExp; | 1334 | ++zExp; |
1333 | } | 1335 | } |
1334 | zSig = ( ( (bits64) aSig )<<32 ) / bSig; | 1336 | { |
1337 | bits64 tmp = ( (bits64) aSig )<<32; | ||
1338 | do_div( tmp, bSig ); | ||
1339 | zSig = tmp; | ||
1340 | } | ||
1335 | if ( ( zSig & 0x3F ) == 0 ) { | 1341 | if ( ( zSig & 0x3F ) == 0 ) { |
1336 | zSig |= ( ( (bits64) bSig ) * zSig != ( (bits64) aSig )<<32 ); | 1342 | zSig |= ( ( (bits64) bSig ) * zSig != ( (bits64) aSig )<<32 ); |
1337 | } | 1343 | } |
@@ -1397,7 +1403,9 @@ float32 float32_rem( float32 a, float32 b ) | |||
1397 | q = ( bSig <= aSig ); | 1403 | q = ( bSig <= aSig ); |
1398 | if ( q ) aSig -= bSig; | 1404 | if ( q ) aSig -= bSig; |
1399 | if ( 0 < expDiff ) { | 1405 | if ( 0 < expDiff ) { |
1400 | q = ( ( (bits64) aSig )<<32 ) / bSig; | 1406 | bits64 tmp = ( (bits64) aSig )<<32; |
1407 | do_div( tmp, bSig ); | ||
1408 | q = tmp; | ||
1401 | q >>= 32 - expDiff; | 1409 | q >>= 32 - expDiff; |
1402 | bSig >>= 2; | 1410 | bSig >>= 2; |
1403 | aSig = ( ( aSig>>1 )<<( expDiff - 1 ) ) - bSig * q; | 1411 | aSig = ( ( aSig>>1 )<<( expDiff - 1 ) ) - bSig * q; |