zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 10083cc23e66a62a85d642faf7891b9ef3a6cdde (tree)
parent 787a2c9d7a5fd0f6aaa10a406cda5bd2f4eb33a7
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Fri, 19 Jun 2026 12:34:40 +0200

Merge pull request 'test: promote most x32/n32 module test targets to non-extra status' (#35836) from alexrp/zig:x32-n32-graduation into master

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/35836

Diffstat:
Mlib/libc/musl/src/thread/x32/clone.s | 2+-
Mlib/std/os/linux.zig | 8++++++--
Mlib/std/os/linux/x32.zig | 4++--
Mtest/tests.zig | 6------
4 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/lib/libc/musl/src/thread/x32/clone.s b/lib/libc/musl/src/thread/x32/clone.s @@ -8,7 +8,7 @@ __clone: mov %rdx,%rdi mov %r8,%rdx mov %r9,%r8 - mov 8(%rsp),%r10 + mov 8(%rsp),%r10d mov %r11,%r9 and $-16,%rsi sub $8,%rsi diff --git a/lib/std/os/linux.zig b/lib/std/os/linux.zig @@ -9438,7 +9438,7 @@ pub const timezone = extern struct { /// The timespec struct used by the kernel. pub const kernel_timespec = extern struct { sec: i64, - nsec: i64, + nsec: isize, /// For use with `utimensat` and `futimens`. pub const NOW: timespec = .{ @@ -9460,7 +9460,11 @@ pub const UTIME = struct { }; // https://github.com/ziglang/zig/issues/4726#issuecomment-2190337877 -pub const timespec = if (native_arch == .hexagon or native_arch == .riscv32) kernel_timespec else extern struct { +const use_kernel_timespec = native_arch == .hexagon or native_arch == .riscv32 or switch (native_abi) { + .gnux32, .muslx32, .x32 => true, + else => false, +}; +pub const timespec = if (use_kernel_timespec) kernel_timespec else extern struct { sec: isize, nsec: isize, }; diff --git a/lib/std/os/linux/x32.zig b/lib/std/os/linux/x32.zig @@ -130,7 +130,7 @@ pub fn clone() callconv(.naked) u32 { \\ mov %%rdx,%%rdi \\ mov %%r8,%%rdx \\ mov %%r9,%%r8 - \\ mov 8(%%rsp),%%r10 + \\ mov 8(%%rsp),%%r10d \\ mov %%r11,%%r9 \\ and $-16,%%rsi \\ sub $8,%%rsi @@ -175,7 +175,7 @@ pub fn restore_rt() callconv(.naked) noreturn { } } -pub const time_t = i32; +pub const time_t = i64; pub const VDSO = struct { pub const CGT_SYM = "__vdso_clock_gettime"; diff --git a/test/tests.zig b/test/tests.zig @@ -627,7 +627,6 @@ const module_test_targets = blk: { .os_tag = .linux, .abi = .abin32, }, - .extra_target = true, }, .{ .target = .{ @@ -654,7 +653,6 @@ const module_test_targets = blk: { .abi = .muslabin32, }, .link_libc = true, - .extra_target = true, }, .{ .target = .{ @@ -681,7 +679,6 @@ const module_test_targets = blk: { .abi = .gnuabin32, }, .link_libc = true, - .extra_target = true, }, .{ @@ -1167,7 +1164,6 @@ const module_test_targets = blk: { .os_tag = .linux, .abi = .x32, }, - .extra_target = true, }, .{ .target = .{ @@ -1204,7 +1200,6 @@ const module_test_targets = blk: { .abi = .muslx32, }, .link_libc = true, - .extra_target = true, }, .{ .target = .{ @@ -1231,7 +1226,6 @@ const module_test_targets = blk: { .abi = .gnux32, }, .link_libc = true, - .extra_target = true, }, // Darwin Targets