From 509be7cf1f10c5d329d2b0524f2af6bfcabd52de Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Fri, 3 Nov 2023 23:18:21 -0400 Subject: x86_64: fix std test failures --- lib/std/math.zig | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'lib/std/math.zig') diff --git a/lib/std/math.zig b/lib/std/math.zig index f110efa0af..b18d5bc3ed 100644 --- a/lib/std/math.zig +++ b/lib/std/math.zig @@ -492,8 +492,6 @@ pub fn shl(comptime T: type, a: T, shift_amt: anytype) T { } test "shl" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { // https://github.com/ziglang/zig/issues/12012 return error.SkipZigTest; @@ -539,8 +537,6 @@ pub fn shr(comptime T: type, a: T, shift_amt: anytype) T { } test "shr" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { // https://github.com/ziglang/zig/issues/12012 return error.SkipZigTest; @@ -587,8 +583,6 @@ pub fn rotr(comptime T: type, x: T, r: anytype) T { } test "rotr" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { // https://github.com/ziglang/zig/issues/12012 return error.SkipZigTest; @@ -634,8 +628,6 @@ pub fn rotl(comptime T: type, x: T, r: anytype) T { } test "rotl" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .aarch64) { // https://github.com/ziglang/zig/issues/12012 return error.SkipZigTest; @@ -764,8 +756,6 @@ pub fn divTrunc(comptime T: type, numerator: T, denominator: T) !T { } test "divTrunc" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - try testDivTrunc(); try comptime testDivTrunc(); } @@ -790,8 +780,6 @@ pub fn divFloor(comptime T: type, numerator: T, denominator: T) !T { } test "divFloor" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - try testDivFloor(); try comptime testDivFloor(); } @@ -829,8 +817,6 @@ pub fn divCeil(comptime T: type, numerator: T, denominator: T) !T { } test "divCeil" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - try testDivCeil(); try comptime testDivCeil(); } @@ -875,8 +861,6 @@ pub fn divExact(comptime T: type, numerator: T, denominator: T) !T { } test "divExact" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - try testDivExact(); try comptime testDivExact(); } @@ -903,8 +887,6 @@ pub fn mod(comptime T: type, numerator: T, denominator: T) !T { } test "mod" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - try testMod(); try comptime testMod(); } @@ -931,8 +913,6 @@ pub fn rem(comptime T: type, numerator: T, denominator: T) !T { } test "rem" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; - try testRem(); try comptime testRem(); } @@ -1285,7 +1265,8 @@ pub fn lerp(a: anytype, b: anytype, t: anytype) @TypeOf(a, b, t) { } test "lerp" { - if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; + if (builtin.zig_backend == .stage2_x86_64 and + !comptime std.Target.x86.featureSetHas(builtin.cpu.features, .fma)) return error.SkipZigTest; try testing.expectEqual(@as(f64, 75), lerp(50, 100, 0.5)); try testing.expectEqual(@as(f32, 43.75), lerp(50, 25, 0.25)); -- cgit v1.2.3