authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-09-26 16:01:43+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-09-26 16:20:15+02:00
log4c798bb0bd0043459f5b979ab3dfaee9a6f5ac97
tree245bbc56c70be7cebdf77f9c780008afe18d8906
parentbe2482146401d69e59b218443601c46838cd5ee5
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.builtin: define VaList as `struct { __ap: *anyopaque }` for Arm per AAPCS


1 files changed, 7 insertions(+), 4 deletions(-)

lib/std/builtin.zig+7-4
...@@ -844,6 +844,12 @@ pub const VaListAarch64 = extern struct {...@@ -844,6 +844,12 @@ pub const VaListAarch64 = extern struct {
844 __vr_offs: c_int,844 __vr_offs: c_int,
845};845};
846846
847/// This data structure is used by the Zig language code generation and
848/// therefore must be kept in sync with the compiler implementation.
849pub const VaListArm = extern struct {
850 __ap: *anyopaque,
851};
852
847/// This data structure is used by the Zig language code generation and853/// This data structure is used by the Zig language code generation and
848/// therefore must be kept in sync with the compiler implementation.854/// therefore must be kept in sync with the compiler implementation.
849pub const VaListHexagon = extern struct {855pub const VaListHexagon = extern struct {
...@@ -899,10 +905,7 @@ pub const VaList = switch (builtin.cpu.arch) {...@@ -899,10 +905,7 @@ pub const VaList = switch (builtin.cpu.arch) {
899 .stage2_llvm => @compileError("disabled due to miscompilations"),905 .stage2_llvm => @compileError("disabled due to miscompilations"),
900 },906 },
901 },907 },
902 .arm, .armeb, .thumb, .thumbeb => switch (builtin.os.tag) {908 .arm, .armeb, .thumb, .thumbeb => VaListArm,
903 .ios, .macos, .tvos, .watchos, .visionos => *u8,
904 else => *anyopaque,
905 },
906 .amdgcn => *u8,909 .amdgcn => *u8,
907 .avr => *anyopaque,910 .avr => *anyopaque,
908 .bpfel, .bpfeb => *anyopaque,911 .bpfel, .bpfeb => *anyopaque,