Fixed some bugs affecting a few processors. Reboot the official release

date (for the last time) to be 2015 Feb 16.
This commit is contained in:
John Hauser 2015-02-19 14:09:32 -08:00
parent 6e7b8b549a
commit c07232ca9e
18 changed files with 79 additions and 72 deletions

View File

@ -2,7 +2,7 @@
License for Berkeley SoftFloat Release 3 License for Berkeley SoftFloat Release 3
John R. Hauser John R. Hauser
2015 Jan 9 2015 February 16
The following applies to the whole of SoftFloat Release 3 as well as to each The following applies to the whole of SoftFloat Release 3 as well as to each
source file individually. source file individually.

View File

@ -11,7 +11,7 @@
<P> <P>
John R. Hauser<BR> John R. Hauser<BR>
2015 Jan 9<BR> 2015 February 16<BR>
</P> </P>
<P> <P>

View File

@ -2,7 +2,7 @@
Package Overview for Berkeley SoftFloat Release 3 Package Overview for Berkeley SoftFloat Release 3
John R. Hauser John R. Hauser
2015 Jan 9 2015 February 16
Berkeley SoftFloat is a software implementation of binary floating-point Berkeley SoftFloat is a software implementation of binary floating-point
that conforms to the IEEE Standard for Floating-Point Arithmetic. SoftFloat that conforms to the IEEE Standard for Floating-Point Arithmetic. SoftFloat

View File

@ -11,11 +11,11 @@
<P> <P>
John R. Hauser<BR> John R. Hauser<BR>
2015 January 31<BR> 2015 February 16<BR>
</P> </P>
<H3>Release 3 (2015 January)</H3> <H3>Release 3 (2015 February)</H3>
<UL> <UL>

View File

@ -11,7 +11,7 @@
<P> <P>
John R. Hauser<BR> John R. Hauser<BR>
2015 Jan 9<BR> 2015 February 16<BR>
</P> </P>

View File

@ -11,7 +11,7 @@
<P> <P>
John R. Hauser<BR> John R. Hauser<BR>
2015 Jan 9<BR> 2015 February 16<BR>
</P> </P>

View File

@ -4,10 +4,10 @@
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
Package, Release 3, by John R. Hauser. Package, Release 3, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
(Regents). All Rights Reserved. Redistribution and use in source and binary California (Regents). All Rights Reserved. Redistribution and use in source
forms, with or without modification, are permitted provided that the following and binary forms, with or without modification, are permitted provided that
conditions are met: the following conditions are met:
Redistributions of source code must retain the above copyright notice, Redistributions of source code must retain the above copyright notice,
this list of conditions, and the following two paragraphs of disclaimer. this list of conditions, and the following two paragraphs of disclaimer.
@ -135,7 +135,7 @@ void extF80M_sqrt( const extFloat80_t *aPtr, extFloat80_t *zPtr )
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
*------------------------------------------------------------------------*/ *------------------------------------------------------------------------*/
if ( (q & 0xFFFFFF) <= 2 ) { if ( (q & 0xFFFFFF) <= 2 ) {
q &= ~0xFFFF; q &= ~(uint32_t) 0xFFFF;
extSigZ[indexWordLo( 3 )] = q<<7; extSigZ[indexWordLo( 3 )] = q<<7;
x64 = sig64Z + (q>>27); x64 = sig64Z + (q>>27);
term[indexWord( 4, 3 )] = 0; term[indexWord( 4, 3 )] = 0;

View File

@ -4,10 +4,10 @@
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
Package, Release 3, by John R. Hauser. Package, Release 3, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
(Regents). All Rights Reserved. Redistribution and use in source and binary California (Regents). All Rights Reserved. Redistribution and use in source
forms, with or without modification, are permitted provided that the following and binary forms, with or without modification, are permitted provided that
conditions are met: the following conditions are met:
Redistributions of source code must retain the above copyright notice, Redistributions of source code must retain the above copyright notice,
this list of conditions, and the following two paragraphs of disclaimer. this list of conditions, and the following two paragraphs of disclaimer.
@ -127,7 +127,7 @@ extFloat80_t extF80_sqrt( extFloat80_t a )
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------
*------------------------------------------------------------------------*/ *------------------------------------------------------------------------*/
if ( (q & 0xFFFFFF) <= 2 ) { if ( (q & 0xFFFFFF) <= 2 ) {
q &= ~0xFFFF; q &= ~(uint_fast64_t) 0xFFFF;
sigZExtra = (uint64_t) (q<<39); sigZExtra = (uint64_t) (q<<39);
term = softfloat_mul64ByShifted32To128( x64 + (q>>27), q ); term = softfloat_mul64ByShifted32To128( x64 + (q>>27), q );
x64 = (uint_fast64_t) (uint32_t) (q<<5) * (uint32_t) q; x64 = (uint_fast64_t) (uint32_t) (q<<5) * (uint32_t) q;

View File

@ -4,10 +4,10 @@
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
Package, Release 3, by John R. Hauser. Package, Release 3, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
(Regents). All Rights Reserved. Redistribution and use in source and binary California (Regents). All Rights Reserved. Redistribution and use in source
forms, with or without modification, are permitted provided that the following and binary forms, with or without modification, are permitted provided that
conditions are met: the following conditions are met:
Redistributions of source code must retain the above copyright notice, Redistributions of source code must retain the above copyright notice,
this list of conditions, and the following two paragraphs of disclaimer. this list of conditions, and the following two paragraphs of disclaimer.
@ -241,7 +241,7 @@ void
*----------------------------------------------------------------*/ *----------------------------------------------------------------*/
shiftCount = expDiff & 31; shiftCount = expDiff & 31;
if ( shiftCount ) { if ( shiftCount ) {
softfloat_shortShiftRight160M( sigX, expDiff, sigX ); softfloat_shortShiftRight160M( sigX, shiftCount, sigX );
} }
expDiff >>= 5; expDiff >>= 5;
extSigPtr = extSigPtr =

View File

@ -4,10 +4,10 @@
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
Package, Release 3, by John R. Hauser. Package, Release 3, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
(Regents). All Rights Reserved. Redistribution and use in source and binary California (Regents). All Rights Reserved. Redistribution and use in source
forms, with or without modification, are permitted provided that the following and binary forms, with or without modification, are permitted provided that
conditions are met: the following conditions are met:
Redistributions of source code must retain the above copyright notice, Redistributions of source code must retain the above copyright notice,
this list of conditions, and the following two paragraphs of disclaimer. this list of conditions, and the following two paragraphs of disclaimer.
@ -171,7 +171,7 @@ void
| extSigPtr[indexWord( 3, 1 )]; | extSigPtr[indexWord( 3, 1 )];
if ( doIncrement ) { if ( doIncrement ) {
++sig; ++sig;
sig &= ~(! (sigExtra & 0x7FFFFFFF) & roundNearEven); sig &= ~(uint64_t) (! (sigExtra & 0x7FFFFFFF) & roundNearEven);
exp = ((sig & UINT64_C( 0x8000000000000000 )) != 0); exp = ((sig & UINT64_C( 0x8000000000000000 )) != 0);
} }
goto packReturn; goto packReturn;
@ -211,7 +211,7 @@ void
++exp; ++exp;
sig = UINT64_C( 0x8000000000000000 ); sig = UINT64_C( 0x8000000000000000 );
} else { } else {
sig &= ~(! (sigExtra & 0x7FFFFFFF) & roundNearEven); sig &= ~(uint64_t) (! (sigExtra & 0x7FFFFFFF) & roundNearEven);
} }
} }
/*------------------------------------------------------------------------ /*------------------------------------------------------------------------

View File

@ -4,10 +4,10 @@
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
Package, Release 3, by John R. Hauser. Package, Release 3, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
(Regents). All Rights Reserved. Redistribution and use in source and binary California (Regents). All Rights Reserved. Redistribution and use in source
forms, with or without modification, are permitted provided that the following and binary forms, with or without modification, are permitted provided that
conditions are met: the following conditions are met:
Redistributions of source code must retain the above copyright notice, Redistributions of source code must retain the above copyright notice,
this list of conditions, and the following two paragraphs of disclaimer. this list of conditions, and the following two paragraphs of disclaimer.
@ -156,8 +156,9 @@ extFloat80_t
if ( doIncrement ) { if ( doIncrement ) {
++sig; ++sig;
sig &= sig &=
~(! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ~(uint_fast64_t)
& roundNearEven); (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
& roundNearEven);
exp = ((sig & UINT64_C( 0x8000000000000000 )) != 0); exp = ((sig & UINT64_C( 0x8000000000000000 )) != 0);
} }
goto packReturn; goto packReturn;
@ -194,8 +195,9 @@ extFloat80_t
sig = UINT64_C( 0x8000000000000000 ); sig = UINT64_C( 0x8000000000000000 );
} else { } else {
sig &= sig &=
~(! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF )) ~(uint_fast64_t)
& roundNearEven); (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
& roundNearEven);
} }
} else { } else {
if ( ! sig ) exp = 0; if ( ! sig ) exp = 0;

View File

@ -4,10 +4,10 @@
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
Package, Release 3, by John R. Hauser. Package, Release 3, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
(Regents). All Rights Reserved. Redistribution and use in source and binary California (Regents). All Rights Reserved. Redistribution and use in source
forms, with or without modification, are permitted provided that the following and binary forms, with or without modification, are permitted provided that
conditions are met: the following conditions are met:
Redistributions of source code must retain the above copyright notice, Redistributions of source code must retain the above copyright notice,
this list of conditions, and the following two paragraphs of disclaimer. this list of conditions, and the following two paragraphs of disclaimer.
@ -130,8 +130,9 @@ float128_t
sig64 = sig128.v64; sig64 = sig128.v64;
sig0 = sig0 =
sig128.v0 sig128.v0
& ~(! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF )) & ~(uint64_t)
& roundNearEven); (! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
& roundNearEven);
} else { } else {
if ( ! (sig64 | sig0) ) exp = 0; if ( ! (sig64 | sig0) ) exp = 0;
} }

View File

@ -4,10 +4,10 @@
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
Package, Release 3, by John R. Hauser. Package, Release 3, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
(Regents). All Rights Reserved. Redistribution and use in source and binary California (Regents). All Rights Reserved. Redistribution and use in source
forms, with or without modification, are permitted provided that the following and binary forms, with or without modification, are permitted provided that
conditions are met: the following conditions are met:
Redistributions of source code must retain the above copyright notice, Redistributions of source code must retain the above copyright notice,
this list of conditions, and the following two paragraphs of disclaimer. this list of conditions, and the following two paragraphs of disclaimer.
@ -80,7 +80,7 @@ float32_t
} }
if ( roundBits ) softfloat_exceptionFlags |= softfloat_flag_inexact; if ( roundBits ) softfloat_exceptionFlags |= softfloat_flag_inexact;
sig = (sig + roundIncrement)>>7; sig = (sig + roundIncrement)>>7;
sig &= ~(! (roundBits ^ 0x40) & roundNearEven); sig &= ~(uint_fast32_t) (! (roundBits ^ 0x40) & roundNearEven);
uiZ = packToF32UI( sign, sig ? exp : 0, sig ); uiZ = packToF32UI( sign, sig ? exp : 0, sig );
uiZ: uiZ:
uZ.ui = uiZ; uZ.ui = uiZ;

View File

@ -4,10 +4,10 @@
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
Package, Release 3, by John R. Hauser. Package, Release 3, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
(Regents). All Rights Reserved. Redistribution and use in source and binary California (Regents). All Rights Reserved. Redistribution and use in source
forms, with or without modification, are permitted provided that the following and binary forms, with or without modification, are permitted provided that
conditions are met: the following conditions are met:
Redistributions of source code must retain the above copyright notice, Redistributions of source code must retain the above copyright notice,
this list of conditions, and the following two paragraphs of disclaimer. this list of conditions, and the following two paragraphs of disclaimer.
@ -83,7 +83,7 @@ float64_t
} }
if ( roundBits ) softfloat_exceptionFlags |= softfloat_flag_inexact; if ( roundBits ) softfloat_exceptionFlags |= softfloat_flag_inexact;
sig = (sig + roundIncrement)>>10; sig = (sig + roundIncrement)>>10;
sig &= ~(! (roundBits ^ 0x200) & roundNearEven); sig &= ~(uint_fast64_t) (! (roundBits ^ 0x200) & roundNearEven);
uiZ = packToF64UI( sign, sig ? exp : 0, sig ); uiZ = packToF64UI( sign, sig ? exp : 0, sig );
uiZ: uiZ:
uZ.ui = uiZ; uZ.ui = uiZ;

View File

@ -4,10 +4,10 @@
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
Package, Release 3, by John R. Hauser. Package, Release 3, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
(Regents). All Rights Reserved. Redistribution and use in source and binary California (Regents). All Rights Reserved. Redistribution and use in source
forms, with or without modification, are permitted provided that the following and binary forms, with or without modification, are permitted provided that
conditions are met: the following conditions are met:
Redistributions of source code must retain the above copyright notice, Redistributions of source code must retain the above copyright notice,
this list of conditions, and the following two paragraphs of disclaimer. this list of conditions, and the following two paragraphs of disclaimer.
@ -60,7 +60,7 @@ int_fast32_t
sig += roundIncrement; sig += roundIncrement;
if ( sig & UINT64_C( 0xFFFFFF8000000000 ) ) goto invalid; if ( sig & UINT64_C( 0xFFFFFF8000000000 ) ) goto invalid;
sig32 = sig>>7; sig32 = sig>>7;
sig32 &= ~(! (roundBits ^ 0x40) & roundNearEven); sig32 &= ~(uint_fast32_t) (! (roundBits ^ 0x40) & roundNearEven);
uZ.ui = sign ? -sig32 : sig32; uZ.ui = sign ? -sig32 : sig32;
z = uZ.i; z = uZ.i;
if ( z && ((z < 0) ^ sign) ) goto invalid; if ( z && ((z < 0) ^ sign) ) goto invalid;

View File

@ -4,10 +4,10 @@
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
Package, Release 3, by John R. Hauser. Package, Release 3, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
(Regents). All Rights Reserved. Redistribution and use in source and binary California (Regents). All Rights Reserved. Redistribution and use in source
forms, with or without modification, are permitted provided that the following and binary forms, with or without modification, are permitted provided that
conditions are met: the following conditions are met:
Redistributions of source code must retain the above copyright notice, Redistributions of source code must retain the above copyright notice,
this list of conditions, and the following two paragraphs of disclaimer. this list of conditions, and the following two paragraphs of disclaimer.
@ -62,7 +62,9 @@ int_fast64_t
++sig; ++sig;
if ( ! sig ) goto invalid; if ( ! sig ) goto invalid;
sig &= sig &=
~(! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF )) & roundNearEven); ~(uint_fast64_t)
(! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
& roundNearEven);
} }
uZ.ui = sign ? -sig : sig; uZ.ui = sign ? -sig : sig;
z = uZ.i; z = uZ.i;

View File

@ -4,10 +4,10 @@
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
Package, Release 3, by John R. Hauser. Package, Release 3, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
(Regents). All Rights Reserved. Redistribution and use in source and binary California (Regents). All Rights Reserved. Redistribution and use in source
forms, with or without modification, are permitted provided that the following and binary forms, with or without modification, are permitted provided that
conditions are met: the following conditions are met:
Redistributions of source code must retain the above copyright notice, Redistributions of source code must retain the above copyright notice,
this list of conditions, and the following two paragraphs of disclaimer. this list of conditions, and the following two paragraphs of disclaimer.
@ -58,7 +58,7 @@ uint_fast32_t
sig += roundIncrement; sig += roundIncrement;
if ( sig & UINT64_C( 0xFFFFFF8000000000 ) ) goto invalid; if ( sig & UINT64_C( 0xFFFFFF8000000000 ) ) goto invalid;
z = sig>>7; z = sig>>7;
z &= ~(! (roundBits ^ 0x40) & roundNearEven); z &= ~(uint_fast32_t) (! (roundBits ^ 0x40) & roundNearEven);
if ( sign && z ) goto invalid; if ( sign && z ) goto invalid;
if ( exact && roundBits ) { if ( exact && roundBits ) {
softfloat_exceptionFlags |= softfloat_flag_inexact; softfloat_exceptionFlags |= softfloat_flag_inexact;

View File

@ -4,10 +4,10 @@
This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic This C source file is part of the SoftFloat IEEE Floating-Point Arithmetic
Package, Release 3, by John R. Hauser. Package, Release 3, by John R. Hauser.
Copyright 2011, 2012, 2013, 2014 The Regents of the University of California Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of
(Regents). All Rights Reserved. Redistribution and use in source and binary California (Regents). All Rights Reserved. Redistribution and use in source
forms, with or without modification, are permitted provided that the following and binary forms, with or without modification, are permitted provided that
conditions are met: the following conditions are met:
Redistributions of source code must retain the above copyright notice, Redistributions of source code must retain the above copyright notice,
this list of conditions, and the following two paragraphs of disclaimer. this list of conditions, and the following two paragraphs of disclaimer.
@ -60,7 +60,9 @@ uint_fast64_t
++sig; ++sig;
if ( ! sig ) goto invalid; if ( ! sig ) goto invalid;
sig &= sig &=
~(! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF )) & roundNearEven); ~(uint_fast64_t)
(! (sigExtra & UINT64_C( 0x7FFFFFFFFFFFFFFF ))
& roundNearEven);
} }
if ( sign && sig ) goto invalid; if ( sign && sig ) goto invalid;
if ( exact && sigExtra ) { if ( exact && sigExtra ) {