diff options
author | MITSUNARI Shigeo <[email protected]> | 2012-03-16 22:04:44 +0900 |
---|---|---|
committer | MITSUNARI Shigeo <[email protected]> | 2012-03-16 22:04:44 +0900 |
commit | 9d9f985fff80aad1f06117e4bca634d9eefd7d88 (patch) | |
tree | 313eceecebe3e68407bec8e753d2d56242d5ce83 /test/test_avx.sh | |
parent | 7056b38d362b09e3a86113885281859df63bb7fc (diff) | |
download | xbyak-9d9f985fff80aad1f06117e4bca634d9eefd7d88.tar.gz xbyak-9d9f985fff80aad1f06117e4bca634d9eefd7d88.zip |
add test script
Diffstat (limited to 'test/test_avx.sh')
-rwxr-xr-x | test/test_avx.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/test/test_avx.sh b/test/test_avx.sh new file mode 100755 index 0000000..1940515 --- /dev/null +++ b/test/test_avx.sh @@ -0,0 +1,44 @@ +#!/bin/tcsh + +set FILTER=cat + +if ($1 == "Y") then + echo "yasm(32bit)" + set EXE=yasm + set OPT2="-DUSE_YASM -DXBYAK32" + set OPT3=win32 +else if ($1 == "64") then + echo "nasm(64bit)" + set EXE=nasm + set OPT2=-DXBYAK64 + set OPT3=win64 + set FILTER=./normalize_prefix +else if ($1 == "Y64") then + echo "yasm(64bit)" + set EXE=yasm + set OPT2="-DUSE_YASM -DXBYAK64" + set OPT3=win64 + set FILTER=./normalize_prefix +else + echo "nasm(32bit)" + set EXE=nasm + set OPT2=-DXBYAK32 + set OPT3=win32 +endif + +set CFLAGS="-Wall -fno-operator-names -I../ $OPT2 -DUSE_AVX" +echo "compile make_nm.cpp" +g++ $CFLAGS make_nm.cpp -o make_nm + +./make_nm > a.asm +echo "asm" +$EXE -f$OPT3 a.asm -l a.lst +awk '{if (index($3, "-")) { conti=substr($3, 0, length($3) - 1) } else { conti = conti $3; print conti; conti = "" }} ' < a.lst | $FILTER > ok.lst + +echo "xbyak" +./make_nm jit > nm.cpp +echo "compile nm_frame.cpp" +g++ $CFLAGS -DXBYAK_TEST nm_frame.cpp -o nm_frame +./nm_frame | $FILTER > x.lst +diff ok.lst x.lst && echo "ok" +exit 0 |