From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2065.outbound.protection.outlook.com [40.107.22.65]) by sourceware.org (Postfix) with ESMTPS id 406C83858C52 for ; Mon, 4 Apr 2022 14:53:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 406C83858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jXEPw220UbAKdPbd6Ff45aWtqqMetM+qu3dS8b/fboU=; b=9hjvxCu+CgLm6pd2WKNJW0AwYXtfCZaO5c5O7TM8TbASZBrxP9NAumSQ9HzmvEW+2OSoexeAXXuXIb1ubnt81bqHZ1MhnipEtCQY0eRAsdRHf+HGzbO2kSQhwxLJfoRVthZYw5z07EEjy7tudHkHD4h88DKyzpVso1zNCJ4ghkM= Received: from DB6P193CA0024.EURP193.PROD.OUTLOOK.COM (2603:10a6:6:29::34) by AM6PR08MB4501.eurprd08.prod.outlook.com (2603:10a6:20b:b5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.31; Mon, 4 Apr 2022 14:53:13 +0000 Received: from DB5EUR03FT056.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:29:cafe::79) by DB6P193CA0024.outlook.office365.com (2603:10a6:6:29::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.31 via Frontend Transport; Mon, 4 Apr 2022 14:53:13 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT056.mail.protection.outlook.com (10.152.21.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.19 via Frontend Transport; Mon, 4 Apr 2022 14:53:12 +0000 Received: ("Tessian outbound 62985e3c34b6:v118"); Mon, 04 Apr 2022 14:53:12 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 96858d9f07c28b7f X-CR-MTA-TID: 64aa7808 Received: from ad6fc3045620.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8A21E394-2EB3-43E1-BA97-4E73392C7D7C.1; Mon, 04 Apr 2022 14:53:05 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ad6fc3045620.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 04 Apr 2022 14:53:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=huOPB57BjvQfZRRgM07j3/S8FXDLtZVuvsI59iao4Nlold7ze7QzXkByjbo0TJefX1by6IRfTvLw590YHnyrzGOek737r+HLWUX1jWz6xHWArM8yd5o18omA895Os/yuTgWMyRzHu0NatyQzNH1F7qVe++Buij0XfPFL2LJI2ixVnPB4mS81922X2YSGcrY6iTi8F+BA8OSIRVdIILg6YaK0wQraWtg0WhmjAAu6A4T94EHat6TBEpkY6f16APFMFcHr8S0oDudk06rwvAeXwlN/J6GE5z2Xsv21+bkSAwx4Cb8y49D4KQRnKWo0dr4fI82MN3wSTMux3VeZW5BdZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=jXEPw220UbAKdPbd6Ff45aWtqqMetM+qu3dS8b/fboU=; b=EtGLN+IqIYBFXTgq5OzIiCBnN8wStopby+hYkRJpR0UVJrRnDvM1fp3FO50GO6neU6hN1vwaahII4SWq95LCkGZB0re7NNw/azqLlcEuoUeXuYulnYZaSo+npDu0QtElyPY481AvvqEwHX5WwzdTHIfJM1pX2h6qqgvPvTA9Ox9YESWBHBGt0xh2uknSjouPOxQXbNGYjXLHHweU8/sC4m+UNrlQhLR9D6Ox2wr8eALJu4Hzlw/vZOUHW7AXh3QGFMWXoyAyYwWuxixkrIzDE/FKjLcG/dOg0KbSTXjni7+UjTssLz6sD5pGVa/FtJu8JZ5N38HeB2Uloc6iWfzcaw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jXEPw220UbAKdPbd6Ff45aWtqqMetM+qu3dS8b/fboU=; b=9hjvxCu+CgLm6pd2WKNJW0AwYXtfCZaO5c5O7TM8TbASZBrxP9NAumSQ9HzmvEW+2OSoexeAXXuXIb1ubnt81bqHZ1MhnipEtCQY0eRAsdRHf+HGzbO2kSQhwxLJfoRVthZYw5z07EEjy7tudHkHD4h88DKyzpVso1zNCJ4ghkM= Received: from AM6PR0502CA0067.eurprd05.prod.outlook.com (2603:10a6:20b:56::44) by PAXPR08MB7187.eurprd08.prod.outlook.com (2603:10a6:102:209::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.31; Mon, 4 Apr 2022 14:53:02 +0000 Received: from VE1EUR03FT017.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:56:cafe::15) by AM6PR0502CA0067.outlook.office365.com (2603:10a6:20b:56::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.31 via Frontend Transport; Mon, 4 Apr 2022 14:53:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT017.mail.protection.outlook.com (10.152.18.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5123.19 via Frontend Transport; Mon, 4 Apr 2022 14:53:02 +0000 Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.27; Mon, 4 Apr 2022 14:53:06 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.27; Mon, 4 Apr 2022 14:53:00 +0000 Received: from e124257 (10.34.101.64) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 4 Apr 2022 14:53:06 +0000 From: Andrea Corallo To: Torbjorn SVENSSON CC: "newlib@sourceware.org" , "nd@arm.com" Subject: Re: [PATCH V2] Aarch32/64: Support __FLT_EVAL_METHOD__ values other than 0, 1, 2 References: Date: Mon, 4 Apr 2022 16:53:00 +0200 In-Reply-To: (Torbjorn SVENSSON's message of "Mon, 4 Apr 2022 09:32:41 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 60409e9a-04a2-428f-e4d9-08da164ad7c9 X-MS-TrafficTypeDiagnostic: PAXPR08MB7187:EE_|DB5EUR03FT056:EE_|AM6PR08MB4501:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 1MyIvH6ksjZkDPtc/wpCndlQm00PnI0y47V962YO6JV99GS/t3ekS9omXPofp6UMrxT6pTxFaJDemmx3Kaub6crKpI4NdbmghiyC0Tm2wdjeOG9kL296MwvmqHsMjWAsNDhXus9HCiPnzaJodyNOu4kM0pMkg7esNgMSUaw4ds2ZOJ4OHJ/BEVquW3iVf1ANFet6amAK4EEKi1F7IOKXm1Xsqut3Hmwa6krlV6Yb3o8MGfmepE+pHVUJ9YVrq9u9l87CEUbKy6osq9HA4JNmq/cNILO8UbVrsoJtogztbNFDfzXUwempiIyQJXHGve6a1AUZdSAq5UK7DxmYUcEEc6FiVifx3AcIw9nGbWJv6XcR2oLUceYn5Z/mTdtaBkggw4CnBauEf22zcBYy72YGvXWSURyNd4TT6tnD9FySx9qpYMrO9DjY43ehgZQvId0ACl63+giuDrfapI/Q5U0Rqrv9JOHXCVHZ222mpaoGwQAJTVttwJvJGfOG8oGGaCm27TrDJglD6dWeEHZ45Rzma2EqnxoIETllklw4G6La67P4iLHnU9VtLrjH8iob/pFAV4IJJBdQO5Tv3nRvYhpTnkDFjqUbM+79WpS+pIPVArfCPsZdJK/ETC761LFMHEZCuca1oZWQotUa6AAyMPd1KhLaek5MzXPqiIAQYdXg77gcVjAC6bwGRXE0njMaE1BqAu40+d0VuwN11yl42m7bZQ== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(46966006)(40470700004)(36840700001)(81166007)(6666004)(356005)(6916009)(54906003)(235185007)(8936002)(70586007)(508600001)(33964004)(5660300002)(316002)(86362001)(4326008)(70206006)(82310400004)(8676002)(40460700003)(2906002)(2616005)(186003)(36860700001)(36756003)(26005)(426003)(336012)(47076005)(44832011)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB7187 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT056.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 1d81ed7e-f2b6-4b27-4ba1-08da164ad175 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fM1ceAEVKK9Gb30L0J3wBHeMuBzSUVPpzX6yGdWYDwICOCir38nOVrMxuBuHRlW05dssNOAbnWwW7AEcPPVSxiVN93z14dfKZmTgIuFDOLr3mJFjobDQjPxYCs7w1wE0jfrf/C0sJ6U6dr+rA9Y3EcymnLaQH3CszfJSs0flgl5WNMkFwNJwVtyMjdtecUt0jSIRrJp21QMh/RP8RY1tH7xIuWgNSM09at5zEh/ygpV24zKzALBjJhEfIwTcyL+J3UaYI8CxZRf4l9U1UiZHE8wTEfAgH00T+07Q1cmcmIuXTy7Hv4rXhrn7fVWYEi2MpxuMUqW1frUepjpBe+MQZ7vkNL5gguiwKmm2TjF23/rstbOS1x9pSHhKlmt/d2/TxdV1P6GxHwVOMqetb1ERjV+aQoDaLWwbIZfRQ/nl+Z/YCgL0N42GZac5kLIpA8Rbp8AnUQXZkTN8cAklaXRMYqrgDC9hpVa/ANSDaCeUZhWC5KeLVbFLt5kh9CkirjMLqxl0Qtrw2Fqs9lzZk/z0k4HSNd/F+iMcrc7AypI3zJ6IkkzDDQq0jy9HCjnbLbGqfFeQqbyq4/lC38TvMhxH/n7mg0SF3dZdu8EDZ+BTL4pk92ZYFOjUpop50bOHnKrRy5MHS7zJdGoOLturhzqldFR4XPyDqklB7Mx9KeryZ696hmY8iutrCAzdnWoxCIfp X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(46966006)(40470700004)(5660300002)(40460700003)(6666004)(44832011)(235185007)(8936002)(82310400004)(54906003)(426003)(2906002)(47076005)(33964004)(508600001)(36860700001)(86362001)(336012)(316002)(2616005)(81166007)(186003)(70586007)(8676002)(4326008)(6862004)(36756003)(70206006)(26005); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Apr 2022 14:53:12.9990 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 60409e9a-04a2-428f-e4d9-08da164ad7c9 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR03FT056.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4501 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_NUMSUBJECT, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2022 14:53:20 -0000 --=-=-= Content-Type: text/plain Torbjorn SVENSSON writes: > Hello, > > It would have been easier to review the patch if it was inline, but > this will have to do anyway. Hi Torbjorn, sorry most mail readers easily show inline attacchaments of type "text/plain" allowing for inline reply, at the same time this way they can still retain the notion of attached file. This is how I rutinary sent my patches to other GNU projects (including GCC) so far. Has newlib some specific rule around this? > I think there is a typo in math.h. Aren't you supposed to do "#ifndef" and not "#ifdef"? I guess we are talking about this hunk? #ifdef __epiphany__ diff --git a/newlib/libc/include/math.h b/newlib/libc/include/math.h index ba1a8a17e..da056b5b6 100644 --- a/newlib/libc/include/math.h +++ b/newlib/libc/include/math.h @@ -158,6 +158,15 @@ extern int isnan (double); #else /* Implementation-defined. Assume float_t and double_t have been * defined previously for this configuration (e.g. config.h). */ + + /* If __DOUBLE_TYPE is defined (__FLOAT_TYPE is then supposed to be + defined as well) float_t and double_t definition is suggested by + an arch specific header. */ + #ifdef __DOUBLE_TYPE + typedef __DOUBLE_TYPE double_t; + typedef __FLOAT_TYPE float_t; + #endif + /* Assume config.h has provided these types. */ #endif #else /* Assume basic definitions. */ I believe the #ifdef is correct. As the comment suggests if __DOUBLE_TYPE is defined we'll use it to define double_t otherwise we assume is config.h has provided the type definition. I'm reattaching the latest version of this patch with a typo fixed. Thanks! Andrea --=-=-= Content-Type: text/plain; charset="utf-8" Content-Disposition: attachment; filename="0001-PATH-Aarch32-64-Support-__FLT_EVAL_METHOD__-values-o.patch" >From d4c7eab60765bc51b97915744a5fec17b9499400 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Wed, 30 Mar 2022 15:40:59 +0200 Subject: [PATCH] [PATH] Aarch32/64: Support __FLT_EVAL_METHOD__ values other than 0, 1, 2 2022-03-30 Andrea Corallo * libc/include/machine/ieeefp.h (__FLOAT_TYPE, __DOUBLE_TYPE): New macros. * libc/include/math.h: Uses __DOUBLE_TYPE __FLOAT_TYPE to define double_t float_t if possible. --- newlib/libc/include/machine/ieeefp.h | 4 ++++ newlib/libc/include/math.h | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/newlib/libc/include/machine/ieeefp.h b/newlib/libc/include/machine/ieeefp.h index 4dc13828c..c65c67769 100644 --- a/newlib/libc/include/machine/ieeefp.h +++ b/newlib/libc/include/machine/ieeefp.h @@ -90,6 +90,8 @@ #ifndef __SOFTFP__ # define _SUPPORTS_ERREXCEPT #endif +#define __DOUBLE_TYPE double +#define __FLOAT_TYPE float #endif #if defined (__aarch64__) @@ -102,6 +104,8 @@ #ifdef __ARM_FP # define _SUPPORTS_ERREXCEPT #endif +#define __DOUBLE_TYPE double +#define __FLOAT_TYPE float #endif #ifdef __epiphany__ diff --git a/newlib/libc/include/math.h b/newlib/libc/include/math.h index ba1a8a17e..af5b5e653 100644 --- a/newlib/libc/include/math.h +++ b/newlib/libc/include/math.h @@ -158,6 +158,15 @@ extern int isnan (double); #else /* Implementation-defined. Assume float_t and double_t have been * defined previously for this configuration (e.g. config.h). */ + + /* If __DOUBLE_TYPE is defined (__FLOAT_TYPE is then supposed to be + defined as well) float_t and double_t definition is suggested by + an arch specific header. */ + #ifdef __DOUBLE_TYPE + typedef __DOUBLE_TYPE double_t; + typedef __FLOAT_TYPE float_t; + #endif + /* Assume config.h has provided these types. */ #endif #else /* Assume basic definitions. */ -- 2.25.1 --=-=-=--