This is an archive of the discontinued LLVM Phabricator instance.

[AIX] Define __LONGDOUBLE64 macro
ClosedPublic

Authored by Jake-Egan on Jul 6 2021, 6:33 AM.

Details

Summary

This patch defines the macro __LONGDOUBLE64 for AIX when long double is 8 bytes.

Diff Detail

Event Timeline

Jake-Egan created this revision.Jul 6 2021, 6:33 AM
Jake-Egan requested review of this revision.Jul 6 2021, 6:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 6 2021, 6:33 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Jake-Egan retitled this revision from Define __LONGDOUBLE64 macro to [AIX] Define __LONGDOUBLE64 macro.Jul 6 2021, 6:39 AM
Jake-Egan edited the summary of this revision. (Show Details)
cebowleratibm requested changes to this revision.Jul 6 2021, 8:19 AM
cebowleratibm added inline comments.
clang/lib/Basic/Targets/PPC.cpp
299

I suggest querying the -mlong-double-64 option and asserting that the LongDoubleWidth is 64.

This revision now requires changes to proceed.Jul 6 2021, 8:19 AM
Jake-Egan updated this revision to Diff 357399.Jul 8 2021, 6:12 PM

Add control by -mlong-double-64 option.

Jake-Egan marked an inline comment as done.Jul 8 2021, 6:13 PM
Jake-Egan edited the summary of this revision. (Show Details)Jul 8 2021, 6:17 PM
cebowleratibm accepted this revision.Jul 9 2021, 7:38 AM

The change made me think we should add the negative test with -mlong-double-128, but then I thought we should probably make that an error until we've sorted through the AIX binary compat implications and tested it. So the patch you've proposed makes sense to me and we should follow up with handling for mlong-double-128.

This revision is now accepted and ready to land.Jul 9 2021, 7:38 AM

The decision was made to make -mlong-double-128 an error on AIX: https://reviews.llvm.org/D106074 [AIX] Clang's library integration support for 128-bit long double is incomplete on AIX.

So I think your patch is ready to land. LGTM.

This revision was automatically updated to reflect the committed changes.