diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-10-19 22:40:15 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-10-23 09:27:17 +0200 |
| commit | beb507a1edadb2829478d066b80ea62ed537157a (patch) | |
| tree | c6dabf5cecbc610b313b523bf8339ee05cec743d /lib/std/Target.zig | |
| parent | a1441943e41014cfbce3105c4cdd9d3e0d137e4f (diff) | |
| download | zig-beb507a1edadb2829478d066b80ea62ed537157a.tar.gz zig-beb507a1edadb2829478d066b80ea62ed537157a.zip | |
std.builtin: add CallingConvention.x86_64_x32
This was forgotten during the refactoring of std.builtin.CallingConvention. It
mirrors mips64_n32 for MIPS.
Diffstat (limited to 'lib/std/Target.zig')
| -rw-r--r-- | lib/std/Target.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/std/Target.zig b/lib/std/Target.zig index 20d37b8939..b99e2b366e 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -1787,6 +1787,7 @@ pub const Cpu = struct { => unreachable, .x86_64_sysv, + .x86_64_x32, .x86_64_win, .x86_64_regcall_v3_sysv, .x86_64_regcall_v4_win, @@ -3632,7 +3633,10 @@ pub fn cCallingConvention(target: *const Target) ?std.builtin.CallingConvention return switch (target.cpu.arch) { .x86_64 => switch (target.os.tag) { .windows, .uefi => .{ .x86_64_win = .{} }, - else => .{ .x86_64_sysv = .{} }, + else => switch (target.abi) { + .gnuabin32, .muslabin32 => .{ .x86_64_x32 = .{} }, + else => .{ .x86_64_sysv = .{} }, + }, }, .x86 => switch (target.os.tag) { .windows, .uefi => .{ .x86_win = .{} }, |
