This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC PATCH] Optionally use -mlong-double-128 by default on {powerpc{,64},s390{,x},sparc,alpha}-linux
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jason Merrill <jason at redhat dot com>, Michael Matz <matz at suse dot de>, Benjamin Kosnik <bkoz at redhat dot com>, gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Wed, 01 Feb 2006 00:34:32 -0800
- Subject: Re: [RFC PATCH] Optionally use -mlong-double-128 by default on {powerpc{,64},s390{,x},sparc,alpha}-linux
- References: <20060127165807.GV32233@devserv.devel.redhat.com> <Pine.LNX.4.58.0601311640500.627@wotan.suse.de> <20060131172535.GQ32233@devserv.devel.redhat.com> <43E05F19.4000103@codesourcery.com> <20060201082138.GX32233@devserv.devel.redhat.com>
Jakub Jelinek wrote:
> If we could use "g" for TFmode long double on the architectures in question
> (powerpc*-*-linux*, sparc{,v7,v8,v9}-*-linux*, s390*-*-linux* and
> alpha*-*-linux*), I'm all for that.
I think it's a reasonable thing to do. (Of course, if you do this, you
also have to change the demangler.)
You could implement it with the mangle_fundamental_type target hook.
However, if this is going to be common practice on lots of platforms, it
might make sense to modify write_builtin_type to do something like:
if (type == long_double_type_node)
write_char (targetm.mangle_fundamental_type (type));
Then, make a default version of that hook that mangles to 'e', and, for
your targets, mangle to 'g'. Make all current versions of the hook
tail-call the default hook for cases they do not handle. Remove the
conditional in write_builtin_type checking to see if the hook is
non-NULL, since now it will always be non-NULL.
I'm not sure which is better; what do you think?
> It would certainly help a lot for
> coexistence of C++ code with different long doubles in one app
Right.
> And it would certainly simplify the libstdc++ patch a lot as well
> and make it easier to prove that it works correctly with both "e"
> and "g" long double.
Yes.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713
- References:
- Re: [RFC PATCH] Optionally use -mlong-double-128 by default on {powerpc{,64},s390{,x},sparc,alpha}-linux
- Re: [RFC PATCH] Optionally use -mlong-double-128 by default on {powerpc{,64},s390{,x},sparc,alpha}-linux