boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

aarch64-stdarg-array.after (628B)


      1 #elif defined(__aarch64__)
      2 /* Match glibc/musl/x86_64 ABI: va_list is an array-of-1 struct so it
      3  * decays to pointer at the use site. Without this, passing va_list by
      4  * value to a non-variadic helper (the vfprintf shape) tries to copy
      5  * the 24-byte struct and the codegen path asserts. */
      6 typedef struct {
      7     void *__stack;
      8     void *__gr_top;
      9     void *__vr_top;
     10     int   __gr_offs;
     11     int   __vr_offs;
     12 } __va_list_struct;
     13 typedef __va_list_struct va_list[1];
     14 #define va_start(ap, last) __va_start(ap, last)
     15 #define va_arg(ap, type) __va_arg(ap, type)
     16 #define va_end(ap)
     17 #define va_copy(dest, src) ((dest)[0] = (src)[0])