From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 8A9001F731 for ; Thu, 1 Aug 2019 17:05:06 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version:content-type; q=dns; s=default; b=QbUZN MebbYL+mwVHyV9AIkSGnentj2wcev3j58dLQ/igVUIxfHdpgN9GZvGEogAjSAkhM QZ6NRw+Q5EOfHNAAjnSBNFdhkZEqGmaXtYPtBOjlEu0mh4yxMrT55fRsuE8cMpRf IXPBiuUFskr4/y1k42kyE6k4IAWh7ChXrhQzhA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version:content-type; s=default; bh=LgiVrrugh4I h/sa0ZCisU1ATlp4=; b=E9ipTIa53O5ZzApl0y6kr7OjgvVQEbUZcmU/MHxseAb jEWbA1h2gz31M+6gVcN5lzVnUdkZxIV7Aoo8j5y+HOVcyem+dmnlDxSlf1Q+KuKn wqjCMqzGfv0ofpQnI1a43SstyWHg0xyszIXXY07kZqPBaivsUhsEJuZ053+WGj3g = Received: (qmail 121092 invoked by alias); 1 Aug 2019 17:04:56 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 120951 invoked by uid 89); 1 Aug 2019 17:04:55 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: relay1.mentorg.com Date: Thu, 1 Aug 2019 17:04:46 +0000 From: Joseph Myers To: GT CC: "libc-alpha\\@sourceware.org" Subject: Re: PPC64 libmvec sincos/sincosf ABI In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" On Thu, 1 Aug 2019, GT wrote: > I believe PPC64 needs to implement functions analogous to x86_64 > _ZGVbN4vvv_sincosf, _ZGVbN4vl4l4_sincosf, _ZGVbN2vvv_sincos, > _ZGVbN2vl8l8_sincos. The x86_64 functions ended up with an ABI (vectors of pointers being passed) that may well be a mistake and certainly wasn't what was intended when they were first added. I think it's necessary to answer questions along the following lines. 1. What is the best vector ABI (best performance) for sincos on PPC64? That may be a function of the particular vector instructions available on PPC64; the best choice of ABI on PPC64 need not correspond to the best choice on x86_64. 2. What is the correct pragma / attribute to use in header declarations to indicate that sincos has that ABI, and the corresponding name mangling? This needs resolving in conjunction with people working on the ABI document and compilers to ensure there is common agreement about how to tell the compiler that certain vector function variants are available. The pragma / attribute may well not be the same as used for other libmvec functions. Only once you have answers to those questions can you know what function names should be implemented, what the interface to them should be, and, thus, the corresponding C interface for directly testing them from C. As noted in previous discussions, the fact that for x86_64 the vector sincos functions initially had an ABI inconsistent with the one implied by the header declarations used, and the difference between those functions and other libmvec functions, makes it particularly important to do an end-to-end test, using the relevant header declarations and a compiler that supports generating vector function calls given those declarations, to make sure that the x86_64 mistake isn't repeated and that the PPC64 sincos functions really do have the intended ABI corresponding to the header declarations. -- Joseph S. Myers joseph@codesourcery.com