aboutsummaryrefslogtreecommitdiff
path: root/lib/std/math.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-11-04 14:24:59 -0400
committerGitHub <noreply@github.com>2023-11-04 14:24:59 -0400
commita7d8cd591c47536b0a1e359bf3b1806fc057ffe9 (patch)
tree069ca321e822ea95d7265ece0b79173832a0745a /lib/std/math.zig
parentf6de3ec963e3a7d96cd4f6c72b0f076f0437c45d (diff)
parent095c4294aa8b275da0627adefad046923fcaae46 (diff)
downloadzig-a7d8cd591c47536b0a1e359bf3b1806fc057ffe9.tar.gz
zig-a7d8cd591c47536b0a1e359bf3b1806fc057ffe9.zip
Merge pull request #17788 from jacobly0/x86_64
x86_64: pass more tests
Diffstat (limited to 'lib/std/math.zig')
-rw-r--r--lib/std/math.zig23
1 files changed, 2 insertions, 21 deletions
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));