libgcc/m68k: Fixes for soft float#93
Open
keith-packard wants to merge 2 commits intogcc-mirror:masterfrom
Open
libgcc/m68k: Fixes for soft float#93keith-packard wants to merge 2 commits intogcc-mirror:masterfrom
keith-packard wants to merge 2 commits intogcc-mirror:masterfrom
Conversation
7bab964 to
3393fcc
Compare
|
This is a read-only mirror that is not managed by GCC developers. Pull requests in this read-only mirror will be ignored forever. If you wish to contribute to GCC please read: https://gcc.gnu.org/wiki/GettingStarted |
Just like i386, you cannot extract float or double values by using the low bits of m68k float registers. Override this hook and check that case. Signed-off-by: Keith Packard <[email protected]>
3393fcc to
b7e023f
Compare
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.
Signed-off-by: Keith Packard <[email protected]>
b7e023f to
c1ea994
Compare
NinaRanns
pushed a commit
to NinaRanns/gcc
that referenced
this pull request
Mar 19, 2025
fixing detection of non-const parameters in re-declarations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Check for non-zero denorm in __adddf3. Need to check both the upper and lower 32-bit chunks of a 64-bit float for a non-zero value when checking to see if the value is -0.
Fix __addsf3 when the sum exponent is exactly 0xff to ensure that produces infinity and not nan.
Handle converting NaN/inf values between formats.
Handle underflow and overflow when truncating.
Write a replacement for __fixxfsi so that it does not raise extra exceptions during an extra conversion from long double to double.