From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58406 invoked by alias); 5 Aug 2016 00:09:46 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 58283 invoked by uid 89); 5 Aug 2016 00:09:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=King, adventure, Hx-languages-length:1715, 2506r 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 (AES256-SHA encrypted) ESMTPS; Fri, 05 Aug 2016 00:09:43 +0000 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u7508wrY110114 for ; Thu, 4 Aug 2016 20:09:42 -0400 Received: from e32.co.us.ibm.com (e32.co.us.ibm.com [32.97.110.150]) by mx0a-001b2d01.pphosted.com with ESMTP id 24kkahwk18-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 04 Aug 2016 20:09:41 -0400 Received: from localhost by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 4 Aug 2016 18:09:41 -0600 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 4 Aug 2016 18:09:38 -0600 X-IBM-Helo: d03dlp03.boulder.ibm.com X-IBM-MailFrom: meissner@ibm-tiger.the-meissners.org Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 1083919D8040; Thu, 4 Aug 2016 18:09:10 -0600 (MDT) Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u7509ZX615008016; Thu, 4 Aug 2016 17:09:35 -0700 Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C42E1136046; Thu, 4 Aug 2016 18:09:35 -0600 (MDT) Received: from ibm-tiger.the-meissners.org (unknown [9.32.77.111]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTP id A653713603A; Thu, 4 Aug 2016 18:09:35 -0600 (MDT) Received: by ibm-tiger.the-meissners.org (Postfix, from userid 500) id DCE9045CDD; Thu, 4 Aug 2016 20:09:34 -0400 (EDT) Date: Fri, 05 Aug 2016 00:09:00 -0000 From: Michael Meissner To: Joseph Myers Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org, jason@redhat.com, richard.earnshaw@arm.com, nickc@redhat.com, ramana.radhakrishnan@arm.com, marcus.shawcroft@arm.com, dje.gcc@gmail.com, segher@kernel.crashing.org, meissner@linux.vnet.ibm.com, murphyp@linux.vnet.ibm.com, bje@gnu.org Subject: Re: Implement C _FloatN, _FloatNx types Mail-Followup-To: Michael Meissner , Joseph Myers , gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org, jason@redhat.com, richard.earnshaw@arm.com, nickc@redhat.com, ramana.radhakrishnan@arm.com, marcus.shawcroft@arm.com, dje.gcc@gmail.com, segher@kernel.crashing.org, murphyp@linux.vnet.ibm.com, bje@gnu.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16080500-0004-0000-0000-00001011ED7C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005549; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000178; SDB=6.00740106; UDB=6.00348055; IPR=6.00512699; BA=6.00004644; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012162; XFM=3.00000011; UTC=2016-08-05 00:09:40 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16080500-0005-0000-0000-000077B6D933 Message-Id: <20160805000934.GA21406@ibm-tiger.the-meissners.org> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-04_15:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1608050000 X-SW-Source: 2016-08/txt/msg00016.txt.bz2 In gcc/c-family/c-prettyprint.c in the function that you modified pp_c_floating_constant: It brings up a general complaint that I had when I started the whole PowerPC __float128 adventure is that we have multiple places in the compiler it goes through a list of floating point types, and only for the blessed types does it do something. If a port happens to have a non-standard type, there really should be target hooks for doing each of the actions. But rather than having lots of different hooks, it may be better to have a hash lookup given a type node (and/or mode) that registers all of the handling in a central place, rather than continually having: if (TREE_TYPE (r) == float_type_node) pp_character (pp, 'f'); else if (TREE_TYPE (r) == long_double_type_node) pp_character (pp, 'l'); else if (TREE_TYPE (r) == dfloat128_type_node) pp_string (pp, "dl"); else if (TREE_TYPE (r) == dfloat64_type_node) pp_string (pp, "dd"); else if (TREE_TYPE (r) == dfloat32_type_node) pp_string (pp, "df"); Obviously, there are lots of places in the compiler that do this. But it has been my experience, that usually when you have an enumeration like this, either you miss one in the cut+paste of the same type of code, or when you add a new type, you have to go through all of the places and update things (and usually miss one, or get held up trying to get N maintainers to agree with the patches). And it may be that like I did, you might decide not to fix the general solution in order to get what you want in the compiler. -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797