From a28960cf6f8e7c616af957c77438b392e70800d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Mon, 19 Oct 2026 06:15:16 +0200 Subject: [PATCH] std.Target: fix cCallingConvention() to pick xtensa_windowed for abi != .call0 --- lib/std/Target.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/std/Target.zig b/lib/std/Target.zig index dbf6d4e4158fccf366d2ffe014689f59cf73a2b9..bd86bfed717eff627762242f78b55587e8a43fb9 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -3783,7 +3783,10 @@ pub fn cCallingConvention(target: *const Target) ?std.builtin.CallingConvention .sh, .sheb => .{ .sh_gnu = .{} }, .ve => .{ .ve_sysv = .{} }, .xcore => .{ .xcore_xs1 = .{} }, - .xtensa, .xtensaeb => .{ .xtensa_call0 = .{} }, + .xtensa, .xtensaeb => switch (target.abi) { + .call0 => .{ .xtensa_call0 = .{} }, + else => .{ .xtensa_windowed = .{} }, + }, .amdgcn => .{ .amdgcn_device = .{} }, .nvptx, .nvptx64 => .nvptx_device, .spirv32, .spirv64 => .spirv_device, -- 2.54.0