Re: [PATCH], Add weak references to bridge old/new PowerPC ieee 128-bit name mangling

2018-06-05 Thread Joseph Myers
On Tue, 5 Jun 2018, Jakub Jelinek wrote: > On Tue, Jun 05, 2018 at 04:08:13PM +, Joseph Myers wrote: > > On Tue, 5 Jun 2018, Jakub Jelinek wrote: > > > > > If we need the C separate _FloatNN types in C++, they can mangle the way > > > we > > > (and others) agree on. Would _Float64 be distin

Re: [PATCH], Add weak references to bridge old/new PowerPC ieee 128-bit name mangling

2018-06-05 Thread Jakub Jelinek
On Tue, Jun 05, 2018 at 04:08:13PM +, Joseph Myers wrote: > On Tue, 5 Jun 2018, Jakub Jelinek wrote: > > > If we need the C separate _FloatNN types in C++, they can mangle the way we > > (and others) agree on. Would _Float64 be distinct from double and thus > > mangle differently from "d"? >

Re: [PATCH], Add weak references to bridge old/new PowerPC ieee 128-bit name mangling

2018-06-05 Thread Joseph Myers
On Tue, 5 Jun 2018, Jakub Jelinek wrote: > If we need the C separate _FloatNN types in C++, they can mangle the way we > (and others) agree on. Would _Float64 be distinct from double and thus > mangle differently from "d"? Right now it (as accessed via __typeof on built-in functions since the _

Re: [PATCH], Add weak references to bridge old/new PowerPC ieee 128-bit name mangling

2018-06-05 Thread Jakub Jelinek
On Tue, Jun 05, 2018 at 03:01:23PM +0200, Jason Merrill wrote: > > Now that we only have two types, you can't have explicit overloading of the > > same type. You can have templates, because only one version of the > > template is > > created for the two types. > > I thought that the two long dou

Re: [PATCH], Add weak references to bridge old/new PowerPC ieee 128-bit name mangling

2018-06-05 Thread Jason Merrill
On Tue, Jun 5, 2018 at 12:05 AM, Michael Meissner wrote: > On Mon, Jun 04, 2018 at 12:46:42PM -0500, Segher Boessenkool wrote: >> Hi Mike, >> >> On Fri, Jun 01, 2018 at 07:28:40PM -0400, Michael Meissner wrote: >> > This patch also makes __ibm128 or __float128 use the long double mode if >> > lon

Re: [PATCH], Add weak references to bridge old/new PowerPC ieee 128-bit name mangling

2018-06-04 Thread Michael Meissner
On Mon, Jun 04, 2018 at 05:19:07PM -0500, Segher Boessenkool wrote: > You can still have overloads, just not two between the same type. So you > can have both __ibm128 and __ieee128. Yes of course, but the test is explicitly testing whether you can overloads with the same type. > > The test in q

Re: [PATCH], Add weak references to bridge old/new PowerPC ieee 128-bit name mangling

2018-06-04 Thread Segher Boessenkool
On Mon, Jun 04, 2018 at 06:05:59PM -0400, Michael Meissner wrote: > > > This > > > allows templates to work again with those types (the template code aborts > > > if > > > you have two distinct types use the same mangling). However, overloaded > > > types > > > won't work, but I suspect these da

Re: [PATCH], Add weak references to bridge old/new PowerPC ieee 128-bit name mangling

2018-06-04 Thread Michael Meissner
On Mon, Jun 04, 2018 at 12:46:42PM -0500, Segher Boessenkool wrote: > Hi Mike, > > On Fri, Jun 01, 2018 at 07:28:40PM -0400, Michael Meissner wrote: > > This patch also makes __ibm128 or __float128 use the long double mode if > > long > > double uses the IBM extended double or IEEE 128-bit repres

Re: [PATCH], Add weak references to bridge old/new PowerPC ieee 128-bit name mangling

2018-06-04 Thread Segher Boessenkool
Hi Mike, On Fri, Jun 01, 2018 at 07:28:40PM -0400, Michael Meissner wrote: > This patch also makes __ibm128 or __float128 use the long double mode if long > double uses the IBM extended double or IEEE 128-bit representations. Does that need to be the same patch? Please split such things out when

Re: [PATCH], Add weak references to bridge old/new PowerPC ieee 128-bit name mangling

2018-06-01 Thread Andreas Schwab
On Jun 01 2018, Michael Meissner wrote: > This patch adds a hook to emit a weak reference for the old mangled name when > we are creating the new mangled name with a different spelling. I added an > undocumented switch (-malias-old-name-mangling) to not create the weak > reference if it is a pro

[PATCH], Add weak references to bridge old/new PowerPC ieee 128-bit name mangling

2018-06-01 Thread Michael Meissner
The new mangling scheme for PowerPC now uses "u9__ieee128" as the mangled name instead of "U10__float128". This would break old code that used __float128 and called to libraries built with the new compiler. This patch adds a hook to emit a weak reference for the old mangled name when we are creat