From 50354c387ce286ad41665db078342518eb5b87f4 Mon Sep 17 00:00:00 2001 From: Andrew Adams Date: Fri, 27 Dec 2024 10:25:34 -0800 Subject: [PATCH] Skip test when code could be using x87 (#8537) * Skip test when code could be using x87 * Add MSVC macro Co-authored-by: Alex Reinking --------- Co-authored-by: Alex Reinking --- test/correctness/saturating_casts.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/correctness/saturating_casts.cpp b/test/correctness/saturating_casts.cpp index 0ce1cfda7da7..7a17006b2e43 100644 --- a/test/correctness/saturating_casts.cpp +++ b/test/correctness/saturating_casts.cpp @@ -290,6 +290,13 @@ void test_one_source() { } int main(int argc, char **argv) { + +#if defined(__i386__) || defined(_M_IX86) + printf("[SKIP] Skipping test because it requires bit-exact int to float casts,\n" + "and on i386 without SSE it is hard to guarantee that the test binary won't use x87 instructions.\n"); + return 0; +#endif + test_one_source(); test_one_source(); test_one_source();