Skip to content

Commit

Permalink
Skip test when code could be using x87 (#8537)
Browse files Browse the repository at this point in the history
* Skip test when code could be using x87

* Add MSVC macro

Co-authored-by: Alex Reinking <[email protected]>

---------

Co-authored-by: Alex Reinking <[email protected]>
  • Loading branch information
abadams and alexreinking authored Dec 27, 2024
1 parent 5783534 commit 50354c3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/correctness/saturating_casts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int8_t>();
test_one_source<uint8_t>();
test_one_source<int16_t>();
Expand Down

0 comments on commit 50354c3

Please sign in to comment.