2020-09-23 00:07:45 -07:00
|
|
|
#!/bin/sh
|
2016-06-08 19:46:11 -07:00
|
|
|
|
2022-11-28 07:52:58 -07:00
|
|
|
set -e
|
|
|
|
|
2020-09-23 00:07:45 -07:00
|
|
|
FILTER="grep -v warning"
|
2022-11-23 20:01:25 -07:00
|
|
|
CXX=${CXX:=g++}
|
2016-06-08 19:46:11 -07:00
|
|
|
|
2020-09-23 00:07:45 -07:00
|
|
|
case $1 in
|
|
|
|
64)
|
2016-06-08 19:46:11 -07:00
|
|
|
echo "nasm(64bit)"
|
2020-09-23 00:07:45 -07:00
|
|
|
EXE=nasm
|
|
|
|
OPT2=-DXBYAK64
|
|
|
|
OPT3=win64
|
|
|
|
FILTER=./normalize_prefix
|
|
|
|
;;
|
|
|
|
*)
|
2016-06-08 19:46:11 -07:00
|
|
|
echo "nasm(32bit)"
|
2020-09-23 00:07:45 -07:00
|
|
|
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
|
2020-09-23 00:07:45 -07:00
|
|
|
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"
|