This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rs6000] Use new __builtin_pack_longdouble within libgcc's ibm-ldouble.c
- From: David Edelsohn <dje dot gcc at gmail dot com>
- To: Peter Bergner <bergner at vnet dot ibm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Alan Modra <amodra at gmail dot com>
- Date: Wed, 30 Jul 2014 22:13:29 -0400
- Subject: Re: [PATCH, rs6000] Use new __builtin_pack_longdouble within libgcc's ibm-ldouble.c
- Authentication-results: sourceware.org; auth=none
- References: <1406645783 dot 6052 dot 52 dot camel at otta>
On Tue, Jul 29, 2014 at 10:56 AM, Peter Bergner <bergner@vnet.ibm.com> wrote:
> ..after cleaning up the conflicting long double builtins and fixing a
> few bugs in the test cases, I'd like to resubmit the following:
>
> Currently, the IBM long double routines in libgcc use a union to construct
> a long double from two double values. This causes horrific code generation
> that copies the two double from the FP registers over to GPRs and back
> again, giving us two loads and two stores, which leads to two load-hit-store
> hazzards. The following patch makes use of the new __builtin_pack_longdouble
> builtin to construct the long double giving us at worse, one or two fmrs.
>
> This passed bootstrap and regtesting on powerpc64-linux. Ok for trunk?
>
> Peter
>
>
> libgcc/
> * config/rs6000/ibm-ldouble.c (typedef union longDblUnion): Delete.
> (pack_ldouble): New function.
> (__gcc_qadd): Use it.
> (__gcc_qmul): Likewise.
> (__gcc_qdiv): Likewise.
> (__gcc_qneg): Likewise.
> (__gcc_stoq): Likewise.
> (__gcc_dtoq): Likewise.
Okay.
Thanks, David