aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test_avx.bat
blob: e40de157aa1d7baac3b82bd97045361a789c65b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@echo off
set FILTER=cat
set Y=0
if /i "%1"=="Y" (
	set Y=1
	set EXE=yasm.exe
	set OPT2=-DUSE_YASM -DXBYAK32
	set OPT3=win32
) else if /i "%1"=="64" (
	set EXE=nasm.exe
	set OPT2=-DXBYAK64
	set OPT3=win64
	set FILTER=normalize_prefix
) else if /i "%1"=="Y64" (
	set Y=1
	set EXE=yasm.exe
	set OPT2=-DUSE_YASM -DXBYAK64
	set OPT3=win64
	set FILTER=normalize_prefix
) else (
	set EXE=nasm.exe
	set OPT2=-DXBYAK32
	set OPT3=win32
)
call set_opt
bmake -f Makefile.win all
echo cl -I../ make_nm.cpp %OPT% %OPT2% /EHs /DUSE_AVX
cl -I../ make_nm.cpp %OPT% %OPT2% /EHs /DUSE_AVX
make_nm > a.asm
%EXE% -f %OPT3% -l a.lst a.asm
rem connect "?????-" and "??"
if /i "%Y%"=="1" (
	awk "NR > 1 {if (index($3, ""-"")) { conti=substr($3, 0, length($3) - 1) } else { conti = conti $3; print conti; conti = """" }} " < a.lst |%FILTER% > ok.lst
) else (
	awk "{if (index($3, ""-"")) { conti=substr($3, 0, length($3) - 1) } else { conti = conti $3; print conti; conti = """" }} " < a.lst |%FILTER% > ok.lst
)
make_nm jit > nm.cpp
echo cl -I../ -DXBYAK_TEST nm_frame.cpp %OPT% %OPT2%
cl -I../ -DXBYAK_TEST nm_frame.cpp %OPT% %OPT2%
nm_frame |%FILTER% > x.lst
diff -w x.lst ok.lst
wc x.lst