authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-04-29 00:34:01+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2025-04-29 00:34:01+02:00
log399da543e54a439b0bae396dadfb77bc339069d4
tree3f4901b3bc0b5c616107db728fe3e19171f3297e
parent8facd99d41b1290f9b29ec22c9dcce680d972810
parent12f56b874015be2b10ce3a279f146cba5d61c9f7
signaturebadge-check Signed by PGP key B5690EEEBB952194

Merge pull request #23720 from alexrp/sparc-stuff


4 files changed, 12 insertions(+), 0 deletions(-)

lib/compiler_rt/sqrt.zig+6
......@@ -13,6 +13,8 @@ comptime {
1313 @export(&__sqrtx, .{ .name = "__sqrtx", .linkage = common.linkage, .visibility = common.visibility });
1414 if (common.want_ppc_abi) {
1515 @export(&sqrtq, .{ .name = "sqrtf128", .linkage = common.linkage, .visibility = common.visibility });
16 } else if (common.want_sparc_abi) {
17 @export(&_Qp_sqrt, .{ .name = "_Qp_sqrt", .linkage = common.linkage, .visibility = common.visibility });
1618 }
1719 @export(&sqrtq, .{ .name = "sqrtq", .linkage = common.linkage, .visibility = common.visibility });
1820 @export(&sqrtl, .{ .name = "sqrtl", .linkage = common.linkage, .visibility = common.visibility });
......@@ -242,6 +244,10 @@ pub fn sqrtq(x: f128) callconv(.c) f128 {
242244 return sqrt(@floatCast(x));
243245}
244246
247fn _Qp_sqrt(c: *f128, a: *f128) callconv(.c) void {
248 c.* = sqrt(@floatCast(a.*));
249}
250
245251pub fn sqrtl(x: c_longdouble) callconv(.c) c_longdouble {
246252 switch (@typeInfo(c_longdouble).float.bits) {
247253 16 => return __sqrth(x),
lib/std/os/linux/sparc64.zig+1
......@@ -304,6 +304,7 @@ pub const msghdr_const = extern struct {
304304
305305pub const off_t = i64;
306306pub const ino_t = u64;
307pub const time_t = isize;
307308pub const mode_t = u32;
308309pub const dev_t = usize;
309310pub const nlink_t = u32;
test/behavior/var_args.zig+4
......@@ -106,6 +106,7 @@ test "simple variadic function" {
106106 }
107107 if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .windows) return error.SkipZigTest; // TODO
108108 if (builtin.cpu.arch == .s390x and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21350
109 if (builtin.cpu.arch.isSPARC() and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/23718
109110
110111 const S = struct {
111112 fn simple(...) callconv(.c) c_int {
......@@ -200,6 +201,7 @@ test "variadic functions" {
200201 }
201202 if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .windows) return error.SkipZigTest; // TODO
202203 if (builtin.cpu.arch == .s390x and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21350
204 if (builtin.cpu.arch.isSPARC() and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/23718
203205
204206 const S = struct {
205207 fn printf(list_ptr: *std.ArrayList(u8), format: [*:0]const u8, ...) callconv(.c) void {
......@@ -245,6 +247,7 @@ test "copy VaList" {
245247 }
246248 if (builtin.cpu.arch == .x86_64 and builtin.os.tag == .windows) return error.SkipZigTest; // TODO
247249 if (builtin.cpu.arch == .s390x and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21350
250 if (builtin.cpu.arch.isSPARC() and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/23718
248251
249252 const S = struct {
250253 fn add(count: c_int, ...) callconv(.c) c_int {
......@@ -282,6 +285,7 @@ test "unused VaList arg" {
282285 return error.SkipZigTest; // TODO
283286 }
284287 if (builtin.cpu.arch == .s390x and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21350
288 if (builtin.cpu.arch.isSPARC() and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/23718
285289
286290 const S = struct {
287291 fn thirdArg(dummy: c_int, ...) callconv(.c) c_int {
test/behavior/vector.zig+1
......@@ -765,6 +765,7 @@ test "vector reduce operation" {
765765 if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArm()) return error.SkipZigTest;
766766 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
767767 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21091
768 if (builtin.cpu.arch.isSPARC()) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/23719
768769
769770 const S = struct {
770771 fn testReduce(comptime op: std.builtin.ReduceOp, x: anytype, expected: anytype) !void {