From 4a73b8cbb3cf1a7047da445790d39eef8474c652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Thu, 28 Nov 2024 18:59:26 +0100 Subject: [PATCH] std.builtin: Add VaListXtensa. --- lib/std/builtin.zig | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/std/builtin.zig b/lib/std/builtin.zig index ed18965e50..52fe2c5e23 100644 --- a/lib/std/builtin.zig +++ b/lib/std/builtin.zig @@ -892,6 +892,14 @@ pub const VaListX86_64 = extern struct { reg_save_area: *anyopaque, }; +/// This data structure is used by the Zig language code generation and +/// therefore must be kept in sync with the compiler implementation. +pub const VaListXtensa = extern struct { + __va_stk: *c_int, + __va_reg: *c_int, + __va_ndx: c_int, +}; + /// This data structure is used by the Zig language code generation and /// therefore must be kept in sync with the compiler implementation. pub const VaList = switch (builtin.cpu.arch) { @@ -925,6 +933,7 @@ pub const VaList = switch (builtin.cpu.arch) { .windows => @compileError("disabled due to miscompilations"), // *u8, else => VaListX86_64, }, + .xtensa => VaListXtensa, else => @compileError("VaList not supported for this target yet"), };