aboutsummaryrefslogtreecommitdiff
path: root/pl
diff options
context:
space:
mode:
authorJoe Ramsay <Joe.Ramsay@arm.com>2022-11-09 14:49:23 +0000
committerJoe Ramsay <joe.ramsay@arm.com>2022-11-09 14:49:23 +0000
commit78a876ad601673d07fe4600d7ebfcf46587d819d (patch)
tree5c389e963f4a80fafa6930f3ed3d8c7411e8b803 /pl
parent4ed9b4953967fe8356e7680b488d567d298570fb (diff)
downloadarm-optimized-routines-78a876ad601673d07fe4600d7ebfcf46587d819d.tar.gz
Make fenv checking dependent on WANT_ERRNO
We want these tests to pass regardless of whether the user has enabled or disabled WANT_ERRNO - this is now supported by a WANT_ERRNO config option, which will be added to config.mk.dist in a follow-on.
Diffstat (limited to 'pl')
-rw-r--r--pl/math/Dir.mk2
-rwxr-xr-xpl/math/test/runulp.sh23
2 files changed, 16 insertions, 9 deletions
diff --git a/pl/math/Dir.mk b/pl/math/Dir.mk
index 7909ea0..bb81052 100644
--- a/pl/math/Dir.mk
+++ b/pl/math/Dir.mk
@@ -128,7 +128,7 @@ check-pl/math-rtest: $(math-host-tools) $(math-tools)
cat $(math-rtests) | build/pl/bin/rtest | $(EMULATOR) build/pl/bin/mathtest $(math-testflags)
check-pl/math-ulp: $(math-tools)
- WANT_SVE_MATH=$(WANT_SVE_MATH) ULPFLAGS="$(math-ulpflags)" build/pl/bin/runulp.sh $(EMULATOR)
+ WANT_ERRNO=$(WANT_ERRNO) WANT_SVE_MATH=$(WANT_SVE_MATH) ULPFLAGS="$(math-ulpflags)" build/pl/bin/runulp.sh $(EMULATOR)
check-pl/math: check-pl/math-test check-pl/math-rtest check-pl/math-ulp
diff --git a/pl/math/test/runulp.sh b/pl/math/test/runulp.sh
index 53043d3..1690d5f 100755
--- a/pl/math/test/runulp.sh
+++ b/pl/math/test/runulp.sh
@@ -548,15 +548,22 @@ do
do
[ -n "$X" ] || continue
# fenv checking is enabled by default, but we almost
- # always want to disable it for vector routines, so a
- # hack is needed. Pass "fenv" as fourth argument to
- # prevent -f being added to the run line.
+ # always want to disable it for vector routines. There
+ # are, however, a small number of vector routines in
+ # pl/math which are supposed to set fenv correctly
+ # when WANT_ERRNO is enabled. A hack is needed to
+ # ensure fenv checking is enabled for routines where
+ # this is the case. Pass "fenv" as fourth argument to
+ # prevent -f being added to the run line when
+ # WANT_ERRNO is enabled.
f="-f"
- if [ "$D" = "fenv" ]; then
- f=""
- elif [ ! -z "$D" ]; then
- echo "Unrecognised 4th argument: $D"
- exit 1
+ if [ $WANT_ERRNO -eq 1 ]; then
+ if [ "$D" = "fenv" ]; then
+ f=""
+ elif [ ! -z "$D" ]; then
+ echo "Unrecognised 4th argument: $D"
+ exit 1
+ fi
fi
case "$X" in \#*) continue ;; esac
t $f $F $X