Skip to content

Commit ffbde2f

Browse files
committed
src: add new flag SKIP_FP_EXCEPT_TEST
1 parent 4b9ba45 commit ffbde2f

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

config.mak.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Use openlibm, otherwise use system libm
22
USE_OPENLIBM:=0
3+
# Skip all fp exception tests
4+
SKIP_FP_EXCEPT_TEST:=0
35

46
# Build and link flags
7+
CFLAGS += -DSKIP_FP_EXCEPT_TEST=$(SKIP_FP_EXCEPT_TEST)
58
CFLAGS += -pipe -std=c99 -D_POSIX_C_SOURCE=200809L -Wall -Wno-unused-function -Wno-missing-braces -Wno-unused -Wno-overflow
69
CFLAGS += -Wno-unknown-pragmas -fno-builtin -frounding-math
710
CFLAGS += -Werror=implicit-function-declaration -Werror=implicit-int -Werror=pointer-sign -Werror=pointer-arith

src/common/mtest.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ float ulperr(double got, double want, float dwant);
105105
float ulperrf(float got, float want, float dwant);
106106
float ulperrl(long double got, long double want, float dwant);
107107

108+
109+
#ifdef SKIP_FP_EXCEPT_TEST
110+
// XXX: Skip check all fp except
111+
static int checkexcept(int got, int want, int r) { return 1; }
112+
static int checkexceptall(int got, int want, int r) { return 1; }
113+
#else
108114
static int checkexcept(int got, int want, int r)
109115
{
110116
if (r == RN)
@@ -122,6 +128,7 @@ static int checkexceptall(int got, int want, int r)
122128
{
123129
return got == want;
124130
}
131+
#endif // SKIP_FP_EXCEPT_TEST
125132

126133
static int checkulp(float d, int r)
127134
{

0 commit comments

Comments
 (0)