diff options
author | Keith Packard <keithp@keithp.com> | 2025-01-07 14:54:11 -0700 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2025-01-07 14:54:11 -0700 |
commit | 0115ef57efa9966fa7f448185dd5c741f58d4fac (patch) | |
tree | 7613074f36ed82ca92190b366e5c4efc7a9ea72c /gcc | |
parent | d953c2c5714ed8503c4ae1b7d059a62e4e9a0624 (diff) | |
download | gcc-0115ef57efa9966fa7f448185dd5c741f58d4fac.zip gcc-0115ef57efa9966fa7f448185dd5c741f58d4fac.tar.gz gcc-0115ef57efa9966fa7f448185dd5c741f58d4fac.tar.bz2 |
[PATCH] libgcc/m68k: More fixes for soft float
Fix __extenddfxf2:
* Remove bogus denorm handling block which would never execute --
the converted exp value is always positive as EXCESSX > EXCESSD.
* Compute the whole significand in dl instead of doing part of it in
ldl.
* Mask off exponent from dl.l.upper so the denorm shift test
works.
* Insert the hidden one bit into dl.l.upper as needed.
Fix __truncxfdf2 denorm handling. All that is required is to shift the
significand right by the correct amount; it already has all of the
necessary bits set including the explicit one. Compute the shift
amount, then perform the wide shift across both elements of the
significand.
Fix __fixxfsi:
* The value was off by a factor of two as the significand contains
32 bits, not 31 so we need to shift by one more than the equivalent
code in __fixdfsi.
* Simplify the code having realized that the lower 32 bits of the
significand can never appear in the results.
Return positive qNaN instead of negative. For floats, qNaN is 0x7fff_ffff. For
doubles, qNaN is 0x7fff_ffff_ffff_ffff.
Return correctly signed zero on float and double divide underflow. This means
that Ld$underflow now expects d7 to contain the sign bit, just like the other
return paths.
libgcc/
* config/m68k/fpgnulib.c (extenddfxf2): Simplify code by removing code
that should never execute. Fix denorm shift test and insert hidden bit
as needed.
(__truncxfdf2): Properly compue and shift the significant right.
* config/m68k/lb1sf68.S (__fixxfsi): Correct shift counts and simplify.
(QUIET_NAN): Make it a positive quiet NaN and fix return values to inject
sign properly.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions