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

This commit is contained in:
Alex Rønne Petersen
2026-04-25 14:44:42 +02:00
parent 1bd9f3f4f2
commit d3ee286511
3 changed files with 14 additions and 1 deletions
+4
View File
@@ -64,6 +64,10 @@ static void assert_or_panic(bool ok) {
# define ZIG_NO_COMPLEX # define ZIG_NO_COMPLEX
#endif #endif
#if defined(__loongarch__) && defined(__loongarch_soft_float)
# define ZIG_NO_COMPLEX
#endif
#ifdef __powerpc__ #ifdef __powerpc__
# define ZIG_NO_COMPLEX # define ZIG_NO_COMPLEX
#endif #endif
+3 -1
View File
@@ -187,7 +187,8 @@ extern fn c_cmultd(a: ComplexDouble, b: ComplexDouble) ComplexDouble;
const complex_abi_compatible = builtin.cpu.arch != .x86 and !builtin.cpu.arch.isMIPS() and const complex_abi_compatible = builtin.cpu.arch != .x86 and !builtin.cpu.arch.isMIPS() and
!builtin.cpu.arch.isArm() and !builtin.cpu.arch.isPowerPC32() and !builtin.cpu.arch.isRISCV() and !builtin.cpu.arch.isArm() and !builtin.cpu.arch.isPowerPC32() and !builtin.cpu.arch.isRISCV() and
builtin.cpu.arch != .hexagon and builtin.cpu.arch != .hexagon and
builtin.cpu.arch != .s390x; builtin.cpu.arch != .s390x and
!(builtin.cpu.arch.isLoongArch() and builtin.abi.float() == .soft);
test "C ABI complex float" { test "C ABI complex float" {
if (!complex_abi_compatible) return error.SkipZigTest; if (!complex_abi_compatible) return error.SkipZigTest;
@@ -5611,6 +5612,7 @@ test "C ABI pointer sized float struct" {
if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest; if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest;
if (builtin.cpu.arch.isLoongArch() and builtin.abi.float() == .soft) return error.SkipZigTest;
if (builtin.cpu.arch == .s390x) return error.SkipZigTest; if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
c_ptr_size_float_struct(.{ .x = 1, .y = 2 }); c_ptr_size_float_struct(.{ .x = 1, .y = 2 });
+7
View File
@@ -1764,6 +1764,13 @@ const c_abi_targets = blk: {
.abi = .musl, .abi = .musl,
}, },
}, },
.{
.target = .{
.cpu_arch = .loongarch64,
.os_tag = .linux,
.abi = .muslsf,
},
},
.{ .{
.target = .{ .target = .{