From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2048.outbound.protection.outlook.com [40.107.249.48]) by sourceware.org (Postfix) with ESMTPS id 536653871F99 for ; Tue, 13 Dec 2022 14:51:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 536653871F99 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=tZbLe7zoFRCUCtNmsrP4xCTHyZdjj6q+l1jciQB19cU=; b=v/P71LvEJL03lFGnKaH0QBsEvGCE9C6P+tQbWSvvliP5McuutxtbEbfwlgiYqYhZ2sR/Xml6aERYr7dkEII8fvrg5SKNwwZ//yVJj9uApQ9SJ6MlN3pb9PIbplIULUMltpsff1OHNer0wN2jyTd1HkEWxTn1HGx0/ISi9LyXq94= Received: from AM5PR0502CA0003.eurprd05.prod.outlook.com (2603:10a6:203:91::13) by GVXPR08MB7704.eurprd08.prod.outlook.com (2603:10a6:150:6a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.6; Tue, 13 Dec 2022 14:51:48 +0000 Received: from AM7EUR03FT048.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:91:cafe::ff) by AM5PR0502CA0003.outlook.office365.com (2603:10a6:203:91::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.11 via Frontend Transport; Tue, 13 Dec 2022 14:51:48 +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 AM7EUR03FT048.mail.protection.outlook.com (100.127.140.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5901.21 via Frontend Transport; Tue, 13 Dec 2022 14:51:48 +0000 Received: ("Tessian outbound 73ab5f36653e:v130"); Tue, 13 Dec 2022 14:51:48 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 6aad165a6e231f7b X-CR-MTA-TID: 64aa7808 Received: from a395ca8fab4d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9337A7DD-D5D5-416D-B96D-E568D4F232FB.1; Tue, 13 Dec 2022 14:51:41 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a395ca8fab4d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 13 Dec 2022 14:51:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y80KzjiKvwKD78wXMkcsKTZcgse1El6bCyw4/EwIfg9ZiCdgV/xaWc+uNVpKewoAYYeCsa4RHGm50ROcfCOVUEfsBhp7r70F28q56cspE8gi7bTOJfC9176A6OznkDerfeXo/8bIrjl/kZS3/US6VDoDVQrL1WOPARi5n1JNmOuMYPJfX5qlpdz9Gi1GKQy0xmwsN2OoMw1M04tGIQOhocB24x8sO5ZIpmG28vgrs0YAFbcpA6Va5LjJqxHXH7OaNrjLqm1WavIBTt0bDUUZDIB8aHH7fDMaBom9jAfJyDAHE1svRSalr8tm7zl7+cvaiP6P8sMdXlv7PzNpytvl6w== 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=tZbLe7zoFRCUCtNmsrP4xCTHyZdjj6q+l1jciQB19cU=; b=DcbSJCuyEU9UlhBpZA8L8izrjp52rDZVJyr1yV4u6JAXetKjoeh1J8yI4C8r8q8qcQ3FqASz6R5N78DOlS+Y8UIYyONtXpeJsmgUOiF0Ch2HPxY9Ns2zvwb/i8/+jwLrOFJPpjQ6vS5oauqN7N5BQQOB+S0wk2z4Za7p4B4pCbuK/QFm2F98QHKIF+7rBoUOY3sf10Kfhp0njpThLNk/PUC/NLdSnbk0jMHPp1EeMaOJkxZqMOCt+B24ZJA2xYKsCnoH2YIKMuBRYoAYUQsZdMFcNr9EJm2qFFGk4mSL531ca/Wzr+4d64LFysbuTEtgws4Cb03BDqiI3D2jJi0vRg== 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=tZbLe7zoFRCUCtNmsrP4xCTHyZdjj6q+l1jciQB19cU=; b=v/P71LvEJL03lFGnKaH0QBsEvGCE9C6P+tQbWSvvliP5McuutxtbEbfwlgiYqYhZ2sR/Xml6aERYr7dkEII8fvrg5SKNwwZ//yVJj9uApQ9SJ6MlN3pb9PIbplIULUMltpsff1OHNer0wN2jyTd1HkEWxTn1HGx0/ISi9LyXq94= Received: from AM6P194CA0045.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::22) by PR3PR08MB5801.eurprd08.prod.outlook.com (2603:10a6:102:81::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.10; Tue, 13 Dec 2022 14:51:38 +0000 Received: from AM7EUR03FT018.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:84:cafe::ee) by AM6P194CA0045.outlook.office365.com (2603:10a6:209:84::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.19 via Frontend Transport; Tue, 13 Dec 2022 14:51:38 +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 AM7EUR03FT018.mail.protection.outlook.com (100.127.140.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5901.21 via Frontend Transport; Tue, 13 Dec 2022 14:51:38 +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; Tue, 13 Dec 2022 14:51:37 +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; Tue, 13 Dec 2022 14:51:37 +0000 Date: Tue, 13 Dec 2022 14:51:28 +0000 Message-ID: From: "Victor L. Do Nascimento" To: CC: Subject: [PATCH] libc: arm: fix setjmp abi non-conformance MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT018:EE_|PR3PR08MB5801:EE_|AM7EUR03FT048:EE_|GVXPR08MB7704:EE_ X-MS-Office365-Filtering-Correlation-Id: 803428fd-6e35-430f-42ce-08dadd198fcd 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: Z9nD5KJFhqoja6IQdlNZbMOC7YQTJsXdPKcvWoWkQfzvEo3KTsrfEQCf25YZH4uFSX+f5GKa1H6nKNsdt4gjtOGlviTsMDtzHZzLIVzDCoAsxxtsGhgd0hv8VpnKWXAVoOvL+n2xQa8smPH68hIiAufWB61xHLSu6LaPLN0zbkW6xl+SSXtDi1qYnpjffBubz+Ox6ANi2ku7JLUloy2hOBEf1npXuouZVbHfMrH9d9Dz0qianYjUW+q6Kl1tcJ2QLHSSVDEBlTuR4v43FXO6dACMIrVryrahqDxo9aOjqU2ieeccfl+0TexTd6X8YD7DNAgQfLIP4IIC2kxDV6M9ukB7bPh7A1jA7hUGCir5oruh9YDMY9qSvNlyYgqrDQThts/OmukThJg3ZQ9i/3F7iPHo+tO22AMbBtgrkm2WjptOurJqGIeIiOUkqpn7oaSFPB2oE6Fw3W82a12ktnCvtlWUDVahOEPdcgwmjQ1llUvgKINYZRR72YPWk8Q+SiKPVBv9puXFUAcMIRt0hjaS4VpQNJ2pCA4p7HJeGw47pAydZkrHH9/oG/IODs9+jFYHM/N8htFgmG6tGfpSYn3/saRI8FTzGGG0MNt3Mh5R8EGdTjsycyTwPdEG3JMeG6uFRfFe8StAy8hNGTJLm9YCWMyWp7g1kG3Iuyp0BpyhFjxVI1cXCkJFZpxxM1yIWpbR4SIEN7YP7qcPVWhOmyeAT738whca9DFgnnBrd8IIyk1wx9pT6Z3/osOSJwXjlwUOAVlZXT0WYj5q3lDm3L/Pkj5ZMkYUnfr4ix9jy4EHQnW61DJ6vArQPWMBAJKyRNO8 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:(13230022)(4636009)(346002)(376002)(396003)(136003)(39860400002)(451199015)(46966006)(40470700004)(36840700001)(2906002)(41300700001)(8936002)(8676002)(70586007)(70206006)(4326008)(5660300002)(36756003)(6916009)(186003)(36860700001)(316002)(86362001)(478600001)(26005)(966005)(6666004)(4743002)(426003)(40460700003)(83380400001)(47076005)(336012)(82310400005)(81166007)(40480700001)(356005)(2616005)(82740400003)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5801 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 5a1b2d29-e7a5-42f6-a1dc-08dadd198a09 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: B9Y5A7CUWoHdwm/qoYo5qC0NBtNrABXQDv7VIBGtg8g6lG7AUwvU/WxADvmTUV41W2apD5HIZBcBYr0gNKmyTNFdJ1gsPjMpcpbLAZ+jdMAnGo7IqThp7VCETasKEXap7W4v/y9361Opl4cAo5H1OwXph+3DlbhqCnL1JSvpXZqlVV1i+9KI3Qcy+ZrS/pKPoq3VGutEDo2mVp4d8RF8NCChHTwXJy/oZ2/EKCWm8DeSlVzStU8vBQFKEFqvvj/04GGoBkC63mlWDLFNKdjNntAUtTQyVTywNr00ev4nRIeo3KPD1cLKs0s1WoF9jdN4GzKZqo+NDQjEQ6SvURScT6A9WHepVrsrIPC+j1P/u6e1Z8tMzqEIYjmoxC34pUnjaG4dN3I0lkpnN4mRHi3JHiUD5GQjYe3chYw44Ze9BuizNb0B4QY/nGGOXSXhLi+mZPEquJp2cXCRzT6sj2LgB5Eb2hOFA4aiKhKcBe6dfKpK1CgdX43j+N66TctCGbuBFWTXwaJjKxCKuFrTwW0YIthPHyNvP0UAZbJ8F3LEewjgBSGG0+FS8n1r+IUzTx0kii3Ic/7RVIvWysoED6A0XqXn13B34THqutu7XuP0PBEVLUX54OoWpGvKcIkfbB5zCpx0KdCbDmU3yUKxOKK0bItCyAIF2qevhmPzb58t9OMinL+QyCjVLbL0yr31+W9W8eP8EpDPqBje/kJ2ni5xvENTwDyWEka5DoaGIsD3PURYgDv9PDubWteo9FEiiBraUpIU7riJai8nOMvJ0xuc3A== 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:(13230022)(4636009)(346002)(39860400002)(376002)(136003)(396003)(451199015)(46966006)(36840700001)(40470700004)(81166007)(82740400003)(82310400005)(86362001)(966005)(6916009)(316002)(2906002)(26005)(8676002)(47076005)(426003)(83380400001)(70206006)(40460700003)(8936002)(4326008)(40480700001)(36860700001)(41300700001)(5660300002)(186003)(70586007)(4743002)(478600001)(6666004)(336012)(2616005)(36756003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2022 14:51:48.2236 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 803428fd-6e35-430f-42ce-08dadd198fcd 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: AM7EUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB7704 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,GIT_PATCH_0,KAM_ASCII_DIVIDERS,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: As per the arm Procedure Call Standard for the Arm Architecture section 6.1.2 [1], VFP registers s16-s31 (d8-d15, q4-q7) must be preserved across subroutine calls. The current setjmp/longjmp implementations preserve only the core registers, with the jump buffer size too small to store the required co-processor registers. In accordance with the C Library ABI for the Arm Architecture section 6.11 [2], this patch sets _JBTYPE to long long adjusting _JBLEN to 20. It also emits vfp load/store instructions depending on architectural support, predicated at compile time on ACLE feature-test macros. [1] https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst [2] https://github.com/ARM-software/abi-aa/blob/main/clibabi32/clibabi32.rst --- COPYING.NEWLIB | 2 +- newlib/libc/include/machine/setjmp.h | 8 ++- newlib/libc/machine/arm/setjmp.S | 74 +++++++++++++++------------- 3 files changed, 46 insertions(+), 38 deletions(-) diff --git a/COPYING.NEWLIB b/COPYING.NEWLIB index 2d1473639..d54ed293d 100644 --- a/COPYING.NEWLIB +++ b/COPYING.NEWLIB @@ -762,7 +762,7 @@ SUCH DAMAGE. (35) - Arm Ltd - Copyright (c) 2009-2018 Arm Ltd + Copyright (c) 2009-2022 Arm Ltd All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/newlib/libc/include/machine/setjmp.h b/newlib/libc/include/machine/setjmp.h index 53878a03d..29b76cec1 100644 --- a/newlib/libc/include/machine/setjmp.h +++ b/newlib/libc/include/machine/setjmp.h @@ -12,9 +12,13 @@ _BEGIN_STD_C #if defined(__arm__) || defined(__thumb__) /* * All callee preserved registers: - * v1 - v7, fp, ip, sp, lr, f4, f5, f6, f7 + * core registers: + * r4 - r10, fp, sp, lr + * VFP registers (architectural support dependent): + * d8 - d15 */ -#define _JBLEN 23 +#define _JBLEN 20 +#define _JBTYPE long long #endif #if defined(__aarch64__) diff --git a/newlib/libc/machine/arm/setjmp.S b/newlib/libc/machine/arm/setjmp.S index 21d6ff9e7..4cf0a8e3f 100644 --- a/newlib/libc/machine/arm/setjmp.S +++ b/newlib/libc/machine/arm/setjmp.S @@ -27,34 +27,34 @@ The interworking scheme expects functions to use a BX instruction to return control to their parent. Since we need this code to work in both interworked and non-interworked environments as well as with - older processors which do not have the BX instruction we do the + older processors which do not have the BX instruction we do the following: Test the return address. If the bottom bit is clear perform an "old style" function exit. (We know that we are in ARM mode and returning to an ARM mode caller). Otherwise use the BX instruction to perform the function exit. - We know that we will never attempt to perform the BX instruction on - an older processor, because that kind of processor will never be - interworked, and a return address with the bottom bit set will never + We know that we will never attempt to perform the BX instruction on + an older processor, because that kind of processor will never be + interworked, and a return address with the bottom bit set will never be generated. In addition, we do not actually assemble the BX instruction as this would require us to tell the assembler that the processor is an ARM7TDMI and it would store this information in the binary. We want this binary to be able to be linked with binaries compiled for older processors however, so - we do not want such information stored there. + we do not want such information stored there. If we are running using the APCS-26 convention however, then we never - test the bottom bit, because this is part of the processor status. - Instead we just do a normal return, since we know that we cannot be + test the bottom bit, because this is part of the processor status. + Instead we just do a normal return, since we know that we cannot be returning to a Thumb caller - the Thumb does not support APCS-26. - - Function entry is much simpler. If we are compiling for the Thumb we + + Function entry is much simpler. If we are compiling for the Thumb we just switch into ARM mode and then drop through into the rest of the function. The function exit code will take care of the restore to Thumb mode. - + For Thumb-2 do everything in Thumb mode. */ .syntax unified @@ -115,15 +115,15 @@ SYM (longjmp): #else #define RET tst lr, #1; \ moveq pc, lr ; \ -.word 0xe12fff1e /* bx lr */ +.inst 0xe12fff1e /* bx lr */ #endif #ifdef __thumb2__ -.macro COND where when +.macro COND where when i\where \when .endm #else -.macro COND where when +.macro COND where when .endm #endif @@ -140,7 +140,7 @@ SYM (longjmp): .macro PROLOGUE name .code 16 bx pc - nop + nop .code 32 SYM (.arm_start_of.\name): .endm @@ -149,7 +149,7 @@ SYM (.arm_start_of.\name): .macro PROLOGUE name .endm #endif - + .macro FUNC_START name .text .align 2 @@ -164,61 +164,65 @@ SYM (\name): RET SIZE (\name) .endm - + /* -------------------------------------------------------------------- - int setjmp (jmp_buf); + int setjmp (jmp_buf); -------------------------------------------------------------------- */ - + FUNC_START setjmp /* Save all the callee-preserved registers into the jump buffer. */ #ifdef __thumb2__ mov ip, sp - stmea a1!, { v1-v7, fp, ip, lr } + stmia r0!, { r4-r10, fp, ip, lr } #else - stmea a1!, { v1-v7, fp, ip, sp, lr } + stmia r0!, { r4-r10, fp, sp, lr } +#endif +#if defined __ARM_FP || defined __ARM_FEATURE_MVE + vstm r0, { d8-d15 } #endif - + #if 0 /* Simulator does not cope with FP instructions yet. */ #ifndef __SOFTFP__ /* Save the floating point registers. */ sfmea f4, 4, [a1] #endif -#endif +#endif /* When setting up the jump buffer return 0. */ - mov a1, #0 + mov r0, #0 FUNC_END setjmp - + /* -------------------------------------------------------------------- volatile void longjmp (jmp_buf, int); -------------------------------------------------------------------- */ - + FUNC_START longjmp /* If we have stack extension code it ought to be handled here. */ - + /* Restore the registers, retrieving the state when setjmp() was called. */ #ifdef __thumb2__ - ldmfd a1!, { v1-v7, fp, ip, lr } + ldmia r0!, { r4-r10, fp, ip, lr } mov sp, ip #else - ldmfd a1!, { v1-v7, fp, ip, sp, lr } + ldmia r0!, { r4-r10, fp, sp, lr } +#endif +#if defined __ARM_FP || defined __ARM_FEATURE_MVE + vldm r0, { d8-d15 } #endif - + #if 0 /* Simulator does not cope with FP instructions yet. */ #ifndef __SOFTFP__ /* Restore floating point registers as well. */ lfmfd f4, 4, [a1] #endif -#endif +#endif /* Put the return value into the integer result register. - But if it is zero then return 1 instead. */ - movs a1, a2 -#ifdef __thumb2__ + But if it is zero then return 1 instead. */ + movs r0, r1 it eq -#endif - moveq a1, #1 + moveq r0, #1 FUNC_END longjmp #endif -- 2.36.1