From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2074.outbound.protection.outlook.com [40.107.22.74]) by sourceware.org (Postfix) with ESMTPS id 5E8D33858CDB for ; Thu, 9 Mar 2023 16:20:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5E8D33858CDB 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=ugwUWOprI1pV1V/Zi5ynst5jziSEve9yM+YZ6ZfxlMA=; b=EGavOkYenDLaCOQ9cQGwV8hfKJLf9uldhLbMorLIy3g6PgNMLN2cSWYgsuyqs1yBLG4IiMkFVupzcYQZzyAe/ge8aFHu5RTp08Y+M/uVzhVCtJfD8IVIEi5Ckq4xvnFjr45J7dfeaeWUMLEwa67hrycVPcTcoEd3LuCQjFdRqAs= Received: from DB6PR07CA0059.eurprd07.prod.outlook.com (2603:10a6:6:2a::21) by AS2PR08MB10321.eurprd08.prod.outlook.com (2603:10a6:20b:5e4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.18; Thu, 9 Mar 2023 16:20:13 +0000 Received: from DBAEUR03FT022.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:2a:cafe::dd) by DB6PR07CA0059.outlook.office365.com (2603:10a6:6:2a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.16 via Frontend Transport; Thu, 9 Mar 2023 16:20: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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT022.mail.protection.outlook.com (100.127.142.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.19 via Frontend Transport; Thu, 9 Mar 2023 16:20:13 +0000 Received: ("Tessian outbound 55ffa3012b8f:v135"); Thu, 09 Mar 2023 16:20:12 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 5db8e00cd062c6b3 X-CR-MTA-TID: 64aa7808 Received: from f8094bdd979f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C38A71B3-5543-449A-944E-4F3C501A1556.1; Thu, 09 Mar 2023 16:20:05 +0000 Received: from EUR02-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f8094bdd979f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 09 Mar 2023 16:20:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LffxCyNRiaFdX0ogW94uduOybzT2UJ2NEVgkpE1hPDjZSwtdQW30JPoy5GeZSOlm4L4zTxDn3F0Or1qQx9XGB88UrN17plKSHnL+nGdQKGlx7EJC7XQpmYXF3lcZ9Q9tCv6EZ6am3vr4lNWmB8a1ZbrRDPFphI0m3K/avgyHDF6s+N8K0fH+siykI5kY5NES4UmieurG5V9rzz72YWAY91C5hkm8H8uprnFM+BIhd/WaSphQPejo82EERVpn2BtyjV6f2YbrEn1uYJ6vvHaex/VWAtzTO2H/78Wl8+2Is3V2x0u3DXP7LB1cv98yXcww8T1WwsIhXXe+M37ixbkMnQ== 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=ugwUWOprI1pV1V/Zi5ynst5jziSEve9yM+YZ6ZfxlMA=; b=lrxfkBETGvq+1S8uG6Z34eNokSzjIBaL2u7cYI2YnvU7/f1hUNULL+nJ5ZNY+ba0k7dWuq5EZasxOqWF38HoT8/sgjh4iJakanLBShf8u2ayzrpC3rfjqG5kjEu7Yr6vAsS8C7JEqihWeVFw3T+Gs6tdG8KN5EUmBvgyGOLcilLRR4VdGV/hmFYNlRm+w+ZIEfZPLDccCEFWTKv9ZJF2qwdrL/GOW1N+7Jx+U2tGfd71iN4MMmOPcSGKOqhIP0TpB1yh68Nf15XJvlSzdQDONNAO5uKNWQMmFnvBmpU4OtoWVER9ybccOIj3VJ4S7AEpAy3n8mwOAPz7bB0T8OiMDw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; 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=ugwUWOprI1pV1V/Zi5ynst5jziSEve9yM+YZ6ZfxlMA=; b=EGavOkYenDLaCOQ9cQGwV8hfKJLf9uldhLbMorLIy3g6PgNMLN2cSWYgsuyqs1yBLG4IiMkFVupzcYQZzyAe/ge8aFHu5RTp08Y+M/uVzhVCtJfD8IVIEi5Ckq4xvnFjr45J7dfeaeWUMLEwa67hrycVPcTcoEd3LuCQjFdRqAs= Received: from PAWPR08MB8982.eurprd08.prod.outlook.com (2603:10a6:102:33f::20) by GV2PR08MB9951.eurprd08.prod.outlook.com (2603:10a6:150:b8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.29; Thu, 9 Mar 2023 16:20:03 +0000 Received: from PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::dc17:8fa2:cce5:3573]) by PAWPR08MB8982.eurprd08.prod.outlook.com ([fe80::dc17:8fa2:cce5:3573%7]) with mapi id 15.20.6178.018; Thu, 9 Mar 2023 16:20:03 +0000 From: Wilco Dijkstra To: Xi Ruoyao , Kito Cheng CC: Palmer Dabbelt , "libc-alpha@sourceware.org" , "joseph@codesourcery.com" , "jeffreyalaw@gmail.com" , Darius Rad , "christoph.muellner@vrull.eu" , DJ Delorie , Andrew Waterman Subject: Re: [PATCH] Remap __GLIBC_FLT_EVAL_METHOD to 0 if __FLT_EVAL_METHOD__ is -1 Thread-Topic: [PATCH] Remap __GLIBC_FLT_EVAL_METHOD to 0 if __FLT_EVAL_METHOD__ is -1 Thread-Index: AQHZUpGX8k2dpVWsnU+W0pDcm7oxta7ygzKAgAAHSQCAAAUqgIAAAz4J Date: Thu, 9 Mar 2023 16:20:02 +0000 Message-ID: References: <20230217022646.99959-1-kito.cheng@sifive.com> <0c9b0538369a8632834a7bb9b3e9855c61fbe281.camel@xry111.site> In-Reply-To: <0c9b0538369a8632834a7bb9b3e9855c61fbe281.camel@xry111.site> Accept-Language: en-GB, en-US Content-Language: en-GB X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: PAWPR08MB8982:EE_|GV2PR08MB9951:EE_|DBAEUR03FT022:EE_|AS2PR08MB10321:EE_ X-MS-Office365-Filtering-Correlation-Id: 94bb2f0b-4db2-46fc-d5b7-08db20ba2936 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: WXo9iLm86uHHPnu0Nv/+4c9eEn6I1OK2drf438WP1PQ23Yc6duu5EaLiWqAVxYw9QrrxhpTuSbmHrV3ZFqjznKBjWFgyvhJh/toMAkSkyK79SKjXaGB/PiOEp1pFazm7xY3AXwHfKgSUE2xSzCV77BzOWzb1d3KYG+qICBZ46kMiVYdK+cC9S0fThM+zamHrcA3VxRLNyvmvNaJ8L3aygVSjxHzHKhOvmW0jHtaArhOMDr5NqRcZDkThDEdfvNAJWtkWq62iSDprrW0OQZ3EGmCl3GjKA9r+ja4z8DgVVXnh2+6I3Z0GPNLE5SiSA1yT//n6IHGHFD7MNPXle9C2wHiQrPEwnSA1EWJOqFVjViFSymOJfAfBPERXxLxQr9H4Apfq/rokQpoYN6XEhDY7Lp4g2yeBoyb82bLqdvBcekNhj7sHEkuETRnMyaz8CKK8PSAZTZyZghywa0FCZ1VdmNidbBIRpCL9VrXhufogaE3jFMz8olTUIKOf16OXImpIU9agYEztSYPMQzswzpFnKK7G4l/YDQV/j7in6yKIzY7CsM9BWOdUyuRbatJ6fQOptaoEt19Dpt8oJ+KxRAwIGQT1xtGthZna8Bcfj+DUi5Ao4ZrNV36CDHabRwgTrbJhf1LJhoH3QEz+xPP7GdOv/bencnJZCHL7Ov2+cxylTKCmEpZfc9VACFXw6iJiwBRbAED3CHgsRYyJNPWrGoZjf9N0wq3+Msfzk/1jYO84Fvg= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAWPR08MB8982.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(39860400002)(366004)(136003)(396003)(376002)(346002)(451199018)(38070700005)(55016003)(7696005)(110136005)(54906003)(91956017)(41300700001)(4326008)(33656002)(83380400001)(8676002)(86362001)(316002)(66446008)(66946007)(966005)(64756008)(8936002)(66556008)(478600001)(66476007)(71200400001)(7416002)(76116006)(5660300002)(52536014)(186003)(26005)(9686003)(122000001)(38100700002)(2906002)(6506007);DIR:OUT;SFP:1101; Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB9951 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT022.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b9d2f9dd-8e22-4999-8e1a-08db20ba2334 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MRe0kFaNgRS/Wetb1A1NEQIbQKcaNu5BxmyYXZwevo1Baw6rZgj+Jrl/ZukRui2iNStQLdUozylnjaAKLT8A1E5MoP1YPrXbaPqmgJXbFegj6br7FpidYreRczjQOQ1YyuFYOXTOUErVmNpAtm5HD1XgJ7xI1oYyUut08u5j72EJ1vqTnx7manPms4OongAqBt2O3gKvquqyfpREHD67UedNXsbqHNRSimRhi2e7DOR8kSf6tObY+sosBAxQ0Po38QsGOyhigH3hKq11Y8hTgQMzTHwVpgnEVj+Kqips/TT9iVt+6X2yOFWpIYGscd5fQ1p51SJaXwZCXAlcGKhppC06FYJFTrkb3OoMZEAM6F/mJJzG1OJx02firirtQDQErAkaeiKBdPn7fUKco998MrKkt6ro4m4EJouOVYbPIRvvnA9tW/26TaGURjtpyGnHwHd/G26g/sJLeK0GzpqSjFO4R3SbbBuOiEcA+ZqU4s/QxOefrtocunxzXbNnBqpZFNBTZWPq+R7+gLjo9y73UqpDjp9pzLwhW1dcFWNaEeVOlphRS9nXJkTKW8B53hGJ+0rOM0vZtq7cy8QVwiIiV9r9395qiWue2U6OvmZsgJhNCh3i/DF/eTwwBaieAmh3mMYq9v9k2Am4TLsr5bMBsFUPV7FdGA24e3n+jVLqu3dBYCvFk1vO9/wozIToyB+crMqiJxq8gWCsJSnJXoTY5D1uj2JSMwHW/TYJRB9pChM= 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:(13230025)(4636009)(136003)(39860400002)(346002)(376002)(396003)(451199018)(46966006)(40470700004)(36840700001)(33656002)(2906002)(5660300002)(26005)(8676002)(52536014)(8936002)(70206006)(70586007)(41300700001)(4326008)(40460700003)(40480700001)(55016003)(54906003)(86362001)(316002)(110136005)(7696005)(478600001)(966005)(356005)(81166007)(107886003)(9686003)(6506007)(36860700001)(82740400003)(186003)(336012)(47076005)(83380400001)(82310400005);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2023 16:20:13.0522 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 94bb2f0b-4db2-46fc-d5b7-08db20ba2936 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: DBAEUR03FT022.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB10321 X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,KAM_DMARC_NONE,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi,=0A= =0A= >> GCC isn't set that to -1, but clang/LLVM did, see=0A= >> https://github.com/llvm/llvm-project/issues/60781=A0and=0A= >> https://reviews.llvm.org/D121122=0A= >=0A= > Hmm, it turns -ffast-math into "-fslow-math" :(.=0A= =0A= Yes that alone is a good reason to fix this!=0A= =0A= > I agree that if __FLT_EVAL_METHOD__ is not 0, 1, or 2, and the target=0A= > does not have native support for some "special" floating point types, we= =0A= > *should* make float_t float and double_t double.=0A= >=0A= > But doing so may blow up rolling-release distros: if a library uses=0A= > float_t and double_t in the API and the distro maintainers rebuilt the=0A= > library with a new Glibc, but (s)he has not rebuilt an application using= =0A= > the library yet, the application will just crash or produce "strange"=0A= > results.=A0 Maybe we'll need to issue an alert about this to the distro= =0A= > maintainers.=0A= =0A= GCC never uses -1, so distros should be fine. We could backport the GLIBC f= ix.=0A= =0A= It's not clear whether float_t/double_t are allowed on interfaces. On x86 G= CC uses=0A= 2 by default but LLVM uses 0, and with Ofast x86 GCC uses 0 while LLVM uses= -1=0A= (which is mapped to 2 by GLIBC). With LLVM fixed it will be 0.=0A= =0A= So it looks like a mess, but on x86 there is precedent for incompatible val= ues=0A= between compilers and optimization settings.=0A= =0A= Cheers,=0A= Wilco=