authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-11-18 01:35:56+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-11-19 01:42:45+01:00
log692c798303bc1ceb031ddb26a0d79a49d3056b66
tree6e37dfcfe08c3d66510faac3d3cf183ccc58413a
parentae0cc8c0659d95a30c6436abfe8c7ca862f570a3
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

test: disable a bunch of failing C ABI tests on s390x


2 files changed, 59 insertions(+), 10 deletions(-)

test/c_abi/cfuncs.c+15-9
......@@ -77,6 +77,10 @@ static void assert_or_panic(bool ok) {
7777# define ZIG_NO_COMPLEX
7878#endif
7979
80#ifdef __s390x__
81# define ZIG_NO_COMPLEX
82#endif
83
8084#ifdef __x86_64__
8185#define ZIG_NO_RAW_F16
8286#endif
......@@ -2728,7 +2732,7 @@ void run_c_tests(void) {
27282732 }
27292733#endif
27302734
2731#if !defined(ZIG_PPC32) && !defined(__hexagon__)
2735#if !defined(ZIG_PPC32) && !defined(__hexagon__) && !defined(__s390x__)
27322736 {
27332737 struct Struct_u64_u64 s = zig_ret_struct_u64_u64();
27342738 assert_or_panic(s.a == 1);
......@@ -2807,7 +2811,7 @@ void run_c_tests(void) {
28072811
28082812#if !defined __i386__ && !defined __arm__ && !defined __aarch64__ && \
28092813 !defined __powerpc__ && !defined ZIG_RISCV64 && !defined(__loongarch__) && \
2810 !defined(__mips64__) && !defined(__hexagon__)
2814 !defined(__mips64__) && !defined(__hexagon__) && !defined(__s390x__)
28112815 {
28122816 struct SmallStructInts s = {1, 2, 3, 4};
28132817 zig_small_struct_ints(s);
......@@ -2816,7 +2820,7 @@ void run_c_tests(void) {
28162820
28172821#if !defined __arm__ && !defined __aarch64__ && \
28182822 !defined __powerpc__ && !defined ZIG_RISCV64 && !defined(__loongarch__) && \
2819 !defined(__mips64__) && !defined(__hexagon__)
2823 !defined(__mips64__) && !defined(__hexagon__) && !defined(__s390x__)
28202824 {
28212825 struct MedStructInts s = {1, 2, 3};
28222826 zig_med_struct_ints(s);
......@@ -2843,7 +2847,7 @@ void run_c_tests(void) {
28432847
28442848#if !defined __i386__ && !defined __arm__ && \
28452849 !defined ZIG_PPC32 && !defined _ARCH_PPC64 && !defined(__loongarch__) && \
2846 !defined(__mips64__) && !defined(__hexagon__)
2850 !defined(__mips64__) && !defined(__hexagon__) && !defined(__s390x__)
28472851 {
28482852 struct SplitStructInts s = {1234, 100, 1337};
28492853 zig_split_struct_ints(s);
......@@ -2851,7 +2855,7 @@ void run_c_tests(void) {
28512855#endif
28522856
28532857#if !defined __arm__ && !defined ZIG_PPC32 && !defined _ARCH_PPC64 && !defined(__loongarch__) && \
2854 !defined(__mips64__) && !defined(__hexagon__)
2858 !defined(__mips64__) && !defined(__hexagon__) && !defined(__s390x__)
28552859 {
28562860 struct MedStructMixed s = {1234, 100.0f, 1337.0f};
28572861 zig_med_struct_mixed(s);
......@@ -2860,14 +2864,15 @@ void run_c_tests(void) {
28602864
28612865#if !defined __i386__ && !defined __arm__ && \
28622866 !defined ZIG_PPC32 && !defined _ARCH_PPC64 && !defined(__loongarch__) && \
2863 !defined(__mips64__) && !defined(__hexagon__)
2867 !defined(__mips64__) && !defined(__hexagon__) && !defined(__s390x__)
28642868 {
28652869 struct SplitStructMixed s = {1234, 100, 1337.0f};
28662870 zig_split_struct_mixed(s);
28672871 }
28682872#endif
28692873
2870#if !defined(__powerpc__) && !defined(__loongarch__) && !defined(__mips64__) && !defined(__hexagon__)
2874#if !defined(__powerpc__) && !defined(__loongarch__) && !defined(__mips64__) && !defined(__hexagon__) && \
2875 !defined(__s390x__)
28712876 {
28722877 struct BigStruct s = {30, 31, 32, 33, 34};
28732878 struct BigStruct res = zig_big_struct_both(s);
......@@ -2880,7 +2885,7 @@ void run_c_tests(void) {
28802885#endif
28812886
28822887#if !defined ZIG_PPC32 && !defined _ARCH_PPC64 && !defined(__loongarch__) && !defined(__mips64__) && \
2883 !defined(__hexagon__)
2888 !defined(__hexagon__) && !defined(__s390x__)
28842889 {
28852890 struct Rect r1 = {1, 21, 16, 4};
28862891 struct Rect r2 = {178, 189, 21, 15};
......@@ -2888,7 +2893,8 @@ void run_c_tests(void) {
28882893 }
28892894#endif
28902895
2891#if !defined ZIG_PPC32 && !defined(__loongarch__) && !defined(__mips64__) && !defined(__hexagon__)
2896#if !defined ZIG_PPC32 && !defined(__loongarch__) && !defined(__mips64__) && !defined(__hexagon__) && \
2897 !defined(__s390x__)
28922898 {
28932899 struct FloatRect r1 = {1, 21, 16, 4};
28942900 struct FloatRect r2 = {178, 189, 21, 15};
test/c_abi/main.zig+44-1
......@@ -186,7 +186,8 @@ extern fn c_cmultd(a: ComplexDouble, b: ComplexDouble) ComplexDouble;
186186
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
189 builtin.cpu.arch != .hexagon;
189 builtin.cpu.arch != .hexagon and
190 builtin.cpu.arch != .s390x;
190191
191192test "C ABI complex float" {
192193 if (!complex_abi_compatible) return error.SkipZigTest;
......@@ -330,6 +331,7 @@ test "C ABI struct u64 u64" {
330331 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
331332 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
332333 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
334 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
333335
334336 const s = c_ret_struct_u64_u64();
335337 try expect(s.a == 21);
......@@ -364,6 +366,7 @@ extern fn c_struct_f32(Struct_f32) void;
364366test "C ABI struct f32" {
365367 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
366368 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
369 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
367370
368371 const s = c_ret_struct_f32();
369372 try expect(s.a == 2.5);
......@@ -391,6 +394,7 @@ test "C ABI struct f64" {
391394 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
392395 if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest;
393396 if (builtin.cpu.arch == .riscv32) return error.SkipZigTest;
397 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
394398
395399 const s = c_ret_struct_f64();
396400 try expect(s.a == 2.5);
......@@ -422,6 +426,7 @@ test "C ABI struct {f32,f32} f32" {
422426 if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest;
423427 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
424428 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
429 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
425430
426431 const s = c_ret_struct_f32f32_f32();
427432 try expect(s.a.b == 1.0);
......@@ -455,6 +460,7 @@ test "C ABI struct f32 {f32,f32}" {
455460 if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest;
456461 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
457462 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
463 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
458464
459465 const s = c_ret_struct_f32_f32f32();
460466 try expect(s.a == 1.0);
......@@ -492,6 +498,7 @@ test "C ABI struct{u32,union{u32,struct{u32,u32}}}" {
492498 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
493499 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
494500 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
501 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
495502
496503 const s = c_ret_struct_u32_union_u32_u32u32();
497504 try expect(s.a == 1);
......@@ -512,6 +519,7 @@ test "C ABI struct i32 i32" {
512519 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
513520 if (builtin.cpu.arch == .riscv32) return error.SkipZigTest;
514521 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
522 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
515523
516524 const s: Struct_i32_i32 = .{
517525 .a = 1,
......@@ -544,6 +552,7 @@ test "C ABI big struct" {
544552 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
545553 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
546554 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
555 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
547556
548557 const s = BigStruct{
549558 .a = 1,
......@@ -572,6 +581,7 @@ test "C ABI big union" {
572581 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
573582 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
574583 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
584 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
575585
576586 const x = BigUnion{
577587 .a = BigStruct{
......@@ -607,6 +617,7 @@ test "C ABI medium struct of ints and floats" {
607617 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
608618 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
609619 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
620 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
610621
611622 const s = MedStructMixed{
612623 .a = 1234,
......@@ -642,6 +653,7 @@ test "C ABI small struct of ints" {
642653 if (builtin.cpu.arch == .aarch64_be) return error.SkipZigTest;
643654 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
644655 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
656 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
645657
646658 const s = SmallStructInts{
647659 .a = 1,
......@@ -677,6 +689,7 @@ test "C ABI medium struct of ints" {
677689 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
678690 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
679691 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
692 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
680693
681694 const s = MedStructInts{
682695 .x = 1,
......@@ -757,6 +770,7 @@ test "C ABI split struct of ints" {
757770 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
758771 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
759772 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
773 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
760774
761775 const s = SplitStructInt{
762776 .a = 1234,
......@@ -786,6 +800,7 @@ test "C ABI split struct of ints and floats" {
786800 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
787801 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
788802 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
803 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
789804
790805 const s = SplitStructMixed{
791806 .a = 1234,
......@@ -815,6 +830,7 @@ test "C ABI sret and byval together" {
815830 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
816831 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
817832 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
833 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
818834
819835 const s = BigStruct{
820836 .a = 1,
......@@ -869,6 +885,7 @@ test "C ABI structs of floats as parameter" {
869885 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
870886 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
871887 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
888 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
872889
873890 const v3 = Vector3{
874891 .x = 3.0,
......@@ -911,6 +928,7 @@ test "C ABI structs of ints as multiple parameters" {
911928 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
912929 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
913930 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
931 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
914932
915933 const r1 = Rect{
916934 .left = 1,
......@@ -950,6 +968,7 @@ test "C ABI structs of floats as multiple parameters" {
950968 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
951969 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
952970 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
971 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
953972
954973 const r1 = FloatRect{
955974 .left = 1,
......@@ -1065,6 +1084,7 @@ test "Struct with array as padding." {
10651084 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
10661085 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
10671086 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
1087 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
10681088
10691089 c_struct_with_array(.{ .a = 1, .padding = undefined, .b = 2 });
10701090
......@@ -1092,6 +1112,7 @@ test "Float array like struct" {
10921112 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
10931113 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
10941114 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
1115 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
10951116
10961117 c_float_array_struct(.{
10971118 .origin = .{
......@@ -1120,6 +1141,7 @@ test "small simd vector" {
11201141 if (builtin.cpu.arch == .x86) return error.SkipZigTest;
11211142 if (builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest;
11221143 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
1144 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
11231145
11241146 c_small_vec(.{ 1, 2 });
11251147
......@@ -1137,6 +1159,7 @@ test "medium simd vector" {
11371159 if (builtin.zig_backend == .stage2_x86_64 and !comptime builtin.cpu.has(.x86, .avx)) return error.SkipZigTest;
11381160 if (builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest;
11391161 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
1162 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
11401163
11411164 c_medium_vec(.{ 1, 2, 3, 4 });
11421165
......@@ -1185,6 +1208,7 @@ extern fn c_ret_vector_4_float() Vector4Float;
11851208test "float simd vectors" {
11861209 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
11871210 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
1211 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
11881212
11891213 {
11901214 c_vector_2_float(.{ 1.0, 2.0 });
......@@ -5470,6 +5494,7 @@ test "C ABI pointer sized float struct" {
54705494 if (builtin.cpu.arch.isRISCV()) return error.SkipZigTest;
54715495 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
54725496 if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest;
5497 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
54735498
54745499 c_ptr_size_float_struct(.{ .x = 1, .y = 2 });
54755500
......@@ -5494,6 +5519,7 @@ test "DC: Zig passes to C" {
54945519 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
54955520 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
54965521 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
5522 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
54975523 try expectOk(c_assert_DC(.{ .v1 = -0.25, .v2 = 15 }));
54985524}
54995525test "DC: Zig returns to C" {
......@@ -5501,6 +5527,7 @@ test "DC: Zig returns to C" {
55015527 if (builtin.cpu.arch.isRISCV()) return error.SkipZigTest;
55025528 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
55035529 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
5530 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
55045531 try expectOk(c_assert_ret_DC());
55055532}
55065533test "DC: C passes to Zig" {
......@@ -5509,6 +5536,7 @@ test "DC: C passes to Zig" {
55095536 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
55105537 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
55115538 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
5539 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
55125540 try expectOk(c_send_DC());
55135541}
55145542test "DC: C returns to Zig" {
......@@ -5516,6 +5544,7 @@ test "DC: C returns to Zig" {
55165544 if (builtin.cpu.arch.isRISCV()) return error.SkipZigTest;
55175545 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
55185546 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
5547 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
55195548 try expectEqual(DC{ .v1 = -0.25, .v2 = 15 }, c_ret_DC());
55205549}
55215550
......@@ -5543,12 +5572,14 @@ test "CFF: Zig passes to C" {
55435572 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
55445573 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
55455574 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
5575 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
55465576 try expectOk(c_assert_CFF(.{ .v1 = 39, .v2 = 0.875, .v3 = 1.0 }));
55475577}
55485578test "CFF: Zig returns to C" {
55495579 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
55505580 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
55515581 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
5582 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
55525583 try expectOk(c_assert_ret_CFF());
55535584}
55545585test "CFF: C passes to Zig" {
......@@ -5559,6 +5590,7 @@ test "CFF: C passes to Zig" {
55595590 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
55605591 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
55615592 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
5593 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
55625594
55635595 try expectOk(c_send_CFF());
55645596}
......@@ -5568,6 +5600,7 @@ test "CFF: C returns to Zig" {
55685600 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
55695601 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
55705602 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
5603 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
55715604 try expectEqual(CFF{ .v1 = 39, .v2 = 0.875, .v3 = 1.0 }, c_ret_CFF());
55725605}
55735606pub extern fn c_assert_CFF(lv: CFF) c_int;
......@@ -5594,12 +5627,14 @@ test "PD: Zig passes to C" {
55945627 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
55955628 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
55965629 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
5630 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
55975631 try expectOk(c_assert_PD(.{ .v1 = null, .v2 = 0.5 }));
55985632}
55995633test "PD: Zig returns to C" {
56005634 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
56015635 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
56025636 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
5637 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
56035638 try expectOk(c_assert_ret_PD());
56045639}
56055640test "PD: C passes to Zig" {
......@@ -5607,12 +5642,14 @@ test "PD: C passes to Zig" {
56075642 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
56085643 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
56095644 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
5645 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
56105646 try expectOk(c_send_PD());
56115647}
56125648test "PD: C returns to Zig" {
56135649 if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest;
56145650 if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest;
56155651 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
5652 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
56165653 try expectEqual(PD{ .v1 = null, .v2 = 0.5 }, c_ret_PD());
56175654}
56185655pub extern fn c_assert_PD(lv: PD) c_int;
......@@ -5646,6 +5683,7 @@ extern fn c_modify_by_ref_param(ByRef) ByRef;
56465683test "C function modifies by ref param" {
56475684 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
56485685 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
5686 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
56495687
56505688 const res = c_modify_by_ref_param(.{ .val = 1, .arr = undefined });
56515689 try expect(res.val == 42);
......@@ -5670,6 +5708,7 @@ test "C function that takes byval struct called via function pointer" {
56705708 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
56715709 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
56725710 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
5711 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
56735712
56745713 var fn_ptr = &c_func_ptr_byval;
56755714 _ = &fn_ptr;
......@@ -5702,6 +5741,7 @@ test "f16 struct" {
57025741 if (builtin.target.cpu.arch.isMIPS64()) return error.SkipZigTest;
57035742 if (builtin.target.cpu.arch.isPowerPC32()) return error.SkipZigTest;
57045743 if (builtin.cpu.arch.isArm() and builtin.mode != .Debug) return error.SkipZigTest;
5744 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
57055745
57065746 const a = c_f16_struct(.{ .a = 12 });
57075747 try expect(a.a == 34);
......@@ -5811,6 +5851,7 @@ test "Stdcall ABI structs" {
58115851 if (builtin.cpu.arch == .aarch64_be) return error.SkipZigTest;
58125852 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
58135853 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
5854 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
58145855
58155856 const res = stdcall_coord2(
58165857 .{ .x = 0x1111, .y = 0x2222 },
......@@ -5826,6 +5867,7 @@ test "Stdcall ABI big union" {
58265867 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
58275868 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
58285869 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
5870 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
58295871
58305872 const x = BigUnion{
58315873 .a = BigStruct{
......@@ -5900,6 +5942,7 @@ test "byval tail callsite attribute" {
59005942 if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest;
59015943 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
59025944 if (builtin.cpu.arch == .hexagon) return error.SkipZigTest;
5945 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
59035946
59045947 // Originally reported at https://github.com/ziglang/zig/issues/16290
59055948 // the bug was that the extern function had the byval attribute, but