From patchwork Tue Oct 15 12:50:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Schmidt X-Patchwork-Id: 1177000 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-511018-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="p8TRRrOQ"; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 46swJN4dhjz9sPJ for ; Tue, 15 Oct 2019 23:50:28 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :reply-to:to:from:subject:message-id:date:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=ngG wahJ2YLOO8MGWv31aCdyvhZ3JO3bkMavjtktN/i5ehQ2GFH7mE3QHFHQnywJZeR+ G+cktrvRcQ/S8iW/Iw53TnsL0AYiQOoEN7YBliki0j8ruwCzKI9lPrFnu/b97+L0 Aubym8hBTMlx2NY8vi064/auo2llxxaFTMVI++sQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :reply-to:to:from:subject:message-id:date:mime-version :content-type:content-transfer-encoding; s=default; bh=TQuMzo81w JK0/9y9FhL1BIHIm44=; b=p8TRRrOQuomtyxnzumv2hFZ9XQ40umUzF9H4UOwFM 9oM1Pe6CVU1d36LC7U5cE/NQyK02M47zZB2d0/vCqGYccjM/+u3xC/Kz1MVGx6fn 7cf7OPT/TYgqa2d+Lxq+IzFTq/n0bxl14E179dakWnJkhRpG97Xta1vfpiBoTHWH UY= Received: (qmail 111860 invoked by alias); 15 Oct 2019 12:50:20 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 111851 invoked by uid 89); 15 Oct 2019 12:50:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, HTML_MESSAGE, KAM_NUMSUBJECT, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=H*c:alternative, H*UA:Macintosh, H*u:Macintosh X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 15 Oct 2019 12:50:14 +0000 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x9FCmESq023994; Tue, 15 Oct 2019 08:50:13 -0400 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 2vncx0ujys-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Oct 2019 08:50:13 -0400 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x9FCnp5n003733; Tue, 15 Oct 2019 12:50:12 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma01dal.us.ibm.com with ESMTP id 2vk6f7a6j0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Oct 2019 12:50:12 +0000 Received: from b03ledav001.gho.boulder.ibm.com (b03ledav001.gho.boulder.ibm.com [9.17.130.232]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x9FCoACK39715208 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Oct 2019 12:50:10 GMT Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5AB626E050; Tue, 15 Oct 2019 12:50:10 +0000 (GMT) Received: from b03ledav001.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 345816E053; Tue, 15 Oct 2019 12:50:10 +0000 (GMT) Received: from Bills-MacBook-Pro.local (unknown [9.163.22.109]) by b03ledav001.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 15 Oct 2019 12:50:10 +0000 (GMT) Reply-To: wschmidt@linux.ibm.com To: GCC Patches , Segher Boessenkool From: Bill Schmidt Subject: [PATCH] rs6000: Fix PR92093 Message-ID: Date: Tue, 15 Oct 2019 07:50:09 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 The test case added for PR91275 fails on big-endian because __builtin_crypto_vpmsumd is not a bi-endian intrinsic; source code must account for endian differences when calling this intrinsic. Fixed this and a type issue that only shows up on 32-bit. I thought I had previously tested this on P8 BE, but clearly not. Tested on powerpc64-unknown-linux-gnu, committed as obvious. Will backport soon. Thanks, Bill 2019-10-15 Bill Schmidt PR target/92093 * gcc.target/powerpc/pr91275.c: Fix type and endian issues. Index: gcc/testsuite/gcc.target/powerpc/pr91275.c =================================================================== --- gcc/testsuite/gcc.target/powerpc/pr91275.c (revision 276968) +++ gcc/testsuite/gcc.target/powerpc/pr91275.c (working copy) @@ -10,12 +10,17 @@ int main() { const unsigned long long r0l = 0x8e7dfceac070e3a0; vector unsigned long long r0 = (vector unsigned long long) {r0l, 0}, v; const vector unsigned long long pd - = (vector unsigned long) {0xc2LLU << 56, 0}; + = (vector unsigned long long) {0xc2LLU << 56, 0}; v = __builtin_crypto_vpmsumd ((vector unsigned long long) {r0[0], 0}, pd); +#if __LITTLE_ENDIAN__ if (v[0] != 0x4000000000000000 || v[1] != 0x65bd7ab605a4a8ff) __builtin_abort (); +#else + if (v[1] != 0x4000000000000000 || v[0] != 0x65bd7ab605a4a8ff) + __builtin_abort (); +#endif return 0; }