diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile.am | 2 | ||||
-rwxr-xr-x | tools/test_simd.sh | 12 | ||||
-rwxr-xr-x | tools/test_simd_qemu.sh | 2 |
3 files changed, 14 insertions, 2 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am index a9dd8b9..4ca9131 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,7 +1,7 @@ # GF-Complete 'tools' AM file AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -AM_CFLAGS = -O3 $(SIMD_FLAGS) -fPIC +AM_CFLAGS = -O3 -fPIC bin_PROGRAMS = gf_mult gf_div gf_add gf_time gf_methods gf_poly gf_inline_time diff --git a/tools/test_simd.sh b/tools/test_simd.sh index 1b0e319..6401590 100755 --- a/tools/test_simd.sh +++ b/tools/test_simd.sh @@ -27,6 +27,16 @@ test_functions() { return ${failed} } +# build with DEBUG_CPU_FUNCTIONS and print out CPU detection +test_detection() { + failed=0 + + { ./configure && make clean && make CFLAGS="-DDEBUG_CPU_DETECTION"; } || { echo "Compile FAILED" >> ${results}; return 1; } + { ${script_dir}/gf_methods 32 -ACD -L | grep '#' >> ${results}; } || { echo "gf_methods $i FAILED" >> ${results}; ((++failed)); } + + return ${failed} +} + compile_arm() { failed=0 @@ -167,7 +177,7 @@ runtime_intel_flags() { { ${script_dir}/gf_methods $i -ACD -X >> ${1}; } || { echo "gf_methods $i FAILED" >> ${1}; ((++failed)); } done - echo "====SSE2 support..." >> ${1} + echo "====SSE2 support..." >> ${1} export ax_cv_have_sse_ext=no export ax_cv_have_sse2_ext=yes export ax_cv_have_sse3_ext=no diff --git a/tools/test_simd_qemu.sh b/tools/test_simd_qemu.sh index 7b2cb1c..5771874 100755 --- a/tools/test_simd_qemu.sh +++ b/tools/test_simd_qemu.sh @@ -224,6 +224,8 @@ run_test_simd_basic() { { run_test $arch $cpu "unit" && echo "SUCCESS"; } || { echo "FAILED"; ((++failed)); } echo "=====running functions test" { run_test $arch $cpu "functions" && echo "SUCCESS"; } || { echo "FAILED"; ((++failed)); } + echo "=====running detection test" + { run_test $arch $cpu "detection" && echo "SUCCESS"; } || { echo "FAILED"; ((++failed)); } echo "=====running runtime test" { run_test $arch $cpu "runtime" && echo "SUCCESS"; } || { echo "FAILED"; ((++failed)); } stop_qemu |