kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

abi_apple_x64.c (1131B)


      1 /* Apple x86_64 (Darwin) ABI dispatch.
      2  *
      3  * Darwin x86_64 ABI is identical to Linux SysV x86_64; this seam exists
      4  * so future divergences (alignment, struct passing edge cases) have a
      5  * place to live.  Today the vtable thinly delegates to the SysV
      6  * classifier and reuses its va_list_info. */
      7 
      8 #include "abi/abi_internal.h"
      9 #include "core/core.h"
     10 
     11 extern const ABIVtable sysv_x64_vtable;
     12 
     13 static ABIFuncInfo* apple_x64_compute_func_info(TargetABI* a, KitCgTypeId fn) {
     14   return sysv_x64_vtable.compute_func_info(a, fn);
     15 }
     16 
     17 const ABIVtable apple_x64_vtable = {
     18     .compute_func_info = apple_x64_compute_func_info,
     19     .va_list_info = {24, 8, ABI_SC_VOID, 0, 0, 0},
     20     .va_list_layout = {.type = {24, 8, ABI_SC_VOID, 0, 0, 0},
     21                        .kind = ABI_VA_LIST_SYSV_X64,
     22                        .stack_offset = 8,
     23                        .gr_top_offset = 16,
     24                        .gr_offs_offset = 0,
     25                        .vr_offs_offset = 4,
     26                        .gp_reg_count = 6,
     27                        .fp_reg_count = 8,
     28                        .gp_slot_size = 8,
     29                        .fp_slot_size = 16},
     30 };