On Mon, 2018-06-25 at 04:44 -0500, Segher Boessenkool wrote: > Hi Carl, > > 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. The source for divkc3-2.c is: /* { dg-do compile { target { powerpc*-*-* } } } */ /* { dg-require-effective-target powerpc_p8vector_ok } */ /* { dg-options "-O2 -mpower8-vector -mabi=ieeelongdouble -Wno-psabi" } */ /* Check that complex multiply generates the right call when long double is IEEE 128-bit floating point. */ typedef _Complex long double cld_t; void divide (cld_t *p, cld_t *q, cld_t *r) { *p = *q / *r; } /* { dg-final { scan-assembler "bl __divkc3" { target { powerpc*-*-linux* } } } } */ /* { dg-final { scan-assembler "bl .__divdc3" { target { powerpc*-*-aix* } } } } */ When compiled as: gcc -S -c -O2 -mpower8-vector -mabi=ieeelongdouble -Wno-psabi divkc3-.c I get: .file "divkc3-2.c" .toc .csect .text[PR] .align 2 .align 4 .globl divide .globl .divide .csect divide[DS] divide: .long .divide, TOC[tc0], 0 .csect .text[PR] .divide: mflr 0 stw 31,-4(1) lfd 4,8(5) stw 0,8(1) lfd 3,0(5) mr 31,3 stwu 1,-80(1) lfd 2,8(4) lfd 1,0(4) bl .__divdc3 nop addi 1,1,80 lwz 0,8(1) stfd 1,0(31) stfd 2,8(31) lwz 31,-4(1) mtlr 0 blr LT..divide: .long 0 .byte 0,0,32,65,128,1,3,0 .long 0 .long LT..divide-.divide .short 6 .byte "divide" .align 2 _section_.text: .csect .data[RW],4 .long _section_.text Again, running the regression test, the test passes with the AIX value. So, not sure why AIX and Linux are not calling the name for the function or if what is being called is functionally equivalent? > > > --- a/gcc/testsuite/gcc.target/powerpc/divkc3-3.c > > +++ b/gcc/testsuite/gcc.target/powerpc/divkc3-3.c > > @@ -13,4 +13,5 @@ divide (cld_t *p, cld_t *q, cld_t *r) > > *p = *q / *r; > > } > > > > -/* { dg-final { scan-assembler "bl __divtc3" } } */ > > +/* { dg-final { scan-assembler "bl __divtc3" { target { powerpc*- > > *-linux* } } } } */ > > +/* { dg-final { scan-assembler "bl .__divdc3" { target { powerpc*- > > *-aix* } } } } */ > > Same question here. If the AIX port cannot handle > -mabi=ieeelongdouble > it shouldn't silently accept it, etc. Ditto above comments, don't know about the -mabi=ieeelongdouble. I will play around with and without the mabi=ieeelongdouble on AIX and Linux to see what happens. > > > diff --git a/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl- > > double.c b/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl- > > double.c > > index 25f4bc6..403876d 100644 > > --- a/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c > > +++ b/gcc/testsuite/gcc.target/powerpc/fold-vec-mergehl-double.c > > @@ -19,7 +19,6 @@ testd_h (vector double vd2, vector double vd3) > > return vec_mergeh (vd2, vd3); > > } > > > > -/* vec_merge with doubles tend to just use xxpermdi (3 ea for BE, > > 1 ea for LE). */ > > -/* { dg-final { scan-assembler-times "xxpermdi" 2 { target { > > powerpc*le-*-* } } } } */ > > -/* { dg-final { scan-assembler-times "xxpermdi" 6 { target { > > powerpc-*-* } } } } */ > > +/* { dg-final { scan-assembler-times "xxpermdi" 2 } } */ > > + > > > > Is this change correct? The test didn't fail on BE Linux (neither > 32-bit > nor 64-bit) as far as I know. As I recall, my testing on the various systems did give me an error without the change. I was using Willow 8 (P8 BE), genoa (P8 LE) and gcc119 for AIX. I will go back and re-verify. Carl Love