From 04dd43934a94d087001659a577bda1f514e1df5d Mon Sep 17 00:00:00 2001 From: Cody Tapscott Date: Fri, 8 Apr 2022 22:39:14 -0700 Subject: [PATCH] Skip some floatXiYf tests on non-x86 platforms These need to be skipped because of a bug with `@floatToInt` on stage1: https://github.com/ziglang/zig/issues/11408 --- lib/std/special/compiler_rt/floatXiYf_test.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/std/special/compiler_rt/floatXiYf_test.zig b/lib/std/special/compiler_rt/floatXiYf_test.zig index 400ecaf57e..cffa2a5b42 100644 --- a/lib/std/special/compiler_rt/floatXiYf_test.zig +++ b/lib/std/special/compiler_rt/floatXiYf_test.zig @@ -1,4 +1,5 @@ const std = @import("std"); +const builtin = @import("builtin"); const testing = std.testing; const math = std.math; const floatXiYf = @import("floatXiYf.zig").floatXiYf; @@ -809,6 +810,9 @@ test "conversion to f32" { } test "conversion to f80" { + if (builtin.zig_backend == .stage1 and builtin.cpu.arch != .x86_64) + return error.SkipZigTest; // https://github.com/ziglang/zig/issues/11408 + try testing.expect(floatXiYf(f80, @as(i80, -12)) == -12); try testing.expect(@floatToInt(u80, floatXiYf(f80, @as(u64, math.maxInt(u64)) + 0)) == math.maxInt(u64) + 0); try testing.expect(@floatToInt(u80, floatXiYf(f80, @as(u80, math.maxInt(u64)) + 1)) == math.maxInt(u64) + 1);