xbyak/test/test_avx512.sh

39 lines
675 B
Bash
Raw Normal View History

#!/bin/sh
2016-06-08 19:46:11 -07:00
2022-11-28 07:52:58 -07:00
set -e
FILTER="grep -v warning"
2022-11-23 20:01:25 -07:00
CXX=${CXX:=g++}
2016-06-08 19:46:11 -07:00
case $1 in
64)
2016-06-08 19:46:11 -07:00
echo "nasm(64bit)"
EXE=nasm
OPT2=-DXBYAK64
OPT3=win64
FILTER=./normalize_prefix
;;
*)
2016-06-08 19:46:11 -07:00
echo "nasm(32bit)"
EXE=nasm
OPT2=-DXBYAK32
OPT3=win32
;;
esac
2016-06-08 19:46:11 -07:00
2022-11-23 19:40:50 -07:00
CFLAGS="-Wall -I../ $OPT2 -DUSE_AVX512"
2016-07-16 19:30:10 -07:00
echo "compile make_512.cpp"
2022-11-23 19:22:37 -07:00
$CXX $CFLAGS make_512.cpp -o make_512
2016-06-08 19:46:11 -07:00
2016-07-16 19:30:10 -07:00
./make_512 > a.asm
2016-06-08 19:46:11 -07:00
echo "asm"
$EXE -f$OPT3 a.asm -l a.lst
awk '{printf "%s", sub(/-$/, "", $3) ? $3 : $3 ORS}' a.lst | $FILTER > ok.lst
2016-06-08 19:46:11 -07:00
echo "xbyak"
2016-07-16 19:30:10 -07:00
./make_512 jit > nm.cpp
2016-06-08 19:46:11 -07:00
echo "compile nm_frame.cpp"
2022-11-23 19:22:37 -07:00
$CXX $CFLAGS -DXBYAK_TEST nm_frame.cpp -o nm_frame -DXBYAK_AVX512
2016-06-08 19:46:11 -07:00
./nm_frame | $FILTER > x.lst
2023-07-26 20:20:24 -07:00
diff -bB ok.lst x.lst && echo "ok"