Message ID | AS8PR08MB7079624B79439292B360CCAAEABB9@AS8PR08MB7079.eurprd08.prod.outlook.com |
---|---|
State | Superseded |
Headers |
Return-Path: <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8E4CE384F016 for <patchwork@sourceware.org>; Wed, 29 Jun 2022 09:35:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8E4CE384F016 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1656495322; bh=2rTuFONJCJWnPcVJqYODSlKuQ3QqcEeC6GgHMzxwiAo=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=D23k6JlxyQUDxCbqa7YAGP//TECWRc0teeW0gr3FtdJR+yjtx5GdT9uIXfZwkmJX9 V1PMPgLccZ/fNSZIc65H1nGTRwfnpSfHkNqKqXyLTtyOt90Zmfor6JiWS8mYEf+X2I /o/EP4vwMOK/ME0/xus+QbQ6j2UfxD9Po3Iuv8ic= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60044.outbound.protection.outlook.com [40.107.6.44]) by sourceware.org (Postfix) with ESMTPS id E5707384B82F for <libc-alpha@sourceware.org>; Wed, 29 Jun 2022 09:34:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E5707384B82F ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=AXTg8EBOr9gb7pUUiU7qescdSJ7B/59XH1u/1nR3KBXLnAJNryx0AsxzDYGLkdgdCTdklAkwo4ZIs0dkWucJ9/UFpBx6ZWvEUPqDzNd7t13VYdD4qik1/Fsbnrbe4HR/aElOmiN19r6gZeSlL1rQrWgorzWw+2ISOEhz33rDzF2+8zIIYxXc6JUE6fce7xbeJvTMiH4EIm8tcIGyKNxdWh9cIjHjgFLoQssnbd5maW5Lcf3WTF1TnWaPzYLftYVS2SW7f011BInt7xg2vdKr5/lXKlUvFDCAAv369EvRUd+aW0hfTJ8/Rw+E0hiRsFKWDW0fzWb0p5a1cDjAc/BL1Q== ARC-Message-Signature: i=2; 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=2rTuFONJCJWnPcVJqYODSlKuQ3QqcEeC6GgHMzxwiAo=; b=m36rQuKHwzz8GgjbriI4a3WoHFjC8wMMUYSuaA5cJseWpPFTx0K2fIIr1hoDe6+8ZfI+EedAnro2/kMIqESfFkfro8AWM6hSLGakUJKS5yhI2Bd7P5NV80tdTtNVcNUhRG0G2I2Fc4CoLtD26yclNluOx+zgeIi79gZGIsGaVw1TOuzHcDw6QkqShREtlZ0u7FbKYfdnYxEnloNoMBj4g572es7aHe1T+o/cCw2gPbD5KBjzsrBNQwxOThgQniwMvAkVX6Gn+8hr6zyrWSPJBCyFKUu20ir+q1YGHC0CvGSQq54EjYEP5maaZxjNe6h/koRr6Fk7CDCwlSbC1OsJFg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) Received: from DB6PR0301CA0051.eurprd03.prod.outlook.com (2603:10a6:4:54::19) by PR2PR08MB4747.eurprd08.prod.outlook.com (2603:10a6:101:28::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.18; Wed, 29 Jun 2022 09:34:42 +0000 Received: from DBAEUR03FT063.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:54:cafe::e4) by DB6PR0301CA0051.outlook.office365.com (2603:10a6:4:54::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14 via Frontend Transport; Wed, 29 Jun 2022 09:34:42 +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 DBAEUR03FT063.mail.protection.outlook.com (100.127.142.255) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15 via Frontend Transport; Wed, 29 Jun 2022 09:34:41 +0000 Received: ("Tessian outbound 9336577968ca:v121"); Wed, 29 Jun 2022 09:34:41 +0000 X-CR-MTA-TID: 64aa7808 Received: from 31ee6d9fd5c7.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id CFB2812C-4491-4001-B040-74843F66CCCB.1; Wed, 29 Jun 2022 09:34:36 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 31ee6d9fd5c7.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 29 Jun 2022 09:34:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=clOSc26v3gG2e/C+/Ylbv+bKnFECF8Aus8xVKrP9SIFlXiA7rLNaYupYUOqD3irpBcn5ia5puRLcbXneIpTOkvMie3EkELXJ5G9vAVAjPYMvvwoIYCKGLW+do3w2kedvqAeCc+7rMlRhXC7cFpfhih/RDbAWnLY8f0t4AEtVezgA3o4Gs2V+Vr5yCMCI68XF3XPBAOPYNR6RqKTx5DxEs+66Q4XFkQKMHGmiE1LW+biJk2/xefRPoEzMOqc3pZjNpFcZPJQMG2GPEMiT4UvMMRYLpCGubFQpOyF0OWAsZjlpDng5YbzvzAfmaudVC7OZktT+5YInIC79G/znbt3GJw== 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=2rTuFONJCJWnPcVJqYODSlKuQ3QqcEeC6GgHMzxwiAo=; b=Rr7Nr32RyDrkHsv1FgDnc2diGdhOeBhcmqPFPwoZIEUoCuH1Q66xitmGnZIewAAWKg5cKFb7nRm9H3jWENai5DQVV6UyKBCZRPqG4lpvXHMBgpxqYpHny+63BdGN5mBYSeTqvcZFE2NeQOKiys0zO+3MwekXNu26grEP6jBvbyfJXNPm3WpcBLgbVISRUIltwrJla7ygrQns0FuSpp6JuqSi4kwxm0Cma6H1tu+gZsXg5oaTtA/LU5oBlrAJ4bF9F3zYTnpcI8PwQhUGsG/7XBGueVVxEEgYAh7FjBYsagnDwsTe4iB/ck3cLrQ3WtdyR2adl0WIcXaffWGkMNSfKA== 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 Received: from AS8PR08MB7079.eurprd08.prod.outlook.com (2603:10a6:20b:400::12) by PR2PR08MB4908.eurprd08.prod.outlook.com (2603:10a6:101:23::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17; Wed, 29 Jun 2022 09:34:34 +0000 Received: from AS8PR08MB7079.eurprd08.prod.outlook.com ([fe80::14ab:8a2f:bb92:2775]) by AS8PR08MB7079.eurprd08.prod.outlook.com ([fe80::14ab:8a2f:bb92:2775%7]) with mapi id 15.20.5373.018; Wed, 29 Jun 2022 09:34:34 +0000 To: "libc-alpha@sourceware.org" <libc-alpha@sourceware.org> Subject: Reset HWCAP2_AFP bits in FPCR for default fenv. Thread-Topic: Reset HWCAP2_AFP bits in FPCR for default fenv. Thread-Index: AdiLm17Q0AKIfSvUTxKNFT7K69fdGw== Date: Wed, 29 Jun 2022 09:34:33 +0000 Message-ID: <AS8PR08MB7079624B79439292B360CCAAEABB9@AS8PR08MB7079.eurprd08.prod.outlook.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-ts-tracking-id: 832977936728724892836BB72118814C.0 x-checkrecipientchecked: true Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-MS-Office365-Filtering-Correlation-Id: 135b407e-cc7b-47a8-5b08-08da59b29838 x-ms-traffictypediagnostic: PR2PR08MB4908:EE_|DBAEUR03FT063:EE_|PR2PR08MB4747:EE_ 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: lnW+gNjWJYPqgGUuPNewvEUXd6hAc/9bqb1Kn8c9moLMSNknwJLKaX0a4s/TmqqNB7pzxZVbnWHZhxEPv7CvrRSxgVLAK52Ar2z6YZbspgxowTmwT/DwrNm9sQ0T2AvmT3bRpSq8/A0rerbzEtMlUcv+AXF62gBJ+40ASN9ntX3husF15KMTalB8NVrFY5V5lvOkaoA5vJo4j/dwHjL6xW5uSwCxd0huWKM04TrNuEopeggMkNxofaaSE8S2JgMU88yicojThsBbby0MXU6MA7UJaBISrq06GGa5G5KOZ8GSR3oinoWau4pU9cs/tusJBW7BD2W/T3g8XvLzCb+3CFNGAjhDbzvtRDfkhWpVxCfUxIfPUMlqotzzxUuGEfyhNlsGvNa4xF7pYmYILDPWLRioU19YOLi4wf4CkrjNc34imYZU+h1pgHPikuYx/t+YEgyqwkQ3rQu4O4puxU3PfUkx/KLonnIwnnFiGa8WxUpnlAT1XFBo9xQUR6Dv2W8iv7v8MJPorDOOgDxB2KK1rlKeBIcRZCxbRkrp/cTekHOamzsx6yiaVCpUkIykOiryPVkXdXG4DN2QdR82JuTdjLSbwkCRSBOc5bdubWrMulR3WbQoXdZtOZEDKp328C7JVnT+DpTq6ZCnrNLTo9pvjOM3QNa6z49OFNOXnq09jjgLmAPLAticLYA1PmCKh1TACSbe7U7p3s+bZS0olDqfrBbfLyKfqPtFGx7xbcrGeCmuHF4+uhFO9dGzzsmBjxVUu+E6p/9UUufkIcbt1xmWXE2itOVnb4ZUMZxYvgzoVDI= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR08MB7079.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(396003)(346002)(136003)(366004)(39860400002)(376002)(186003)(26005)(33656002)(38100700002)(55016003)(4744005)(52536014)(64756008)(4326008)(38070700005)(66946007)(66446008)(5660300002)(71200400001)(2906002)(41300700001)(66476007)(8676002)(6506007)(66556008)(9686003)(8936002)(6916009)(316002)(478600001)(86362001)(122000001)(99936003)(7696005)(76116006); DIR:OUT; SFP:1101; Content-Type: multipart/mixed; boundary="_002_AS8PR08MB7079624B79439292B360CCAAEABB9AS8PR08MB7079eurp_" MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2PR08MB4908 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: DBAEUR03FT063.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 46fd9c9a-35fc-488e-3238-08da59b2937f X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MwR5+jnQM+4N0N/0HNgvYS4YyXPNMnP2USl9mtj3Cj9UUhSzDfC3e8Fm45fECGIe3O/A/DX9bDO+u6sm4Yj7GVAK7ZJZuPLKMgFaSvKovwjMoRHLBfMM2FuLdsoH6x5adAiGcPAF1vvGbjwK7ckNTeO2EDpLou7jpJ0kdLXzSv1z+egROtoJCKKr9Aa2LYGuRScov+XcPDk7JEoD6QYpSy5AdRpb6joI5bbgkdeqfizh1oqFp35WwefFmAtIyJDmwsTE27uYLHhbBy4l2QSrCr2yImLLlUvh4jJnlF5wAX5a9feKK4pdGsEVqHlg7K2WfWxSJYtn7Pw0FBTl6jp0bwhxXDbkNiwmbfLjFG8cNcYHbD+CHfI/ui07/whu0hPpmMldXWQSU2jy03QSYf0c+cO2vxC4v5blbZ53TnjbCUOVz/+IrRbmktKL4U/vmeiBo7jht0eG2TwocygEGSnU8UDFBGwQE+TVyz9GDY6G7tItBzk/HDcacjcKHjy2uxAqZcgNUMK665dBkGvHq3VAhyH9uVrPTTSlBVdPhJHutQiNx3iiOP6oSyP4OJ1NAYV2EAVt0XvV1+6P48clYs90zcu0dKBhS12xA84GKVp2wk/H+M8EPox3/iTMDCCKpf6E+sz83K8ylHLZF8cQlwEWlA2PQdmFpro5C0WrCN7yJWz2rTvJ8reW2SpKde3BGCQS/JvGAVf5UEjM2MoTLYkM+p1O7F13W++l8ncRgh1ymQyXfTX1sqA62FH1kZWzkx3Wf1j/8JGvEGU1brkWOiHxRiSNXpPJztsNlNwoaTMulfKiiFc1rJcezGHGyDqSmqz4 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:(13230016)(4636009)(376002)(136003)(346002)(39860400002)(396003)(46966006)(40470700004)(36840700001)(47076005)(356005)(6916009)(5660300002)(52536014)(55016003)(33656002)(82740400003)(9686003)(235185007)(99936003)(2906002)(4326008)(21480400003)(316002)(81166007)(26005)(7696005)(36860700001)(336012)(186003)(8936002)(40480700001)(70586007)(8676002)(70206006)(40460700003)(82310400005)(41300700001)(86362001)(478600001)(6506007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2022 09:34:41.9071 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 135b407e-cc7b-47a8-5b08-08da59b29838 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: DBAEUR03FT063.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2PR08MB4747 X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Tejas Belagod via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Tejas Belagod <Tejas.Belagod@arm.com> Cc: Szabolcs Nagy <Szabolcs.Nagy@arm.com> Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces+patchwork=sourceware.org@sourceware.org> |
Series |
Reset HWCAP2_AFP bits in FPCR for default fenv.
|
|
Checks
Context | Check | Description |
---|---|---|
dj/TryBot-apply_patch | success | Patch applied to master at the time it was sent |
dj/TryBot-32bit | success | Build for i686 |
Commit Message
Tejas Belagod
June 29, 2022, 9:34 a.m. UTC
Hi, The AFP feature (Alternate floating-point behavior) was added in Armv8.7-A and introduced new FPCR bits. Currently, HWCAP2_AFP bits (bit 0, 1, 2) in FPCR are preserved when fenv is set to default environment. This is a deviation from standard behavior. Clear these bits when setting the fenv to default. There is no libc API to modify the new FPCR bits. Restoring those bits matters if the user changed them directly. OK for master? Thanks, Tejas.
Comments
* Tejas Belagod via Libc-alpha: > The AFP feature (Alternate floating-point behavior) was added in > Armv8.7-A and introduced new FPCR bits. > > Currently, HWCAP2_AFP bits (bit 0, 1, 2) in FPCR are preserved when > fenv is set to default environment. This is a deviation from standard > behavior. Clear these bits when setting the fenv to default. > > There is no libc API to modify the new FPCR bits. Restoring those > bits matters if the user changed them directly. > > OK for master? What do you propose as commit message? I think we have that definition of _FPU_RESERVED because the we cannot know the semantics of those bits (obviosuly), and changing them underneath the user's code could be wrong. What do these bits do, actually? If this adds additional FPU state, how does it interact with compiler behavior and optimizations? Can it even be safely changed after process startup? Thanks, Florian
The 06/29/2022 11:54, Florian Weimer wrote: > * Tejas Belagod via Libc-alpha: > > > The AFP feature (Alternate floating-point behavior) was added in > > Armv8.7-A and introduced new FPCR bits. > > > > Currently, HWCAP2_AFP bits (bit 0, 1, 2) in FPCR are preserved when > > fenv is set to default environment. This is a deviation from standard > > behavior. Clear these bits when setting the fenv to default. > > > > There is no libc API to modify the new FPCR bits. Restoring those > > bits matters if the user changed them directly. > > > > OK for master? > > What do you propose as commit message? > > I think we have that definition of _FPU_RESERVED because the we cannot > know the semantics of those bits (obviosuly), and changing them > underneath the user's code could be wrong. > > What do these bits do, actually? If this adds additional FPU state, how > does it interact with compiler behavior and optimizations? Can it even > be safely changed after process startup? i think you will have to check the details in the arm arm https://developer.arm.com/documentation/ddi0487/latest in short, the new bits FPCR.NEP: changes output of scalar fp instructions in top vector lanes. FPCR.AH: changes flush to zero exception, underflow and nan propagation. FPCR.FIZ: subnormal inputs are flushed to zero (instead of outputs). (note that the alternate fp behaviour is carefully designed so it's easy to emulate fp instructions of other architectures, i.e. the bits are likely not used to change math library behaviour but to execute a foreign binary on aarch64.) technically these should be 0 in c code (then save/restore is noop). it seems the existing reserved bits are not consistent: - DN is reserved (when set, default nan is returned instead of propagating nan payload) - FZ is not reserved (subnormal flush to zero) These are non-conforming settings so fenv apis could ignore both or save/restore both. i don't have a strong opinion, but i thought it made sense to restore all these special bits with fesetenv(FE_DFL_ENV). (e.g. in an async signal handler one could do fegetenv(&e); fesetenv(FE_DFL_ENV); // fp operations fesetenv(&e); to get sane fenv. this is ub in iso c, but not unreasonable.)
On Wed, 29 Jun 2022, Szabolcs Nagy via Libc-alpha wrote: > i don't have a strong opinion, but i thought it made sense to > restore all these special bits with fesetenv(FE_DFL_ENV). Yes, I think FE_DFL_ENV (and FE_DFL_MODE) should cover all such architecture-specific control settings, even when we also don't support the use of most floating-point APIs with non-default values of those settings.
> -----Original Message----- > From: Joseph Myers <joseph@codesourcery.com> > Sent: Wednesday, June 29, 2022 10:24 PM > To: Szabolcs Nagy <Szabolcs.Nagy@arm.com> > Cc: Florian Weimer <fweimer@redhat.com>; Tejas Belagod > <Tejas.Belagod@arm.com>; Tejas Belagod via Libc-alpha <libc- > alpha@sourceware.org> > Subject: Re: Reset HWCAP2_AFP bits in FPCR for default fenv. > > On Wed, 29 Jun 2022, Szabolcs Nagy via Libc-alpha wrote: > > > i don't have a strong opinion, but i thought it made sense to restore > > all these special bits with fesetenv(FE_DFL_ENV). > > Yes, I think FE_DFL_ENV (and FE_DFL_MODE) should cover all such > architecture-specific control settings, even when we also don't support the > use of most floating-point APIs with non-default values of those settings. > Thanks all for your comments. Florian, given the explanations from Szabolcs and Joseph, do you have any objections to this change? Thanks, Tejas. > -- > Joseph S. Myers > joseph@codesourcery.com
* Tejas Belagod: >> -----Original Message----- >> From: Joseph Myers <joseph@codesourcery.com> >> Sent: Wednesday, June 29, 2022 10:24 PM >> To: Szabolcs Nagy <Szabolcs.Nagy@arm.com> >> Cc: Florian Weimer <fweimer@redhat.com>; Tejas Belagod >> <Tejas.Belagod@arm.com>; Tejas Belagod via Libc-alpha <libc- >> alpha@sourceware.org> >> Subject: Re: Reset HWCAP2_AFP bits in FPCR for default fenv. >> >> On Wed, 29 Jun 2022, Szabolcs Nagy via Libc-alpha wrote: >> >> > i don't have a strong opinion, but i thought it made sense to restore >> > all these special bits with fesetenv(FE_DFL_ENV). >> >> Yes, I think FE_DFL_ENV (and FE_DFL_MODE) should cover all such >> architecture-specific control settings, even when we also don't support the >> use of most floating-point APIs with non-default values of those settings. >> > > Thanks all for your comments. > > Florian, given the explanations from Szabolcs and Joseph, do you have > any objections to this change? No objection to the change itself, but you didn't post the proposed commit message. Please mention “aarch64” in the subject. Thanks, Florian
Thanks. Sorry, I intended the original mail body without the 'OK for master?' as the commit message. I shall re-post the patch with the correct formatting. Thanks, Tejas. > -----Original Message----- > From: Florian Weimer <fweimer@redhat.com> > Sent: Thursday, June 30, 2022 4:13 PM > To: Tejas Belagod <Tejas.Belagod@arm.com> > Cc: Joseph Myers <joseph@codesourcery.com>; Szabolcs Nagy > <Szabolcs.Nagy@arm.com>; Tejas Belagod via Libc-alpha <libc- > alpha@sourceware.org> > Subject: Re: Reset HWCAP2_AFP bits in FPCR for default fenv. > > * Tejas Belagod: > > >> -----Original Message----- > >> From: Joseph Myers <joseph@codesourcery.com> > >> Sent: Wednesday, June 29, 2022 10:24 PM > >> To: Szabolcs Nagy <Szabolcs.Nagy@arm.com> > >> Cc: Florian Weimer <fweimer@redhat.com>; Tejas Belagod > >> <Tejas.Belagod@arm.com>; Tejas Belagod via Libc-alpha <libc- > >> alpha@sourceware.org> > >> Subject: Re: Reset HWCAP2_AFP bits in FPCR for default fenv. > >> > >> On Wed, 29 Jun 2022, Szabolcs Nagy via Libc-alpha wrote: > >> > >> > i don't have a strong opinion, but i thought it made sense to > >> > restore all these special bits with fesetenv(FE_DFL_ENV). > >> > >> Yes, I think FE_DFL_ENV (and FE_DFL_MODE) should cover all such > >> architecture-specific control settings, even when we also don't > >> support the use of most floating-point APIs with non-default values of > those settings. > >> > > > > Thanks all for your comments. > > > > Florian, given the explanations from Szabolcs and Joseph, do you have > > any objections to this change? > > No objection to the change itself, but you didn't post the proposed commit > message. Please mention “aarch64” in the subject. > > Thanks, > Florian
diff --git a/sysdeps/aarch64/fpu/fpu_control.h b/sysdeps/aarch64/fpu/fpu_control.h index 764ed5cdbb6a90a4d6ac9af1f8874fd71c379e62..429f4910e7a165a7ba8170b173c4fbb3960afa3f 100644 --- a/sysdeps/aarch64/fpu/fpu_control.h +++ b/sysdeps/aarch64/fpu/fpu_control.h @@ -46,7 +46,7 @@ contents. These two masks indicate which bits in each of FPCR and FPSR should not be changed. */ -#define _FPU_RESERVED 0xfe0fe0ff +#define _FPU_RESERVED 0xfe0fe0f8 #define _FPU_FPSR_RESERVED 0x0fffffe0 #define _FPU_DEFAULT 0x00000000