authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-04-25 14:44:42+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-04-25 21:54:48+02:00
logd3ee286511d5b4525498c289f9af379c94c5306c
tree6e52fe53265f8939775c07e67cb77dfe4e60f3ef
parent1bd9f3f4f272e830d15b6207f21eb5d68f7639b0
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

test: add loongarch64-linux-muslsf to test-c-abi matrix


3 files changed, 14 insertions(+), 1 deletions(-)

test/c_abi/cfuncs.c+4
...@@ -64,6 +64,10 @@ static void assert_or_panic(bool ok) {...@@ -64,6 +64,10 @@ static void assert_or_panic(bool ok) {
64# define ZIG_NO_COMPLEX64# define ZIG_NO_COMPLEX
65#endif65#endif
6666
67#if defined(__loongarch__) && defined(__loongarch_soft_float)
68# define ZIG_NO_COMPLEX
69#endif
70
67#ifdef __powerpc__71#ifdef __powerpc__
68# define ZIG_NO_COMPLEX72# define ZIG_NO_COMPLEX
69#endif73#endif
test/c_abi/main.zig+3-1
...@@ -187,7 +187,8 @@ extern fn c_cmultd(a: ComplexDouble, b: ComplexDouble) ComplexDouble;...@@ -187,7 +187,8 @@ extern fn c_cmultd(a: ComplexDouble, b: ComplexDouble) ComplexDouble;
187const complex_abi_compatible = builtin.cpu.arch != .x86 and !builtin.cpu.arch.isMIPS() and187const complex_abi_compatible = builtin.cpu.arch != .x86 and !builtin.cpu.arch.isMIPS() and
188 !builtin.cpu.arch.isArm() and !builtin.cpu.arch.isPowerPC32() and !builtin.cpu.arch.isRISCV() and188 !builtin.cpu.arch.isArm() and !builtin.cpu.arch.isPowerPC32() and !builtin.cpu.arch.isRISCV() and
189 builtin.cpu.arch != .hexagon and189 builtin.cpu.arch != .hexagon and
190 builtin.cpu.arch != .s390x;190 builtin.cpu.arch != .s390x and
191 !(builtin.cpu.arch.isLoongArch() and builtin.abi.float() == .soft);
191192
192test "C ABI complex float" {193test "C ABI complex float" {
193 if (!complex_abi_compatible) return error.SkipZigTest;194 if (!complex_abi_compatible) return error.SkipZigTest;
...@@ -5611,6 +5612,7 @@ test "C ABI pointer sized float struct" {...@@ -5611,6 +5612,7 @@ test "C ABI pointer sized float struct" {
5611 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;5612 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
5612 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;5613 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
5613 if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest;5614 if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest;
5615 if (builtin.cpu.arch.isLoongArch() and builtin.abi.float() == .soft) return error.SkipZigTest;
5614 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;5616 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
56155617
5616 c_ptr_size_float_struct(.{ .x = 1, .y = 2 });5618 c_ptr_size_float_struct(.{ .x = 1, .y = 2 });
test/tests.zig+7
...@@ -1764,6 +1764,13 @@ const c_abi_targets = blk: {...@@ -1764,6 +1764,13 @@ const c_abi_targets = blk: {
1764 .abi = .musl,1764 .abi = .musl,
1765 },1765 },
1766 },1766 },
1767 .{
1768 .target = .{
1769 .cpu_arch = .loongarch64,
1770 .os_tag = .linux,
1771 .abi = .muslsf,
1772 },
1773 },
17671774
1768 .{1775 .{
1769 .target = .{1776 .target = .{