[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-18 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D64067#1592201 , @troyj wrote: > Hi, we just inherited this commit at Cray when we did our latest upstream > merge and there are a few problems with it that I'd like to point out. Sorry > that I was not part of the initial

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-18 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In D64067#1592201 , @troyj wrote: > Hi, we just inherited this commit at Cray when we did our latest upstream > merge and there are a few problems with it that I'd like to point out. Sorry > that I was not part of the initial

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-18 Thread Troy Johnson via Phabricator via cfe-commits
troyj added a comment. Hi, we just inherited this commit at Cray when we did our latest upstream merge and there are a few problems with it that I'd like to point out. Sorry that I was not part of the initial discussion here, but I didn't know that this work was being done and I had already

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-08 Thread Fangrui Song via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365412: [X86][PPC] Support -mlong-double-64 (authored by MaskRay, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rL LLVM CHANGES SINCE LAST ACTION

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-08 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. lgtm Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64067/new/ https://reviews.llvm.org/D64067 ___ cfe-commits mailing

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-06 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 208255. MaskRay added a comment. Herald added a subscriber: wuzish. Add more tests: elf32/elf64/darwin... Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64067/new/ https://reviews.llvm.org/D64067 Files:

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. `-mlong-double-128` is not supported now. The mangling scheme of `-mlong-double-64` is consistent with gcc on x86 and ppc. % g++ a.cc -S -o - | grep '^_Z3foo' _Z3fooe: % g++ a.cc -S -o - -mlong-double-64 | grep '^_Z3foo' _Z3fooe: % g++ a.cc -S -o -

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 207965. MaskRay edited the summary of this revision. MaskRay added a comment. Add tests to check mangling of long double -mlong-double-64 has no effect on gcc x86. On gcc ppc, -mlong-double-64 changes the mangled type from 'g' (ibmlongdouble) to 'e'

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-03 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a comment. In D64067#1568895 , @hfinkel wrote: > One thing to realize about these flags is that they're ABI-altering flags. If > the user provides the flag to alter the platform defaults, this only works if > the user also ensures

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-03 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In D64067#156 , @rnk wrote: > In D64067#1568533 , @andrew.w.kaylor > wrote: > > > In this review (https://reviews.llvm.org/D6260) @rsmith mentions that this > > should also have an

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D64067#1568533 , @andrew.w.kaylor wrote: > In this review (https://reviews.llvm.org/D6260) @rsmith mentions that this > should also have an effect on name mangling. I'm not sure that's consistent with GCC, at least not anymore:

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-03 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a comment. In this review (https://reviews.llvm.org/D6260) @rsmith mentions that this should also have an effect on name mangling. What will this do if the user calls a library function that expects a long double? What does gcc do in that case? Repository: rC Clang

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 207795. MaskRay added a comment. Make powerpc* musl default to 64-bit long double Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64067/new/ https://reviews.llvm.org/D64067 Files: include/clang/Basic/LangOptions.def

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 207708. MaskRay added a comment. Check -malign-double Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64067/new/ https://reviews.llvm.org/D64067 Files: include/clang/Basic/LangOptions.def include/clang/Driver/Options.td

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-02 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. Can you please add a test ensuring that -malign-double and -mlong-double-64 interact properly? I think that, in the current patch, they do (as -malign-double is processed first), but I'd prefer that we cover that case explicitly. Repository: rC Clang CHANGES SINCE

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 207695. MaskRay edited the summary of this revision. MaskRay added a comment. Implement this in TargetInfo::adjust as rnk suggested Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64067/new/ https://reviews.llvm.org/D64067

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Sounds good to me. I had a minor suggestion, though. Comment at: lib/Basic/Targets/PPC.cpp:468 Opts.AltiVec = 1; - TargetInfo::adjust(Opts); + if (Opts.LongDoubleSize == 64) { +LongDoubleWidth = LongDoubleAlign = 64; I think it

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 207532. MaskRay added a comment. Improve a test Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64067/new/ https://reviews.llvm.org/D64067 Files: include/clang/Basic/LangOptions.def include/clang/Driver/Options.td

[PATCH] D64067: [X86][PPC] Support -mlong-double-64

2019-07-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay created this revision. MaskRay added reviewers: awilfox, echristo, hfinkel, rnk, rsmith. Herald added subscribers: cfe-commits, jsji, kbarton, nemanjai. Herald added a project: clang. -mlong-double-64 is supported on some ports of gcc (i386, x86_64, and ppc{32,64}). On many other