From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2073.outbound.protection.outlook.com [40.107.241.73]) by sourceware.org (Postfix) with ESMTPS id 7BD533858D33 for ; Wed, 1 Feb 2023 15:10:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7BD533858D33 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=TlioKjeEy1V0jaXNJT8dqJUzYY4G1SYtIHSjWsNP6Ws=; b=eWaebBrl0nSRiVdkwmSRJYPheWfrbnnpWxFMnvsxK3eL/4jfu9CsU0eEC278OvIpi5fXgJh9a+QGASaJf8w0BhOs/SEROw7FwDYWSQ2Dc4fG3W5RGLKwhMjQMDjgnxNxamp24ifEHvSJW0yYgp1Aj6yY2xgcOZMPHnftruiXiRU= Received: from DB8P191CA0030.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:130::40) by DB3PR08MB9059.eurprd08.prod.outlook.com (2603:10a6:10:429::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38; Wed, 1 Feb 2023 15:10:34 +0000 Received: from DBAEUR03FT023.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:130:cafe::73) by DB8P191CA0030.outlook.office365.com (2603:10a6:10:130::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.24 via Frontend Transport; Wed, 1 Feb 2023 15:10:34 +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 DBAEUR03FT023.mail.protection.outlook.com (100.127.142.253) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.25 via Frontend Transport; Wed, 1 Feb 2023 15:10:34 +0000 Received: ("Tessian outbound baf1b7a96f25:v132"); Wed, 01 Feb 2023 15:10:34 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d6ec16d373b8db19 X-CR-MTA-TID: 64aa7808 Received: from d99a8e4f2c52.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9D5E29FE-0FC2-4A82-83B3-BD1760F0E794.1; Wed, 01 Feb 2023 15:10:28 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d99a8e4f2c52.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 01 Feb 2023 15:10:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H6U1US6L1LzfM+JThlMbPYBW7MNTWbVXxYcRV+1IPY+gvSwlwOde9HY4guc1bmmkLWamXkgns4iSThmXS9NQoGITfYzEXCuSykLZNChXI26q1hnzBFIHamMfOpCeC1r1YQBUK8s0vOI6qRRBzwNs4G9K9U0XBD87QL6nYEGdpDR+Pch6PRQ+RfTnwBNIPUMicn+0KOysxYgU9EzNNnrNyPJk2ng7bA4+k6PxULhm8d/EapgPXg0Zyff7CHBs4tIDnUDrom9dCq+UWFQyf3VgVN+X9J7YCP85KEBkTu0Tes25LsycYEO03xTJ9GjXzicxczr7YnsUjigbEOBIWI2Isg== 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=TlioKjeEy1V0jaXNJT8dqJUzYY4G1SYtIHSjWsNP6Ws=; b=BfVGT7lUVi9JvupkmgCkyf2R5OJlCCwweIbjQOtIBX7t5bwUUcR59gO6KtmL0lzKMkTI3szUsZ/QC3tD0B5tGLAzn11vxdzim2NmIcGGNrTTpOB7cZ+KhzcfAfSXaDdyr4yy6FcUj9zKA9U0YYdKNomgVP4bU9R1ijUCerRxmt4urFH2b4bfNBHUpIX0AFtZcLUZiTd5YQDI5ITcZtRMonz9mqQX4bTk3m/rPINKmfdo8Bz0fUh7QWoEwMZcNClBeUfTIogz4UuId2xW/eeP3n4c7UEHm16sEXelKuR5PnawGocnJYFXf2gHJ6/UQ3InEkezHtCjNJBAP7NXiwACwA== 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=TlioKjeEy1V0jaXNJT8dqJUzYY4G1SYtIHSjWsNP6Ws=; b=eWaebBrl0nSRiVdkwmSRJYPheWfrbnnpWxFMnvsxK3eL/4jfu9CsU0eEC278OvIpi5fXgJh9a+QGASaJf8w0BhOs/SEROw7FwDYWSQ2Dc4fG3W5RGLKwhMjQMDjgnxNxamp24ifEHvSJW0yYgp1Aj6yY2xgcOZMPHnftruiXiRU= Received: from DBBPR09CA0047.eurprd09.prod.outlook.com (2603:10a6:10:d4::35) by DU0PR08MB9396.eurprd08.prod.outlook.com (2603:10a6:10:423::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.36; Wed, 1 Feb 2023 15:10:25 +0000 Received: from DBAEUR03FT018.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:d4:cafe::9e) by DBBPR09CA0047.outlook.office365.com (2603:10a6:10:d4::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.24 via Frontend Transport; Wed, 1 Feb 2023 15:10:25 +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; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT018.mail.protection.outlook.com (100.127.142.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6064.24 via Frontend Transport; Wed, 1 Feb 2023 15:10:25 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX04.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.2507.16; Wed, 1 Feb 2023 15:10:25 +0000 Received: from e125768 (10.2.78.50) 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.2507.16 via Frontend Transport; Wed, 1 Feb 2023 15:10:24 +0000 Date: Wed, 1 Feb 2023 15:10:18 +0000 Message-ID: From: "Victor L. Do Nascimento" To: CC: Subject: [PATCH] libc: arm: Implement setjmp GCC backwards compatibility. MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT018:EE_|DU0PR08MB9396:EE_|DBAEUR03FT023:EE_|DB3PR08MB9059:EE_ X-MS-Office365-Filtering-Correlation-Id: cd913975-1e1f-4d22-4f41-08db046677a8 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: bye+VbIlznUIpq16HjyC7DJNJxshbT/Oda4BNpXOJwATl5dN3/T/vKLEqXUzpgQs3NDNl7LNuY6Y1ScFztMF+PIRKx6ySxFXOn2+HP/hgnXWyZJEly4rSeUiWXVfM1t7aqs1UcPL9xA2qh/f3xDbuzGByUG/ifkaU+AJA06SuF82uSggx4JwTJncDInjOg4TmVoMYti4kTRHMB4M6QeKUWrBFFP2WLYefOppqpueKBuCG0gB6lRZ2mq2K2GoWnMb9Uce/v6hTyQybDPT/5zspCnVZYpgOqJWC8bgH+xtuk8HHEsyro4tmYMj9ieit9abxRqeGXJ4B7FJBrVWLDUZYhqGwlYuQhTfduHg8qKF5lPNezc6Ry7a4qXmmtN6o3DN2vUhvzUISqHGtNLiYd9U+XDYJTVvku5kLRPbpZn8nuwpEf3i9wLvtKzINBXRV4A45j3mB5yY5Pdj53tvogSAAzsS1bxWZt9A9cKISHuzT6VOgRaytDdMA70y3Uc/28+zqZ0qMT4amxil8Ys5ADAbCQdONNaKwmo/XcCjU4efgY15bTZRaNDhhZdG4ikmyHCgbduKJB0mJRFoHd3UKUHteKwfPYIF5hDIGUYrM1vQ0hUEN6d6H67zPgDNLfqZMG3yf8nLzt0/XsOEMH349FOXefgvIScdW530OqP4eceLHDPuqPBPdNyNUlmW1p8DT1oDC12qod7ZFru2hAIudUikJNY7ZzFeGh9Ei61jy7ltLY0= 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:(13230025)(4636009)(136003)(39860400002)(346002)(376002)(396003)(451199018)(46966006)(40470700004)(36840700001)(82310400005)(2906002)(86362001)(336012)(81166007)(426003)(8936002)(47076005)(41300700001)(40460700003)(356005)(36756003)(478600001)(26005)(6666004)(186003)(5660300002)(36860700001)(82740400003)(2616005)(4326008)(70206006)(6916009)(70586007)(8676002)(40480700001)(316002)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9396 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 6ea9ef9a-ebc9-4744-b2f8-08db0466726b X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AlrCpcUyPSB4F6vYEz0Jt4bzJpHs6neTD0fR+4Iu4I2A+Qxi3PuJOniB5HpR+xbBlZhr5oT3Vgpl2ipagqB2c8XOSivAeRYzHxVCZ7aH5r6t9N3t3CHfPshTdXXLcpa4HL5jz1bcR9R2yFhJEpKBn4zrfpeLMDH5XnYmgGRwPdOdcdgJ74ykhuxtA8nT8Widt+CHVWHjiCEdNYxLpwzuG0cee5Af4Oe3X2QPUw6iCpOTMu5oH65H7b9weLJ0lpZAI+dvPtxz4+YmAmR14dj7oWOpcdZBPivEyrNiRkjISa+IGQ+cejVYPYxBCGNHLrmlAfyTZAGT65nZ9KwwioOEij8/9YeFXGTEoRlv0Q6Lm5bkopmsPhG29oYP85ZWFPKdn1nDOn/JVNJ2oypGRhwFp42QBMQtLTs3rBiWav/dJvBHuVPQoXE4mKjwmKVYUgcJSI4PzoRrqMbf4CnWebsejAsxxBv9V1zuG65mTmFVkWCDQO8CYgEWnpTDNTXOrnmVA1ggXAvc/b5fWVRu2y8C4f67jX7hkxmIXFrviZYId8NQMbmYVEDtvuHax1BV7rs1MYpHbPqmxNSzhHD1TqfePOdFRfAGhugw2fUPtiHwCkN0zi1NGg+IRZJlSZg+PEW3M/EJtZ2rEPf5WmmdXRNHlzDo3UdOQNLFK7sqUw2l12RLUnayToGdkpVWU0hQnERgGGtQM4oRy88Z3pwQnz2Zrg== 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)(346002)(396003)(136003)(39860400002)(376002)(451199018)(36840700001)(40470700004)(46966006)(6666004)(36756003)(70586007)(70206006)(316002)(8676002)(6916009)(82310400005)(4326008)(5660300002)(41300700001)(8936002)(81166007)(86362001)(82740400003)(36860700001)(26005)(186003)(426003)(336012)(40460700003)(2906002)(40480700001)(47076005)(2616005)(478600001);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2023 15:10:34.3751 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cd913975-1e1f-4d22-4f41-08db046677a8 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: DBAEUR03FT023.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR08MB9059 X-Spam-Status: No, score=-12.9 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,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 List-Id: When compiling Newlib for arm targets with GCC 12.1 onward, the passing of architecture extension information to the assembler is automatic, making the use of `.fpu' directives instructions in assembly files redundant. With older versions of GCC, however, the .fpu directive must be hard-coded into the arm/setjmp.S file to allow the assembly of instructions concerning the storage and subsequent reloading of the floating point registers to/from the jump buffer, respectively. This patch conditionally adds the `.fpu vfpxd' directive based on compile-time preprocessor macros concerning GCC version and target architectural features, such that both the assembly and linking of setjmp.S succeeds for older versions of Newlib. --- newlib/libc/machine/arm/setjmp.S | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/newlib/libc/machine/arm/setjmp.S b/newlib/libc/machine/arm/setjmp.S index c615f2428..3a9aa840d 100644 --- a/newlib/libc/machine/arm/setjmp.S +++ b/newlib/libc/machine/arm/setjmp.S @@ -64,6 +64,22 @@ .syntax unified +/* GCC 12.1 and later will tell the assembler exactly which floating + point (or MVE) unit is required and we don't want to override + that. Conversely, older versions of the compiler don't pass this + information so we need to enable the VFP version that is most + appropriate. The choice here should support all suitable VFP + versions that the older toolchains can handle. */ +#if __GNUC__ && __GNUC__ < 12 +/* While GCC > 10.1 supports MVE, the MVE instructions do not need an + .fpu directive, so we don't need to handle that case. VFPxd thus + covers all the cases we need in this file and should be compatible + with all required FPUs that we need to support. */ +# if __ARM_FP + .fpu vfpxd +# endif +#endif + #if __ARM_ARCH_ISA_THUMB == 1 && !__ARM_ARCH_ISA_ARM /* ARMv6-M-like has to be implemented in Thumb mode. */ -- 2.36.1