This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix x87 binary->decimal
ClosedPublic

Authored by klausler on May 4 2020, 11:50 AM.

Details

Summary

Fix decimal formatting of 80-bit x87 values; the calculation ofnearest neighbor values failed to account for the explicitmost significant bit in that format.

Replace MultiplyByRounded with MultiplyBy in binary->decimal conversions,
since rounding won't happen and the name was misleading; then remove
dead code, and migrate LoseLeastSignificantDigit() from one source file
to another where it's still needed.

Diff Detail

Event Timeline

klausler created this revision.May 4 2020, 11:50 AM
Herald added a project: Restricted Project. · View Herald Transcript
tskeith accepted this revision.May 4 2020, 11:52 AM
This revision is now accepted and ready to land.May 4 2020, 11:52 AM
klausler retitled this revision from Summary: Fix decimal formatting of 80-bit x87 values; the calculation of nearest neighbor values failed to account for the explicit most significant bit in that format. to [flang] Fix x87 binary->decimal.May 4 2020, 11:55 AM
klausler edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.