From patchwork Tue Mar 27 21:10:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Schmidt X-Patchwork-Id: 891807 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-475535-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="MDOzmUGQ"; 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 409kDl14p6z9s19 for ; Wed, 28 Mar 2018 08:10:14 +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:to:cc :from:subject:date:mime-version:content-type :content-transfer-encoding:message-id; q=dns; s=default; b=obVGz 6NptyAhHDWF/dVPJZOk4V5sHXVv7pdiXGt/+SAQh9Tt/nt+pqlpvj/iJjJuk9Sg3 +d6u0HjT4N9qVtqsJDqf9aP5CyY1SoQkxoUxk+9Iqq7y5imcNhwcqGEQluf31CHL cs+mOu7mFLEyZK8KQGjG1LqegP1PVxUCUzHXEY= 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:to:cc :from:subject:date:mime-version:content-type :content-transfer-encoding:message-id; s=default; bh=q7wibZ5qm4g TNMxFxZ1hckPJhnQ=; b=MDOzmUGQlveR1d+mKpz138eicS69I8ejh2wiz61/dg+ rRpZzF5J3GoaKQ0ItsYP83gOXpdcgoAVIjpm3WzxYVqK66wSzD2KHGd3jQB0vfVS L4sUnYxhP3fCU/rZbo4tMO1LsFiojKKDK4XEfa4tDA4guWzVuGLZ4+yma56IXqvk = Received: (qmail 117560 invoked by alias); 27 Mar 2018 21:10:08 -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 117546 invoked by uid 89); 27 Mar 2018 21:10:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Mar 2018 21:10:05 +0000 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2RL9UdU024458 for ; Tue, 27 Mar 2018 17:10:04 -0400 Received: from e15.ny.us.ibm.com (e15.ny.us.ibm.com [129.33.205.205]) by mx0b-001b2d01.pphosted.com with ESMTP id 2gytn6ynuv-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Tue, 27 Mar 2018 17:10:03 -0400 Received: from localhost by e15.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 Mar 2018 17:10:03 -0400 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e15.ny.us.ibm.com (146.89.104.202) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 27 Mar 2018 17:10:01 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2RLA0Z952297982; Tue, 27 Mar 2018 21:10:00 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 18FF42803D; Tue, 27 Mar 2018 17:09:24 -0400 (EDT) Received: from bigmac.rchland.ibm.com (unknown [9.10.86.142]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP id DEAB12803A; Tue, 27 Mar 2018 17:09:23 -0400 (EDT) To: GCC Patches Cc: Segher Boessenkool , David Edelsohn From: Bill Schmidt Subject: [PATCH, rs6000] xmmintrin.h needs to use __vector __bool everywhere Date: Tue, 27 Mar 2018 16:10:00 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18032721-0036-0000-0000-000002D6F6A7 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008754; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000255; SDB=6.01009312; UDB=6.00514149; IPR=6.00788594; MB=3.00020274; MTD=3.00000008; XFM=3.00000015; UTC=2018-03-27 21:10:02 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18032721-0037-0000-0000-000043C81BD3 Message-Id: <1f4fbc22-a8bf-7eb3-b02c-2d4ccbc6c8f4@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2018-03-27_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803270213 X-IsSubscribed: yes Hi, The xmmintrin.h compatibility header embeds altivec.h to use the Power vector intrinsics. However, it needs to be careful not to use the "bool" keyword with vectors so the headers don't cause potential problems in C++ and C11 code when using strict-ANSI. I noticed a few cases where this was happening. They haven't caused trouble yet, but it's just a matter of time. This patch cleans those up. Bootstrapped and tested on powerpc64le-unknown-linux-gnu. Is this okay for trunk? Thanks, Bill 2018-03-27 Bill Schmidt * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool instead of __vector bool. (_mm_max_pu8): Likewise. (_mm_min_pi16): Likewise. Index: gcc/config/rs6000/xmmintrin.h =================================================================== --- gcc/config/rs6000/xmmintrin.h (revision 258888) +++ gcc/config/rs6000/xmmintrin.h (working copy) @@ -1398,11 +1398,11 @@ _mm_max_pi16 (__m64 __A, __m64 __B) { #if _ARCH_PWR8 __vector signed short a, b, r; - __vector bool short c; + __vector __bool short c; a = (__vector signed short)vec_splats (__A); b = (__vector signed short)vec_splats (__B); - c = (__vector bool short)vec_cmpgt (a, b); + c = (__vector __bool short)vec_cmpgt (a, b); r = vec_sel (b, a, c); return (__builtin_unpack_vector_int128 ((__vector __int128_t)r, 0)); #else @@ -1436,11 +1436,11 @@ _mm_max_pu8 (__m64 __A, __m64 __B) { #if _ARCH_PWR8 __vector unsigned char a, b, r; - __vector bool char c; + __vector __bool char c; a = (__vector unsigned char)vec_splats (__A); b = (__vector unsigned char)vec_splats (__B); - c = (__vector bool char)vec_cmpgt (a, b); + c = (__vector __bool char)vec_cmpgt (a, b); r = vec_sel (b, a, c); return (__builtin_unpack_vector_int128 ((__vector __int128_t)r, 0)); #else @@ -1472,11 +1472,11 @@ _mm_min_pi16 (__m64 __A, __m64 __B) { #if _ARCH_PWR8 __vector signed short a, b, r; - __vector bool short c; + __vector __bool short c; a = (__vector signed short)vec_splats (__A); b = (__vector signed short)vec_splats (__B); - c = (__vector bool short)vec_cmplt (a, b); + c = (__vector __bool short)vec_cmplt (a, b); r = vec_sel (b, a, c); return (__builtin_unpack_vector_int128 ((__vector __int128_t)r, 0)); #else @@ -1510,11 +1510,11 @@ _mm_min_pu8 (__m64 __A, __m64 __B) { #if _ARCH_PWR8 __vector unsigned char a, b, r; - __vector bool char c; + __vector __bool char c; a = (__vector unsigned char)vec_splats (__A); b = (__vector unsigned char)vec_splats (__B); - c = (__vector bool char)vec_cmplt (a, b); + c = (__vector __bool char)vec_cmplt (a, b); r = vec_sel (b, a, c); return (__builtin_unpack_vector_int128 ((__vector __int128_t)r, 0)); #else