aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.sh9
-rw-r--r--src/cube_public.h6
-rwxr-xr-xtest/test.sh5
3 files changed, 14 insertions, 6 deletions
diff --git a/configure.sh b/configure.sh
index 60e375a..d5586db 100755
--- a/configure.sh
+++ b/configure.sh
@@ -2,8 +2,13 @@
2 2
3cc=${CC:-cc} 3cc=${CC:-cc}
4 4
5detectarch() { ${cc} -march=native -dM -E - </dev/null | grep "$1"; } 5detectarch() {
6detectsan() { ${cc} -fsanitize=$1 -dM -E -x c - </dev/null | grep "SANITIZE"; } 6 ${cc} -march=native -dM -E - </dev/null 2>/dev/null | grep "$1"
7}
8detectsan() {
9 ${cc} -fsanitize=$1 -dM -E -x c - </dev/null 2>/dev/null \
10 | grep "SANITIZE"
11}
7 12
8[ -n "$(detectarch __AVX2__)" ] && detected="AVX2" 13[ -n "$(detectarch __AVX2__)" ] && detected="AVX2"
9[ -n "$(detectarch __ARM_NEON)" ] && detected="NEON" 14[ -n "$(detectarch __ARM_NEON)" ] && detected="NEON"
diff --git a/src/cube_public.h b/src/cube_public.h
index 7f7b81c..ade8778 100644
--- a/src/cube_public.h
+++ b/src/cube_public.h
@@ -1,7 +1,7 @@
1int check(cube_t, char [static 22]); 1int check_error(cube_t, char [static 22]);
2 2
3int 3int
4check(cube_t cube, char result[static 22]) 4check_error(cube_t cube, char result[static 22])
5{ 5{
6 if (!isconsistent(cube)) { 6 if (!isconsistent(cube)) {
7 writecube("B32", zero, result); 7 writecube("B32", zero, result);
@@ -25,7 +25,7 @@ nissy_compose(
25 25
26 res = compose(c, p); 26 res = compose(c, p);
27 27
28 return check(res, result); 28 return check_error(res, result);
29} 29}
30 30
31int 31int
diff --git a/test/test.sh b/test/test.sh
index 3adee3a..8e50cf5 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -1,6 +1,9 @@
1#!/bin/sh 1#!/bin/sh
2 2
3detectsan() { cc -fsanitize=$1 -dM -E -x c - </dev/null | grep "SANITIZE"; } 3detectsan() {
4 cc -fsanitize=$1 -dM -E -x c - </dev/null 2>/dev/null \
5 | grep "SANITIZE"
6}
4 7
5re="${TEST:-$@}" 8re="${TEST:-$@}"
6 9

Generated with cgit - Back to sebastiano.tronto.net