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. So, hang on :-) Segher