This is an archive of the discontinued LLVM Phabricator instance.

[libc] Modify the struct that captures floating point encoding to have setters and getters
AbandonedPublic

Authored by hedingarcia on Jul 8 2021, 8:55 AM.

Details

Reviewers
None
Summary

Redefined FPBits.h and LongDoubleBitsX86 to have structs that adjust the value of the bit
representation of a float by using setters and getters functions and use values such as
bit masks from FloatProperties.h. Subsequent files that made reference to the instance
of the struct, by targeting its specific variables(like mantissa, exponent, and sign),
were fixed to call these functions to modify its value indirectly. This implementation was
done to make sure the struct works for Windows and Linux platform maintaining pack memory
alignment of the struct so its size in memory is the same as the data type of the float point number.

Diff Detail

Event Timeline

hedingarcia created this revision.Jul 8 2021, 8:55 AM
hedingarcia requested review of this revision.Jul 8 2021, 8:55 AM
hedingarcia abandoned this revision.Jul 8 2021, 8:56 AM