From patchwork Mon Jun 3 03:00:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kewen.Lin" X-Patchwork-Id: 1942589 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=HMFR1qhJ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vsz6t1GBRz20PW for ; Mon, 3 Jun 2024 13:02:46 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 56C863948A68 for ; Mon, 3 Jun 2024 03:02:44 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id E9A85394849A for ; Mon, 3 Jun 2024 03:01:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E9A85394849A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E9A85394849A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717383722; cv=none; b=LqKl2/pPQxEmCViRg5EzqjZSPq312Rx9JXifos46GsPOf+jkDfZD/w7o6QyQOAJf8jGpeO38ZGrgHhQCCUJZxWG/r9wLSkW0NquIYLMkXlUDRX+OLdi7eoF7mpjwjgx04tzJ/VdRHdheSY+yw4jMK45ZNffKlkYz7PAV7jGbIwc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717383722; c=relaxed/simple; bh=E3ZZt7ow5jEXnVH+SpEAj+ww5KMVQ6mYmPT6NbekIQw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Ckkx8hVk/HrJQrSGkVPN/ij5V9qVuHTOaJ4HjNjaCHz1J2W3onhk3k+7gbiAp1JZ8RViG/Aw8iAmV6EO+3g2vYVzYMLflbvn30qY9s4ehihUch0AOGeaOLXqWxJCGN6zUfuM2sH62Y3KiWpbCdfGP30YUYcZXLP/Wne1o0DjZLI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0353723.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 4531MCoq024279; Mon, 3 Jun 2024 03:01:58 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc : content-transfer-encoding : date : from : in-reply-to : message-id : mime-version : references : subject : to; s=pp1; bh=mxPbzJoxripyXAWUeyWkFNsy0l/UWjq1Vx7N6svWHzc=; b=HMFR1qhJM3XRofLocOEAXkwSRxokslDfb1RB3JQ6qpe+SUvCDm09sz1tXV5KEAFtA2AE mT17wb23DOL9yXwn1CsOy7UOys3KBf1Q/T6ibzMRgp64+uKmc3m/JaW8fsZHrXgxeYMS bBrDOD86Qd4tDhjuQKKLQdD1B/mtEz45KNqPJqvNZGpudSGAbx/Uu+jb5PWGL19rBJ59 xBFGB6g+cqUlT73vxLrtJc9JmBHG+HBr/VVz0JjOyTbC6nn6AMGfx0HrrSoqKLBX0FTg xRSFVdER4ljjSkeQnunOOwT4/EPBe1M9xuDWNsbP8SRbGrwf+VxjQeOFa69tkxBnhA3t rg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yh43w05cm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 03:01:57 +0000 Received: from m0353723.ppops.net (m0353723.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 45331v7Q032634; Mon, 3 Jun 2024 03:01:57 GMT Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3yh43w05ck-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 03:01:57 +0000 Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1]) by ppma12.dal12v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 4530p2Qn000800; Mon, 3 Jun 2024 03:01:56 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 3ygdytnphe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Jun 2024 03:01:56 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 45331rDH51249478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Jun 2024 03:01:55 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 154D82004B; Mon, 3 Jun 2024 03:01:53 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3BDA920043; Mon, 3 Jun 2024 03:01:52 +0000 (GMT) Received: from trout.aus.stglabs.ibm.com (unknown [9.40.194.100]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 3 Jun 2024 03:01:52 +0000 (GMT) From: Kewen Lin To: gcc-patches@gcc.gnu.org Cc: linkw@linux.ibm.com, iain@sandoe.co.uk, mikestump@comcast.net Subject: [PATCH 07/52] darwin: Replace use of LONG_DOUBLE_TYPE_SIZE Date: Sun, 2 Jun 2024 22:00:57 -0500 Message-ID: <909a932023fd8e3df3bb6a92071e098ce4fc108d.1717134752.git.linkw@linux.ibm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: X-TM-AS-GCONF: 00 X-Proofpoint-GUID: p4kP2YYBMHNGKnezZIr7KzQutE_kyjkv X-Proofpoint-ORIG-GUID: hujg0v_ipFdbT_hCdobBP262yn27XWSu X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-06-02_15,2024-05-30_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 priorityscore=1501 mlxlogscore=557 impostorscore=0 lowpriorityscore=0 spamscore=0 clxscore=1011 adultscore=0 malwarescore=0 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2406030025 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Joseph pointed out "floating types should have their mode, not a poorly defined precision value" in the discussion[1], as he and Richi suggested, the existing macros {FLOAT,{,LONG_}DOUBLE}_TYPE_SIZE will be replaced with a hook mode_for_floating_type. To be prepared for that, this patch is to replace use of LONG_DOUBLE_TYPE_SIZE in darwin.c with TYPE_PRECISION of long_double_type_node. [1] https://gcc.gnu.org/pipermail/gcc-patches/2024-May/651209.html gcc/ChangeLog: * config/darwin.cc (darwin_patch_builtins): Use TYPE_PRECISION of long_double_type_node to replace LONG_DOUBLE_TYPE_SIZE. --- gcc/config/darwin.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/darwin.cc b/gcc/config/darwin.cc index 63b8c509405..9129378be37 100644 --- a/gcc/config/darwin.cc +++ b/gcc/config/darwin.cc @@ -3620,7 +3620,7 @@ darwin_patch_builtin (enum built_in_function fncode) void darwin_patch_builtins (void) { - if (LONG_DOUBLE_TYPE_SIZE != 128) + if (TYPE_PRECISION (long_double_type_node) != 128) return; #define PATCH_BUILTIN(fncode) darwin_patch_builtin (fncode);