From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108283 invoked by alias); 18 Sep 2017 19:01:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 108262 invoked by uid 89); 18 Sep 2017 19:01:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=mixture 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; Mon, 18 Sep 2017 19:01:37 +0000 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v8IIxhj2030244 for ; Mon, 18 Sep 2017 15:01:35 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2d2ea06apu-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 18 Sep 2017 15:01:35 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 18 Sep 2017 20:01:34 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 18 Sep 2017 20:01:32 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v8IJ1WLW17891398; Mon, 18 Sep 2017 19:01:32 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 096EE11C04A; Mon, 18 Sep 2017 19:57:37 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EA26411C050; Mon, 18 Sep 2017 19:57:36 +0100 (BST) Received: from oc3748833570.ibm.com (unknown [9.164.174.47]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 18 Sep 2017 19:57:36 +0100 (BST) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id E5D12D835CB; Mon, 18 Sep 2017 21:01:31 +0200 (CEST) Subject: Re: [RFC][02/19] Target FP: Simplify floatformat_from_type To: simon.marchi@polymtl.ca (Simon Marchi) Date: Mon, 18 Sep 2017 19:01:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: from "Simon Marchi" at Sep 18, 2017 06:20:53 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17091819-0040-0000-0000-000003FADBB6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17091819-0041-0000-0000-0000209C096E Message-Id: <20170918190131.E5D12D835CB@oc3748833570.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-09-18_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=1 spamscore=1 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1709180268 X-SW-Source: 2017-09/txt/msg00454.txt.bz2 Simon Marchi wrote: > Since this is where we do the division by > TARGET_CHAR_BIT, and therefore assume (implicitly) that bit is a > multiple of TARGET_CHAR_BIT, I think this is where the assert should be > added. To avoid adding them everywhere, we could make > arch_type/init_type take a size in bits, and do the division and assert > there. I agree, this seems the best solution. And it makes more sense for all the type-creation interfaces to use size in bits instead of the mixture we have now. I'll come up with a patch to do that. Bye, Ulrich -- Dr. Ulrich Weigand GNU/Linux compilers and toolchain Ulrich.Weigand@de.ibm.com