| ... | @@ -11,7 +11,8 @@ const print = std.debug.print; | ... | @@ -11,7 +11,8 @@ const print = std.debug.print; |
| 11 | const expect = std.testing.expect; | 11 | const expect = std.testing.expect; |
| 12 | const expectEqual = std.testing.expectEqual; | 12 | const expectEqual = std.testing.expectEqual; |
| 13 | const have_i128 = builtin.cpu.arch != .x86 and !builtin.cpu.arch.isArm() and | 13 | const have_i128 = builtin.cpu.arch != .x86 and !builtin.cpu.arch.isArm() and |
| 14 | !builtin.cpu.arch.isMIPS() and !builtin.cpu.arch.isPowerPC32() and builtin.cpu.arch != .riscv32; | 14 | !builtin.cpu.arch.isMIPS() and !builtin.cpu.arch.isPowerPC32() and builtin.cpu.arch != .riscv32 and |
| | 15 | builtin.cpu.arch != .hexagon; |
| 15 | | 16 | |
| 16 | const have_f128 = builtin.cpu.arch.isWasm() or (builtin.cpu.arch.isX86() and !builtin.os.tag.isDarwin()); | 17 | const have_f128 = builtin.cpu.arch.isWasm() or (builtin.cpu.arch.isX86() and !builtin.os.tag.isDarwin()); |
| 17 | const have_f80 = builtin.cpu.arch.isX86(); | 18 | const have_f80 = builtin.cpu.arch.isX86(); |
| ... | @@ -183,7 +184,8 @@ extern fn c_cmultf(a: ComplexFloat, b: ComplexFloat) ComplexFloat; | ... | @@ -183,7 +184,8 @@ extern fn c_cmultf(a: ComplexFloat, b: ComplexFloat) ComplexFloat; |
| 183 | extern fn c_cmultd(a: ComplexDouble, b: ComplexDouble) ComplexDouble; | 184 | extern fn c_cmultd(a: ComplexDouble, b: ComplexDouble) ComplexDouble; |
| 184 | | 185 | |
| 185 | const complex_abi_compatible = builtin.cpu.arch != .x86 and !builtin.cpu.arch.isMIPS() and | 186 | const complex_abi_compatible = builtin.cpu.arch != .x86 and !builtin.cpu.arch.isMIPS() and |
| 186 | !builtin.cpu.arch.isArm() and !builtin.cpu.arch.isPowerPC32() and !builtin.cpu.arch.isRISCV(); | 187 | !builtin.cpu.arch.isArm() and !builtin.cpu.arch.isPowerPC32() and !builtin.cpu.arch.isRISCV() and |
| | 188 | builtin.cpu.arch != .hexagon; |
| 187 | | 189 | |
| 188 | test "C ABI complex float" { | 190 | test "C ABI complex float" { |
| 189 | if (!complex_abi_compatible) return error.SkipZigTest; | 191 | if (!complex_abi_compatible) return error.SkipZigTest; |
| ... | @@ -326,6 +328,7 @@ extern fn c_struct_u64_u64_8(usize, usize, usize, usize, usize, usize, usize, us | ... | @@ -326,6 +328,7 @@ extern fn c_struct_u64_u64_8(usize, usize, usize, usize, usize, usize, usize, us |
| 326 | test "C ABI struct u64 u64" { | 328 | test "C ABI struct u64 u64" { |
| 327 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 329 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 328 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; | 330 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; |
| | 331 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 329 | | 332 | |
| 330 | const s = c_ret_struct_u64_u64(); | 333 | const s = c_ret_struct_u64_u64(); |
| 331 | try expect(s.a == 21); | 334 | try expect(s.a == 21); |
| ... | @@ -417,6 +420,7 @@ test "C ABI struct {f32,f32} f32" { | ... | @@ -417,6 +420,7 @@ test "C ABI struct {f32,f32} f32" { |
| 417 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; | 420 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; |
| 418 | if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest; | 421 | if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest; |
| 419 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 422 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 423 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 420 | | 424 | |
| 421 | const s = c_ret_struct_f32f32_f32(); | 425 | const s = c_ret_struct_f32f32_f32(); |
| 422 | try expect(s.a.b == 1.0); | 426 | try expect(s.a.b == 1.0); |
| ... | @@ -449,6 +453,7 @@ test "C ABI struct f32 {f32,f32}" { | ... | @@ -449,6 +453,7 @@ test "C ABI struct f32 {f32,f32}" { |
| 449 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; | 453 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; |
| 450 | if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest; | 454 | if (builtin.cpu.arch.isArm() and builtin.abi.float() == .soft) return error.SkipZigTest; |
| 451 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 455 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 456 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 452 | | 457 | |
| 453 | const s = c_ret_struct_f32_f32f32(); | 458 | const s = c_ret_struct_f32_f32f32(); |
| 454 | try expect(s.a == 1.0); | 459 | try expect(s.a == 1.0); |
| ... | @@ -485,6 +490,7 @@ test "C ABI struct{u32,union{u32,struct{u32,u32}}}" { | ... | @@ -485,6 +490,7 @@ test "C ABI struct{u32,union{u32,struct{u32,u32}}}" { |
| 485 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 490 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 486 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 491 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 487 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 492 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 493 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 488 | | 494 | |
| 489 | const s = c_ret_struct_u32_union_u32_u32u32(); | 495 | const s = c_ret_struct_u32_union_u32_u32u32(); |
| 490 | try expect(s.a == 1); | 496 | try expect(s.a == 1); |
| ... | @@ -536,6 +542,7 @@ test "C ABI big struct" { | ... | @@ -536,6 +542,7 @@ test "C ABI big struct" { |
| 536 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 542 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 537 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 543 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 538 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 544 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 545 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 539 | | 546 | |
| 540 | const s = BigStruct{ | 547 | const s = BigStruct{ |
| 541 | .a = 1, | 548 | .a = 1, |
| ... | @@ -563,6 +570,7 @@ extern fn c_big_union(BigUnion) void; | ... | @@ -563,6 +570,7 @@ extern fn c_big_union(BigUnion) void; |
| 563 | test "C ABI big union" { | 570 | test "C ABI big union" { |
| 564 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; | 571 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; |
| 565 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 572 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 573 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 566 | | 574 | |
| 567 | const x = BigUnion{ | 575 | const x = BigUnion{ |
| 568 | .a = BigStruct{ | 576 | .a = BigStruct{ |
| ... | @@ -597,6 +605,7 @@ test "C ABI medium struct of ints and floats" { | ... | @@ -597,6 +605,7 @@ test "C ABI medium struct of ints and floats" { |
| 597 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 605 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 598 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 606 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 599 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 607 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 608 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 600 | | 609 | |
| 601 | const s = MedStructMixed{ | 610 | const s = MedStructMixed{ |
| 602 | .a = 1234, | 611 | .a = 1234, |
| ... | @@ -631,6 +640,7 @@ test "C ABI small struct of ints" { | ... | @@ -631,6 +640,7 @@ test "C ABI small struct of ints" { |
| 631 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 640 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 632 | if (builtin.cpu.arch == .aarch64_be) return error.SkipZigTest; | 641 | if (builtin.cpu.arch == .aarch64_be) return error.SkipZigTest; |
| 633 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 642 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 643 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 634 | | 644 | |
| 635 | const s = SmallStructInts{ | 645 | const s = SmallStructInts{ |
| 636 | .a = 1, | 646 | .a = 1, |
| ... | @@ -665,6 +675,7 @@ test "C ABI medium struct of ints" { | ... | @@ -665,6 +675,7 @@ test "C ABI medium struct of ints" { |
| 665 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 675 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 666 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 676 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 667 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 677 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 678 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 668 | | 679 | |
| 669 | const s = MedStructInts{ | 680 | const s = MedStructInts{ |
| 670 | .x = 1, | 681 | .x = 1, |
| ... | @@ -744,6 +755,7 @@ test "C ABI split struct of ints" { | ... | @@ -744,6 +755,7 @@ test "C ABI split struct of ints" { |
| 744 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 755 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 745 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 756 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 746 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 757 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 758 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 747 | | 759 | |
| 748 | const s = SplitStructInt{ | 760 | const s = SplitStructInt{ |
| 749 | .a = 1234, | 761 | .a = 1234, |
| ... | @@ -772,6 +784,7 @@ test "C ABI split struct of ints and floats" { | ... | @@ -772,6 +784,7 @@ test "C ABI split struct of ints and floats" { |
| 772 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 784 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 773 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 785 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 774 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 786 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 787 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 775 | | 788 | |
| 776 | const s = SplitStructMixed{ | 789 | const s = SplitStructMixed{ |
| 777 | .a = 1234, | 790 | .a = 1234, |
| ... | @@ -800,6 +813,7 @@ test "C ABI sret and byval together" { | ... | @@ -800,6 +813,7 @@ test "C ABI sret and byval together" { |
| 800 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 813 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 801 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 814 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 802 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 815 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 816 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 803 | | 817 | |
| 804 | const s = BigStruct{ | 818 | const s = BigStruct{ |
| 805 | .a = 1, | 819 | .a = 1, |
| ... | @@ -853,6 +867,7 @@ test "C ABI structs of floats as parameter" { | ... | @@ -853,6 +867,7 @@ test "C ABI structs of floats as parameter" { |
| 853 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 867 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 854 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 868 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 855 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 869 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 870 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 856 | | 871 | |
| 857 | const v3 = Vector3{ | 872 | const v3 = Vector3{ |
| 858 | .x = 3.0, | 873 | .x = 3.0, |
| ... | @@ -894,6 +909,7 @@ test "C ABI structs of ints as multiple parameters" { | ... | @@ -894,6 +909,7 @@ test "C ABI structs of ints as multiple parameters" { |
| 894 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 909 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 895 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 910 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| 896 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 911 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| | 912 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 897 | | 913 | |
| 898 | const r1 = Rect{ | 914 | const r1 = Rect{ |
| 899 | .left = 1, | 915 | .left = 1, |
| ... | @@ -932,6 +948,7 @@ test "C ABI structs of floats as multiple parameters" { | ... | @@ -932,6 +948,7 @@ test "C ABI structs of floats as multiple parameters" { |
| 932 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 948 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 933 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; | 949 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; |
| 934 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 950 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 951 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 935 | | 952 | |
| 936 | const r1 = FloatRect{ | 953 | const r1 = FloatRect{ |
| 937 | .left = 1, | 954 | .left = 1, |
| ... | @@ -1046,6 +1063,7 @@ test "Struct with array as padding." { | ... | @@ -1046,6 +1063,7 @@ test "Struct with array as padding." { |
| 1046 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 1063 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 1047 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 1064 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 1048 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 1065 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 1066 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 1049 | | 1067 | |
| 1050 | c_struct_with_array(.{ .a = 1, .padding = undefined, .b = 2 }); | 1068 | c_struct_with_array(.{ .a = 1, .padding = undefined, .b = 2 }); |
| 1051 | | 1069 | |
| ... | @@ -1072,6 +1090,7 @@ test "Float array like struct" { | ... | @@ -1072,6 +1090,7 @@ test "Float array like struct" { |
| 1072 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 1090 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 1073 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; | 1091 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; |
| 1074 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 1092 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 1093 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 1075 | | 1094 | |
| 1076 | c_float_array_struct(.{ | 1095 | c_float_array_struct(.{ |
| 1077 | .origin = .{ | 1096 | .origin = .{ |
| ... | @@ -5471,6 +5490,7 @@ test "DC: Zig passes to C" { | ... | @@ -5471,6 +5490,7 @@ test "DC: Zig passes to C" { |
| 5471 | if (builtin.cpu.arch.isRISCV()) return error.SkipZigTest; | 5490 | if (builtin.cpu.arch.isRISCV()) return error.SkipZigTest; |
| 5472 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 5491 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 5473 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 5492 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 5493 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 5474 | try expectOk(c_assert_DC(.{ .v1 = -0.25, .v2 = 15 })); | 5494 | try expectOk(c_assert_DC(.{ .v1 = -0.25, .v2 = 15 })); |
| 5475 | } | 5495 | } |
| 5476 | test "DC: Zig returns to C" { | 5496 | test "DC: Zig returns to C" { |
| ... | @@ -5485,6 +5505,7 @@ test "DC: C passes to Zig" { | ... | @@ -5485,6 +5505,7 @@ test "DC: C passes to Zig" { |
| 5485 | if (builtin.cpu.arch.isRISCV()) return error.SkipZigTest; | 5505 | if (builtin.cpu.arch.isRISCV()) return error.SkipZigTest; |
| 5486 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 5506 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 5487 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 5507 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 5508 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 5488 | try expectOk(c_send_DC()); | 5509 | try expectOk(c_send_DC()); |
| 5489 | } | 5510 | } |
| 5490 | test "DC: C returns to Zig" { | 5511 | test "DC: C returns to Zig" { |
| ... | @@ -5518,6 +5539,7 @@ test "CFF: Zig passes to C" { | ... | @@ -5518,6 +5539,7 @@ test "CFF: Zig passes to C" { |
| 5518 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 5539 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 5519 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 5540 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 5520 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 5541 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 5542 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 5521 | try expectOk(c_assert_CFF(.{ .v1 = 39, .v2 = 0.875, .v3 = 1.0 })); | 5543 | try expectOk(c_assert_CFF(.{ .v1 = 39, .v2 = 0.875, .v3 = 1.0 })); |
| 5522 | } | 5544 | } |
| 5523 | test "CFF: Zig returns to C" { | 5545 | test "CFF: Zig returns to C" { |
| ... | @@ -5533,6 +5555,7 @@ test "CFF: C passes to Zig" { | ... | @@ -5533,6 +5555,7 @@ test "CFF: C passes to Zig" { |
| 5533 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 5555 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 5534 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 5556 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 5535 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 5557 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 5558 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 5536 | | 5559 | |
| 5537 | try expectOk(c_send_CFF()); | 5560 | try expectOk(c_send_CFF()); |
| 5538 | } | 5561 | } |
| ... | @@ -5567,6 +5590,7 @@ test "PD: Zig passes to C" { | ... | @@ -5567,6 +5590,7 @@ test "PD: Zig passes to C" { |
| 5567 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 5590 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 5568 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 5591 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 5569 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 5592 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 5593 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 5570 | try expectOk(c_assert_PD(.{ .v1 = null, .v2 = 0.5 })); | 5594 | try expectOk(c_assert_PD(.{ .v1 = null, .v2 = 0.5 })); |
| 5571 | } | 5595 | } |
| 5572 | test "PD: Zig returns to C" { | 5596 | test "PD: Zig returns to C" { |
| ... | @@ -5579,6 +5603,7 @@ test "PD: C passes to Zig" { | ... | @@ -5579,6 +5603,7 @@ test "PD: C passes to Zig" { |
| 5579 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 5603 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 5580 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 5604 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 5581 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 5605 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 5606 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 5582 | try expectOk(c_send_PD()); | 5607 | try expectOk(c_send_PD()); |
| 5583 | } | 5608 | } |
| 5584 | test "PD: C returns to Zig" { | 5609 | test "PD: C returns to Zig" { |
| ... | @@ -5641,6 +5666,7 @@ test "C function that takes byval struct called via function pointer" { | ... | @@ -5641,6 +5666,7 @@ test "C function that takes byval struct called via function pointer" { |
| 5641 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 5666 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 5642 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; | 5667 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; |
| 5643 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 5668 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 5669 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 5644 | | 5670 | |
| 5645 | var fn_ptr = &c_func_ptr_byval; | 5671 | var fn_ptr = &c_func_ptr_byval; |
| 5646 | _ = &fn_ptr; | 5672 | _ = &fn_ptr; |
| ... | @@ -5781,6 +5807,7 @@ test "Stdcall ABI structs" { | ... | @@ -5781,6 +5807,7 @@ test "Stdcall ABI structs" { |
| 5781 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; | 5807 | if (builtin.cpu.arch.isPowerPC()) return error.SkipZigTest; |
| 5782 | if (builtin.cpu.arch == .aarch64_be) return error.SkipZigTest; | 5808 | if (builtin.cpu.arch == .aarch64_be) return error.SkipZigTest; |
| 5783 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 5809 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 5810 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 5784 | | 5811 | |
| 5785 | const res = stdcall_coord2( | 5812 | const res = stdcall_coord2( |
| 5786 | .{ .x = 0x1111, .y = 0x2222 }, | 5813 | .{ .x = 0x1111, .y = 0x2222 }, |
| ... | @@ -5795,6 +5822,7 @@ extern fn stdcall_big_union(BigUnion) callconv(stdcall_callconv) void; | ... | @@ -5795,6 +5822,7 @@ extern fn stdcall_big_union(BigUnion) callconv(stdcall_callconv) void; |
| 5795 | test "Stdcall ABI big union" { | 5822 | test "Stdcall ABI big union" { |
| 5796 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; | 5823 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; |
| 5797 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 5824 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 5825 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 5798 | | 5826 | |
| 5799 | const x = BigUnion{ | 5827 | const x = BigUnion{ |
| 5800 | .a = BigStruct{ | 5828 | .a = BigStruct{ |
| ... | @@ -5868,6 +5896,7 @@ test "byval tail callsite attribute" { | ... | @@ -5868,6 +5896,7 @@ test "byval tail callsite attribute" { |
| 5868 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; | 5896 | if (builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; |
| 5869 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; | 5897 | if (builtin.cpu.arch.isPowerPC32()) return error.SkipZigTest; |
| 5870 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; | 5898 | if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; |
| | 5899 | if (builtin.cpu.arch == .hexagon) return error.SkipZigTest; |
| 5871 | | 5900 | |
| 5872 | // Originally reported at https://github.com/ziglang/zig/issues/16290 | 5901 | // Originally reported at https://github.com/ziglang/zig/issues/16290 |
| 5873 | // the bug was that the extern function had the byval attribute, but | 5902 | // the bug was that the extern function had the byval attribute, but |