From patchwork Fri Apr 27 17:11:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tulio Magno Quites Machado Filho X-Patchwork-Id: 905876 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=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-91888-incoming=patchwork.ozlabs.org@sourceware.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; secure) header.d=sourceware.org header.i=@sourceware.org header.b="VUvwB1JD"; 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 40XgVf1h2Jz9rxs for ; Sat, 28 Apr 2018 03:12:58 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=iK+cb0JcPo2YjtXFvJDaDmCLlgkouKyzg9DeE/2w+weiqchk4Inoq dTJUR0YxZlPO2jrV1c9gdXf/MJx2MzDA0PoPtqEo8IFp65breuiNU1dUyD2IVz79 ukSdGNQhutSX5uQa3ITRXVq3NdWfREh5s1DVOYSNt8o2NcJPA1UeoM= 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:from:to:cc:subject:date:message-id; s=default; bh=uKsoutzuLa/6PCygmv7xJoOH/WA=; b=VUvwB1JDjH3STTL4Cgaovf+8fMbI +vcCj7Li1pUcst3hdIkY7zn5jlv3bUlz5j83nYcGeQeIJqBcxgaoOCOubcG/Oln1 CdW5R93hhvnk5RTpU43Liy32jS+pIivN132KitA7P8uxC35zNWCcFffurfISJCO2 K/CVKn3rLE5DmKw= Received: (qmail 40855 invoked by alias); 27 Apr 2018 17:12:52 -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 Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 40846 invoked by uid 89); 27 Apr 2018 17:12:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx0a-001b2d01.pphosted.com From: Tulio Magno Quites Machado Filho To: libc-alpha@sourceware.org Cc: meissner@linux.ibm.com Subject: [PATCH] powerpc: Fix the compiler mode used with C++ when -mabi=ieeelongdouble Date: Fri, 27 Apr 2018 14:11:50 -0300 X-TM-AS-GCONF: 00 x-cbid: 18042717-0024-0000-0000-0000184DD049 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00008933; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000257; SDB=6.01024100; UDB=6.00522859; IPR=6.00803330; MB=3.00020809; MTD=3.00000008; XFM=3.00000015; UTC=2018-04-27 17:12:46 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18042717-0025-0000-0000-00004FB657DA Message-Id: <20180427171150.28010-1-tuliom@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-04-27_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804270164 When compiling C++ code with -mabi=ieeelongdouble, KCtype is unavailable and TCtype should be used instead. 2018-04-27 Tulio Magno Quites Machado Filho * sysdeps/powerpc/bits/floatn.h [__HAVE_FLOAT128 && (!__GNUC_PREREQ (7, 0) || defined __cplusplus) && __LDBL_MANT_DIG__ == 113] (__cfloat128): Use compiler mode __TC__. Signed-off-by: Tulio Magno Quites Machado Filho --- sysdeps/powerpc/bits/floatn.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sysdeps/powerpc/bits/floatn.h b/sysdeps/powerpc/bits/floatn.h index c3834096e3..9ba1b81380 100644 --- a/sysdeps/powerpc/bits/floatn.h +++ b/sysdeps/powerpc/bits/floatn.h @@ -66,10 +66,14 @@ /* Defined to a complex binary128 type if __HAVE_FLOAT128 is 1. */ # if __HAVE_FLOAT128 +/* Add a typedef for older GCC and C++ compilers which don't natively support + _Complex _Float128.. */ # if !__GNUC_PREREQ (7, 0) || defined __cplusplus -/* Add a typedef for older GCC compilers which don't natively support - _Complex _Float128. */ +# if __LDBL_MANT_DIG__ == 113 +typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__TC__))); +# else typedef _Complex float __cfloat128 __attribute__ ((__mode__ (__KC__))); +# endif # define __CFLOAT128 __cfloat128 # else # define __CFLOAT128 _Complex _Float128