From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32204 invoked by alias); 13 Jul 2018 14:51:40 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 32183 invoked by uid 89); 13 Jul 2018 14:51:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=128bit, Hx-languages-length:2163, love X-HELO: mail-lj1-f195.google.com Received: from mail-lj1-f195.google.com (HELO mail-lj1-f195.google.com) (209.85.208.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Jul 2018 14:51:38 +0000 Received: by mail-lj1-f195.google.com with SMTP id 203-v6so13695639ljj.13 for ; Fri, 13 Jul 2018 07:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XdrYe5engFM5ZmIWxOdwth7XcQSuu4KaiihE2RcDMZM=; b=G+FYx/qRXiUxdH+dYfdvuY70MtfkqzFg/akgHSkCjcIIjOUwv4xArbqIQDrhCJuwlV 9uRCr/15lGODVdU8IV4I14190NxJy8r5j/crHdyeTFJW2sEcFC5tO/GkLI0tV/c4CcKd 4/70qbKeEt75Q4/RzivzjmUFUNfpVRYWVnQy4xwzZshML6Yy+uNqeykdiYfIGM1770Xb IGyDXED9dDc4TDH8DTsEx5/3FzWJyBacNs68Flmw8BVQZWdltR9Ua94JPp5T3bbHx1Rf hi2ZQ2gpNXKg+XKpQPZTBs+LWGfrwU/ToC+mSJTKAJbZfakwzJPdWFkElfH/xps/boQx iNCQ== MIME-Version: 1.0 References: <1529704544.7264.13.camel@us.ibm.com> <20180625094450.GD16221@gate.crashing.org> <1529945597.6530.4.camel@us.ibm.com> <20180625170419.GK16221@gate.crashing.org> In-Reply-To: <20180625170419.GK16221@gate.crashing.org> From: David Edelsohn Date: Fri, 13 Jul 2018 14:51:00 -0000 Message-ID: Subject: Re: [PATCH, rs6000] Fix AIX test case failures To: Segher Boessenkool Cc: "Carl E. Love" , GCC Patches , "William J. Schmidt" Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2018-07/txt/msg00698.txt.bz2 On Mon, Jun 25, 2018 at 1:04 PM Segher Boessenkool 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