mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-26 13:01:34 +03:00
Merge pull request 'LLVM 22' (#32013) from llvm22 into master
Reviewed-on: https://codeberg.org/ziglang/zig/pulls/32013
This commit is contained in:
@@ -317,7 +317,6 @@ test "@alignCast functions" {
|
||||
|
||||
// function alignment is a compile error on wasm
|
||||
if (native_arch.isWasm()) return error.SkipZigTest;
|
||||
if (native_arch.isThumb()) return error.SkipZigTest;
|
||||
|
||||
try expect(fnExpectsOnly1(simple4) == 0x19);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@ test "alternative constraints" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isLoongArch()) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/159200
|
||||
|
||||
if (builtin.zig_backend == .stage2_c and builtin.os.tag == .windows) return error.SkipZigTest; // MSVC doesn't support inline assembly
|
||||
|
||||
@@ -247,12 +246,9 @@ test "extern output types (x86_64)" {
|
||||
}
|
||||
}
|
||||
|
||||
test "riscv abi register aliases as clobbers" {
|
||||
test "abi register aliases as clobbers (RISC-V)" {
|
||||
if (!builtin.target.cpu.arch.isRISCV()) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_c and builtin.os.tag == .windows) return error.SkipZigTest;
|
||||
|
||||
if (!comptime builtin.cpu.arch.isRISCV()) return error.SkipZigTest;
|
||||
|
||||
// Verify that ABI alias names are accepted as clobbers for RISC-V.
|
||||
asm volatile ("" ::: .{ .ra = true, .sp = true, .gp = true, .tp = true });
|
||||
|
||||
@@ -1407,11 +1407,7 @@ test "allocation and looping over 3-byte integer" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.os.tag.isDarwin()) {
|
||||
return error.SkipZigTest; // TODO
|
||||
}
|
||||
if (builtin.cpu.arch == .s390x and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.os.tag.isDarwin()) return error.SkipZigTest; // TODO
|
||||
|
||||
try expect(@sizeOf(u24) == 4);
|
||||
try expect(@sizeOf([1]u24) == 4);
|
||||
|
||||
@@ -1757,7 +1757,6 @@ test "@fieldParentPtr packed union" {
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
||||
if (builtin.target.cpu.arch.endian() == .big) return error.SkipZigTest; // TODO
|
||||
|
||||
const C = packed union {
|
||||
a: packed struct(u32) {
|
||||
|
||||
@@ -136,7 +136,6 @@ test "cmp f32" {
|
||||
test "cmp f64" {
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.cpu.arch.isArm() and builtin.target.abi.float() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234
|
||||
|
||||
try testCmp(f64);
|
||||
try comptime testCmp(f64);
|
||||
@@ -155,7 +154,6 @@ test "cmp f128" {
|
||||
test "cmp f80/c_longdouble" {
|
||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArm()) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_llvm) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
|
||||
@@ -223,8 +221,7 @@ test "vector cmp f16" {
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch.isArm()) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isArm()) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .hexagon) return error.SkipZigTest;
|
||||
|
||||
try testCmpVector(f16);
|
||||
@@ -236,8 +233,8 @@ test "vector cmp f32" {
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch.isArm()) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isArm()) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .hexagon) return error.SkipZigTest;
|
||||
|
||||
try testCmpVector(f32);
|
||||
@@ -248,8 +245,6 @@ test "vector cmp f64" {
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch.isArm()) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .hexagon) return error.SkipZigTest;
|
||||
|
||||
try testCmpVector(f64);
|
||||
@@ -262,8 +257,7 @@ test "vector cmp f128" {
|
||||
if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArm()) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch.isArm()) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .powerpc64le) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .hexagon) return error.SkipZigTest;
|
||||
|
||||
try testCmpVector(f128);
|
||||
|
||||
@@ -305,8 +305,6 @@ test "generic function instantiation non-duplicates" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
|
||||
if (builtin.os.tag == .wasi) return error.SkipZigTest;
|
||||
|
||||
const S = struct {
|
||||
fn copy(comptime T: type, dest: []T, source: []const T) void {
|
||||
@export(&foo, .{ .name = "test_generic_instantiation_non_dupe" });
|
||||
@@ -323,8 +321,6 @@ test "generic function instantiation non-duplicates" {
|
||||
test "generic instantiation of tagged union with only one field" {
|
||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
|
||||
|
||||
if (builtin.os.tag == .wasi) return error.SkipZigTest;
|
||||
|
||||
const S = struct {
|
||||
const U = union(enum) {
|
||||
s: []const u8,
|
||||
|
||||
@@ -110,8 +110,6 @@ test "@clz vectors" {
|
||||
}
|
||||
|
||||
fn testClzVectors() !void {
|
||||
if (comptime builtin.cpu.has(.loongarch, .lsx)) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/159529
|
||||
|
||||
const Vu4 = @Vector(64, u4);
|
||||
const Vu8 = @Vector(64, u8);
|
||||
const Vu128 = @Vector(64, u128);
|
||||
@@ -193,8 +191,6 @@ test "@ctz vectors" {
|
||||
}
|
||||
|
||||
fn testCtzVectors() !void {
|
||||
if (comptime builtin.cpu.has(.loongarch, .lsx)) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/159529
|
||||
|
||||
const Vu4 = @Vector(64, u4);
|
||||
const Vu8 = @Vector(64, u8);
|
||||
@setEvalBranchQuota(10_000);
|
||||
@@ -2429,7 +2425,6 @@ test "runtime comparison to NaN is comptime-known" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch.isArm() and builtin.target.abi.float() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234
|
||||
|
||||
const S = struct {
|
||||
fn doTheTest(comptime F: type, x: F) void {
|
||||
@@ -2458,7 +2453,6 @@ test "runtime int comparison to inf is comptime-known" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch.isArm() and builtin.target.abi.float() == .soft) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21234
|
||||
|
||||
const S = struct {
|
||||
fn doTheTest(comptime F: type, x: u32) void {
|
||||
|
||||
@@ -138,8 +138,6 @@ test "@min/max for floats" {
|
||||
};
|
||||
|
||||
inline for (.{ f16, f32, f64, f80, f128, c_longdouble }) |T| {
|
||||
if (T == c_longdouble and builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21090
|
||||
|
||||
try S.doTheTest(T);
|
||||
try comptime S.doTheTest(T);
|
||||
}
|
||||
|
||||
@@ -1196,7 +1196,6 @@ test "packed struct with signed field" {
|
||||
|
||||
test "assign packed struct initialized with RLS to packed struct literal field" {
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isWasm()) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
|
||||
|
||||
@@ -147,11 +147,6 @@ test "saturating multiplication <= 32 bits" {
|
||||
if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArm()) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isWasm()) {
|
||||
// https://github.com/ziglang/zig/issues/9660
|
||||
return error.SkipZigTest;
|
||||
}
|
||||
|
||||
try testSatMul(u8, 0, maxInt(u8), 0);
|
||||
try testSatMul(u8, 1 << 7, 1 << 7, maxInt(u8));
|
||||
try testSatMul(u8, maxInt(u8) - 1, 2, maxInt(u8));
|
||||
@@ -246,11 +241,6 @@ test "saturating multiplication" {
|
||||
if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArm()) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isWasm()) {
|
||||
// https://github.com/ziglang/zig/issues/9660
|
||||
return error.SkipZigTest;
|
||||
}
|
||||
|
||||
const S = struct {
|
||||
fn doTheTest() !void {
|
||||
try testSatMul(i8, -3, 10, -30);
|
||||
|
||||
@@ -404,7 +404,6 @@ test "packed struct 24bits" {
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
|
||||
if (builtin.cpu.arch.isArm()) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; // TODO
|
||||
|
||||
@@ -921,7 +920,6 @@ test "tuple assigned to variable" {
|
||||
|
||||
test "comptime struct field" {
|
||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
|
||||
if (builtin.cpu.arch.isArm()) return error.SkipZigTest; // TODO
|
||||
|
||||
const T = struct {
|
||||
a: i32,
|
||||
|
||||
@@ -683,6 +683,7 @@ test "switch on pointer type" {
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/176634
|
||||
|
||||
const S = struct {
|
||||
const X = struct {
|
||||
|
||||
@@ -1592,7 +1592,6 @@ test "memset packed union" {
|
||||
|
||||
try comptime S.doTheTest();
|
||||
|
||||
if (builtin.cpu.arch.isWasm()) return error.SkipZigTest; // TODO
|
||||
try S.doTheTest();
|
||||
}
|
||||
|
||||
@@ -1750,8 +1749,6 @@ test "reinterpret packed union" {
|
||||
try comptime S.doTheTest();
|
||||
|
||||
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
|
||||
if (builtin.cpu.arch.isWasm()) return error.SkipZigTest; // TODO
|
||||
if (builtin.cpu.arch.endian() == .big) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21050
|
||||
try S.doTheTest();
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ const expect = std.testing.expect;
|
||||
const expectEqual = std.testing.expectEqual;
|
||||
|
||||
test "implicit cast vector to array - bool" {
|
||||
if (builtin.cpu.arch == .aarch64_be and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest;
|
||||
|
||||
const S = struct {
|
||||
@@ -622,11 +621,6 @@ test "vector bitwise not operator" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
|
||||
if (builtin.cpu.arch == .aarch64_be and builtin.zig_backend == .stage2_llvm) {
|
||||
// https://github.com/ziglang/zig/issues/24061
|
||||
return error.SkipZigTest;
|
||||
}
|
||||
|
||||
const S = struct {
|
||||
fn doTheTestNot(comptime T: type, x: @Vector(4, T)) !void {
|
||||
const y = ~x;
|
||||
@@ -660,11 +654,6 @@ test "vector boolean not operator" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
|
||||
if (builtin.cpu.arch == .aarch64_be and builtin.zig_backend == .stage2_llvm) {
|
||||
// https://github.com/ziglang/zig/issues/24061
|
||||
return error.SkipZigTest;
|
||||
}
|
||||
|
||||
const S = struct {
|
||||
fn doTheTestNot(comptime T: type, x: @Vector(4, T)) !void {
|
||||
const y = !x;
|
||||
@@ -759,7 +748,6 @@ test "vector reduce operation" {
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_c and builtin.cpu.arch.isArm()) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isMIPS64()) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/21091
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isSPARC()) return error.SkipZigTest; // https://github.com/ziglang/zig/issues/23719
|
||||
|
||||
const S = struct {
|
||||
@@ -1096,9 +1084,6 @@ test "saturating multiplication" {
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
|
||||
// TODO: once #9660 has been solved, remove this line
|
||||
if (builtin.target.cpu.arch.isWasm()) return error.SkipZigTest;
|
||||
|
||||
const S = struct {
|
||||
fn doTheTest() !void {
|
||||
// Broken out to avoid https://github.com/ziglang/zig/issues/11251
|
||||
@@ -1165,7 +1150,6 @@ test "@addWithOverflow" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch == .aarch64_be and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest;
|
||||
|
||||
const S = struct {
|
||||
fn doTheTest() !void {
|
||||
@@ -1213,7 +1197,6 @@ test "@subWithOverflow" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch == .aarch64_be and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest;
|
||||
|
||||
const S = struct {
|
||||
fn doTheTest() !void {
|
||||
@@ -1244,7 +1227,6 @@ test "@mulWithOverflow" {
|
||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch == .aarch64_be and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest;
|
||||
|
||||
const S = struct {
|
||||
fn doTheTest() !void {
|
||||
@@ -1265,7 +1247,6 @@ test "@shlWithOverflow" {
|
||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch == .aarch64_be and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest;
|
||||
|
||||
const S = struct {
|
||||
fn doTheTest() !void {
|
||||
@@ -1347,7 +1328,6 @@ test "byte vector initialized in inline function" {
|
||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch == .aarch64_be and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch == .hexagon and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest;
|
||||
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .x86_64 and comptime builtin.cpu.has(.x86, .avx512f)) {
|
||||
@@ -1463,7 +1443,6 @@ test "store packed vector element" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch == .aarch64_be and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest;
|
||||
|
||||
var v = @Vector(4, u1){ 1, 1, 1, 1 };
|
||||
try expectEqual(@Vector(4, u1){ 1, 1, 1, 1 }, v);
|
||||
@@ -1496,7 +1475,6 @@ test "store vector with memset" {
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_c) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch == .aarch64_be and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest;
|
||||
|
||||
var a: [5]@Vector(2, i1) = undefined;
|
||||
var b: [5]@Vector(2, u2) = undefined;
|
||||
@@ -1596,7 +1574,6 @@ test "bitcast to vector with different child type" {
|
||||
}
|
||||
};
|
||||
|
||||
// Originally reported at https://github.com/ziglang/zig/issues/8184
|
||||
try S.doTheTest();
|
||||
try comptime S.doTheTest();
|
||||
}
|
||||
|
||||
@@ -82,9 +82,6 @@ test "wrapping multiplication" {
|
||||
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
|
||||
// TODO: once #9660 has been solved, remove this line
|
||||
if (builtin.cpu.arch.isWasm()) return error.SkipZigTest;
|
||||
|
||||
const S = struct {
|
||||
fn doTheTest() !void {
|
||||
try testWrapMul(i8, -3, 10, -30);
|
||||
|
||||
@@ -65,6 +65,10 @@ static void assert_or_panic(bool ok) {
|
||||
# define ZIG_NO_COMPLEX
|
||||
#endif
|
||||
|
||||
#if defined(__loongarch__) && defined(__loongarch_soft_float)
|
||||
# define ZIG_NO_COMPLEX
|
||||
#endif
|
||||
|
||||
#ifdef __powerpc__
|
||||
# define ZIG_NO_COMPLEX
|
||||
#endif
|
||||
|
||||
+3
-1
@@ -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
|
||||
!builtin.cpu.arch.isArm() and !builtin.cpu.arch.isPowerPC32() and !builtin.cpu.arch.isRISCV() 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" {
|
||||
if (!complex_abi_compatible) return error.SkipZigTest;
|
||||
@@ -5676,6 +5677,7 @@ test "C ABI pointer sized float struct" {
|
||||
if (builtin.cpu.arch.isMIPS64()) 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.isLoongArch() and builtin.abi.float() == .soft) return error.SkipZigTest;
|
||||
if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
|
||||
|
||||
c_ptr_size_float_struct(.{ .x = 1, .y = 2 });
|
||||
|
||||
+14
-4
@@ -52,6 +52,7 @@ const targets = [_]std.Target.Query{
|
||||
.{ .cpu_arch = .arm, .os_tag = .freebsd, .abi = .eabihf },
|
||||
.{ .cpu_arch = .arm, .os_tag = .freestanding, .abi = .eabi },
|
||||
.{ .cpu_arch = .arm, .os_tag = .freestanding, .abi = .eabihf },
|
||||
.{ .cpu_arch = .arm, .os_tag = .fuchsia, .abi = .eabihf },
|
||||
.{ .cpu_arch = .arm, .os_tag = .haiku, .abi = .eabi },
|
||||
.{ .cpu_arch = .arm, .os_tag = .haiku, .abi = .eabihf },
|
||||
.{ .cpu_arch = .arm, .os_tag = .linux, .abi = .androideabi },
|
||||
@@ -99,12 +100,19 @@ const targets = [_]std.Target.Query{
|
||||
// .{ .cpu_arch = .csky, .os_tag = .linux, .abi = .gnueabihf },
|
||||
|
||||
.{ .cpu_arch = .hexagon, .os_tag = .freestanding, .abi = .none },
|
||||
.{ .cpu_arch = .hexagon, .os_tag = .linux, .abi = .musl },
|
||||
.{ .cpu_arch = .hexagon, .os_tag = .linux, .abi = .none },
|
||||
|
||||
.{ .cpu_arch = .lanai, .os_tag = .freestanding, .abi = .none },
|
||||
|
||||
// .{ .cpu_arch = .loongarch32, .os_tag = .freestanding, .abi = .none },
|
||||
// .{ .cpu_arch = .loongarch32, .os_tag = .linux, .abi = .none },
|
||||
.{ .cpu_arch = .loongarch32, .os_tag = .freestanding, .abi = .none },
|
||||
// .{ .cpu_arch = .loongarch32, .os_tag = .linux, .abi = .gnu },
|
||||
// .{ .cpu_arch = .loongarch32, .os_tag = .linux, .abi = .gnuf32 },
|
||||
// .{ .cpu_arch = .loongarch32, .os_tag = .linux, .abi = .gnusf },
|
||||
// .{ .cpu_arch = .loongarch32, .os_tag = .linux, .abi = .musl },
|
||||
// .{ .cpu_arch = .loongarch32, .os_tag = .linux, .abi = .muslf32 },
|
||||
// .{ .cpu_arch = .loongarch32, .os_tag = .linux, .abi = .muslsf },
|
||||
.{ .cpu_arch = .loongarch32, .os_tag = .linux, .abi = .none },
|
||||
// .{ .cpu_arch = .loongarch32, .os_tag = .uefi, .abi = .none },
|
||||
|
||||
.{ .cpu_arch = .loongarch64, .os_tag = .freestanding, .abi = .none },
|
||||
@@ -172,6 +180,7 @@ const targets = [_]std.Target.Query{
|
||||
|
||||
.{ .cpu_arch = .nvptx, .os_tag = .cuda, .abi = .none },
|
||||
.{ .cpu_arch = .nvptx, .os_tag = .nvcl, .abi = .none },
|
||||
|
||||
.{ .cpu_arch = .nvptx64, .os_tag = .cuda, .abi = .none },
|
||||
.{ .cpu_arch = .nvptx64, .os_tag = .nvcl, .abi = .none },
|
||||
|
||||
@@ -255,6 +264,7 @@ const targets = [_]std.Target.Query{
|
||||
|
||||
.{ .cpu_arch = .thumb, .os_tag = .freestanding, .abi = .eabi },
|
||||
.{ .cpu_arch = .thumb, .os_tag = .freestanding, .abi = .eabihf },
|
||||
.{ .cpu_arch = .thumb, .os_tag = .fuchsia, .abi = .eabihf },
|
||||
.{ .cpu_arch = .thumb, .os_tag = .linux, .abi = .eabi },
|
||||
.{ .cpu_arch = .thumb, .os_tag = .linux, .abi = .eabihf },
|
||||
.{ .cpu_arch = .thumb, .os_tag = .linux, .abi = .musleabi },
|
||||
@@ -342,8 +352,8 @@ const targets = [_]std.Target.Query{
|
||||
|
||||
.{ .cpu_arch = .xcore, .os_tag = .freestanding, .abi = .none },
|
||||
|
||||
// .{ .cpu_arch = .xtensa, .os_tag = .freestanding, .abi = .none },
|
||||
// .{ .cpu_arch = .xtensa, .os_tag = .linux, .abi = .none },
|
||||
.{ .cpu_arch = .xtensa, .os_tag = .freestanding, .abi = .none },
|
||||
.{ .cpu_arch = .xtensa, .os_tag = .linux, .abi = .none },
|
||||
};
|
||||
|
||||
pub fn addCases(
|
||||
|
||||
+50
-8
@@ -410,6 +410,14 @@ const module_test_targets = blk: {
|
||||
.extra_target = true,
|
||||
},
|
||||
|
||||
.{
|
||||
.target = .{
|
||||
.cpu_arch = .loongarch32,
|
||||
.os_tag = .linux,
|
||||
.abi = .none,
|
||||
},
|
||||
},
|
||||
|
||||
.{
|
||||
.target = .{
|
||||
.cpu_arch = .loongarch64,
|
||||
@@ -435,6 +443,25 @@ const module_test_targets = blk: {
|
||||
.link_libc = true,
|
||||
.extra_target = true,
|
||||
},
|
||||
.{
|
||||
.target = .{
|
||||
.cpu_arch = .loongarch64,
|
||||
.os_tag = .linux,
|
||||
.abi = .muslsf,
|
||||
},
|
||||
.link_libc = true,
|
||||
.extra_target = true,
|
||||
},
|
||||
.{
|
||||
.target = .{
|
||||
.cpu_arch = .loongarch64,
|
||||
.os_tag = .linux,
|
||||
.abi = .muslsf,
|
||||
},
|
||||
.linkage = .dynamic,
|
||||
.link_libc = true,
|
||||
.extra_target = true,
|
||||
},
|
||||
.{
|
||||
.target = .{
|
||||
.cpu_arch = .loongarch64,
|
||||
@@ -443,6 +470,15 @@ const module_test_targets = blk: {
|
||||
},
|
||||
.link_libc = true,
|
||||
},
|
||||
.{
|
||||
.target = .{
|
||||
.cpu_arch = .loongarch64,
|
||||
.os_tag = .linux,
|
||||
.abi = .gnusf,
|
||||
},
|
||||
.link_libc = true,
|
||||
.extra_target = true,
|
||||
},
|
||||
|
||||
.{
|
||||
.target = .{
|
||||
@@ -1713,14 +1749,13 @@ const c_abi_targets = blk: {
|
||||
},
|
||||
},
|
||||
|
||||
// https://gitlab.com/qemu-project/qemu/-/issues/3291
|
||||
// .{
|
||||
// .target = .{
|
||||
// .cpu_arch = .hexagon,
|
||||
// .os_tag = .linux,
|
||||
// .abi = .musl,
|
||||
// },
|
||||
// },
|
||||
.{
|
||||
.target = .{
|
||||
.cpu_arch = .hexagon,
|
||||
.os_tag = .linux,
|
||||
.abi = .musl,
|
||||
},
|
||||
},
|
||||
|
||||
.{
|
||||
.target = .{
|
||||
@@ -1729,6 +1764,13 @@ const c_abi_targets = blk: {
|
||||
.abi = .musl,
|
||||
},
|
||||
},
|
||||
.{
|
||||
.target = .{
|
||||
.cpu_arch = .loongarch64,
|
||||
.os_tag = .linux,
|
||||
.abi = .muslsf,
|
||||
},
|
||||
},
|
||||
|
||||
.{
|
||||
.target = .{
|
||||
|
||||
Reference in New Issue
Block a user