public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Edelsohn <dje.gcc@gmail.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: "Carl E. Love" <cel@us.ibm.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
		"William J. Schmidt" <wschmidt@linux.vnet.ibm.com>
Subject: Re: [PATCH, rs6000] Fix AIX test case failures
Date: Fri, 13 Jul 2018 14:51:00 -0000	[thread overview]
Message-ID: <CAGWvnymsO6ZqfdUzVzhYSirXbtOgzsHBpbFx=7wKj8YYqtanBA@mail.gmail.com> (raw)
In-Reply-To: <20180625170419.GK16221@gate.crashing.org>

On Mon, Jun 25, 2018 at 1:04 PM Segher Boessenkool
<segher@kernel.crashing.org> wrote:
>
> On Mon, Jun 25, 2018 at 09:53:17AM -0700, Carl Love wrote:
> > On Mon, 2018-06-25 at 04:44 -0500, Segher Boessenkool wrote:
> > > On Fri, Jun 22, 2018 at 02:55:44PM -0700, Carl Love wrote:
> > > > --- a/gcc/testsuite/gcc.target/powerpc/divkc3-2.c
> > > > +++ b/gcc/testsuite/gcc.target/powerpc/divkc3-2.c
> > > > @@ -13,4 +13,5 @@ divide (cld_t *p, cld_t *q, cld_t *r)
> > > >    *p = *q / *r;
> > > >  }
> > > >
> > > > -/* { dg-final { scan-assembler "bl __divkc3" } } */
> > > > +/* { dg-final { scan-assembler "bl __divkc3" { target { powerpc*-
> > > > *-linux* } } } } */
> > > > +/* { dg-final { scan-assembler "bl .__divdc3" { target { powerpc*-
> > > > *-aix* } } } } */
> > >
> > > Should it be calling __divdc3 on AIX, is that correct?
> >
> > I was a bit surprised that it wasn't calling divkc3.  I am guessing
> > these are library routines we are calling?  I couldn't find the source
> > code for them and don't really know what the difference is between
> > divkc3 and divdc3.
>
> divkc3 is for KCmode, that is the complex mode for KFmode (128-bit IEEE).
> divdc3 is for DCmode, that is the complex mode for DFmode (64-bit IEEE,
> that is, "double").
>
> I think this is the same as PR82625, for which I have a patch in testing.
>
> > So, not sure why AIX and Linux are not calling the name for the
> > function or if what is being called is functionally equivalent?
>
> AIX uses 64-bit long double by default, and GCC has a bug with that and
> -mabi=ieeelongdouble and __ieee128.
>
> It thinks __ieee128 is the same as long double if it has -mabi=ieeelongdouble,
> but that is not always true.  So it ends up using the long double type for
> __ieee128, but that is just double precision float in this case.

On AIX it would be calling divtc3, but AIX defaults to 64 bit long
double.  Either all of these tests need

/* { dg-require-effective-target longdouble128 } */

or

/* { dg-additional-options "-mlong-double-128" { target powerpc-ibm-aix* } } */

along with testing for "tc", e.g., bl .__divtc3

Thanks, David

  reply	other threads:[~2018-07-13 14:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-22 21:55 Carl Love
2018-06-25  9:44 ` Segher Boessenkool
2018-06-25 16:53   ` Carl Love
2018-06-25 17:04     ` Segher Boessenkool
2018-07-13 14:51       ` David Edelsohn [this message]
2018-07-13 21:00         ` Segher Boessenkool
2018-07-13 23:16           ` Carl Love
2018-07-14  3:08             ` David Edelsohn
2018-07-16 19:59             ` Segher Boessenkool
2018-07-17 23:40             ` Carl Love
2018-07-18 21:51               ` Segher Boessenkool

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGWvnymsO6ZqfdUzVzhYSirXbtOgzsHBpbFx=7wKj8YYqtanBA@mail.gmail.com' \
    --to=dje.gcc@gmail.com \
    --cc=cel@us.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=segher@kernel.crashing.org \
    --cc=wschmidt@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).