This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: powerpc targets, long double implementation, and c++ programs
On Fri, 8 Sep 2006, Edmar Wienskoski wrote:
> Ok. I am starting to see the whole picture now.
> So the whole thing appears to work with --disable-shared, just because the way
> the linker
> loads symbols in presence of libgcc_s.so versus libgcc.a.
>
> Follow up question:
> The e500 abi actualy defines long double to be 128bits floats.
> On rs6000.c, rs6000_init_libfuncs links to __gcc_qadd becasue of
> TARGET_HARD_FLOAT
> shouldn't that be TARGET_HARD_FLOAT && TARGET_FPRS
> and also have:
> diff -u t-fprules-softfp~ t-fprules-softfp
> --- t-fprules-softfp~ 2006-08-09 14:20:24.000000000 -0500
> +++ t-fprules-softfp 2006-09-06 12:39:17.000000000 -0500
> @@ -1,4 +1,4 @@
> -softfp_float_modes := sf df
> +softfp_float_modes := sf df tf
> softfp_int_modes := si di
> softfp_extensions := sfdf
> softfp_truncations := dfsf
>
> Would that be right ?
No.
(a) The existing GNU/Linux ABIs use or are intended to use IBM long
double, not IEEE long double, and the E500 GNU/Linux ABI should be
compatible with the other ABIs in this regard. The present formal ABI
documents are not very relevant to the de facto GNU/Linux ABIs.
(b) To use IEEE long double with soft-fp you'll need to add sftf dftf to
softfp_extensions and tfdf tfsf to softfp_truncations.
(c) If using IEEE long double on PowerPC, you should be using the standard
_q_* functions defined in the psABI, and not the __*tf* functions at all.
glibc does provide the _q_* functions (albeit with a typo meaning _q_utoq
is missing), though since they don't get built with -mabi=ieeelongdouble
they aren't actually usable.
--
Joseph S. Myers
joseph@codesourcery.com