[PATCH] libc: arm: fix setjmp abi non-conformance

Mike Frysinger vapier@gentoo.org
Wed Jan 25 13:30:35 GMT 2023


On 13 Dec 2022 14:51, Victor L. Do Nascimento wrote:
> 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.

this breaks building with GCC 11 and older:
https://bugs.gentoo.org/891589#c7

i don't think it was intentional that this only work with GCC 12+, or if
it was, that we want such requirements.  GCC 12 is less than a year old.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/newlib/attachments/20230125/92822f1e/attachment.sig>


More information about the Newlib mailing list