[libc][arm] implement a basic setjmp/longjmp (#93220)

Note: our baremetal arm configuration compiles this as
`--target=arm-none-eabi`, so this code is built in -marm mode. It could be
smaller with `--target=armv7-none-eabi -mthumb`. The assembler is valid ARMv5,
or THUMB2, but not THUMB(1).
This commit is contained in:
Nick Desaulniers (paternity leave)
2024-06-20 08:16:48 -07:00
committed by GitHub
parent abad8455ab
commit f1ce6a465d
9 changed files with 178 additions and 7 deletions

View File

@@ -32,6 +32,9 @@ typedef struct {
#elif defined(__riscv_float_abi_single)
#error "__jmp_buf not available for your target architecture."
#endif
#elif defined(__arm__)
// r4, r5, r6, r7, r8, r9, r10, r11, r12, lr
long opaque[10];
#else
#error "__jmp_buf not available for your target architecture."
#endif