boot4-musl-shim-aarch64.h (911B)
1 /* boot4 va_list shim for compiling musl with tcc 0.9.26 on aarch64. 2 * 3 * Mirrors tcc 0.9.26's <stdarg.h> aarch64 block: __va_list_struct is 4 * the AAPCS register-save area (stack ptr, GR/VR tops, GR/VR offsets); 5 * va_list is an array-of-1 of that struct so it decays to pointer at 6 * use sites. tcc routes va_start/va_arg through the __va_start / 7 * __va_arg frontend intrinsics directly (no decomposition into 8 * size/align/type-tag like the x86_64 path). 9 * 10 * Untested — see docs/MUSL.md "multi-arch status". */ 11 12 typedef struct { 13 void *__stack; 14 void *__gr_top; 15 void *__vr_top; 16 int __gr_offs; 17 int __vr_offs; 18 } __va_list_struct; 19 20 typedef __va_list_struct __builtin_va_list[1]; 21 22 #define __builtin_va_start(ap, last) __va_start(ap, last) 23 #define __builtin_va_arg(ap, type) __va_arg(ap, type) 24 #define __builtin_va_copy(dest, src) ((dest)[0] = (src)[0]) 25 #define __builtin_va_end(ap)