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) {
6464# define ZIG_NO_COMPLEX
6565#endif
6666
67#if defined(__loongarch__) && defined(__loongarch_soft_float)
68# define ZIG_NO_COMPLEX
69#endif
70
6771#ifdef __powerpc__
6872# define ZIG_NO_COMPLEX
6973#endif
test/c_abi/main.zig+3-1
......@@ -187,7 +187,8 @@ extern fn c_cmultd(a: ComplexDouble, b: ComplexDouble) ComplexDouble;
187187const complex_abi_compatible = builtin.cpu.arch != .x86 and !builtin.cpu.arch.isMIPS() and
188188 !builtin.cpu.arch.isArm() and !builtin.cpu.arch.isPowerPC32() and !builtin.cpu.arch.isRISCV() and
189189 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
192193test "C ABI complex float" {
193194 if (!complex_abi_compatible) return error.SkipZigTest;
......@@ -5611,6 +5612,7 @@ test "C ABI pointer sized float struct" {
56115612 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
56125613 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
56135614 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;
56145616 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
56155617
56165618 c_ptr_size_float_struct(.{ .x = 1, .y = 2 });
test/tests.zig+7
......@@ -1764,6 +1764,13 @@ const c_abi_targets = blk: {
17641764 .abi = .musl,
17651765 },
17661766 },
1767 .{
1768 .target = .{
1769 .cpu_arch = .loongarch64,
1770 .os_tag = .linux,
1771 .abi = .muslsf,
1772 },
1773 },
17671774
17681775 .{
17691776 .target = .{