xbyak/test/test_nm.bat

47 lines
1.2 KiB
Batchfile
Raw Permalink Normal View History

2010-04-15 18:33:04 -07:00
@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
2020-07-20 02:28:36 -07:00
) else if /i "%1"=="noexcept" (
set EXE=nasm.exe
set OPT2=-DXBYAK32 -DXBYAK_NO_EXCEPTION
2020-07-20 02:28:36 -07:00
set OPT3=win32
2010-04-15 18:33:04 -07:00
) else (
set EXE=nasm.exe
set OPT2=-DXBYAK32
2010-04-15 18:33:04 -07:00
set OPT3=win32
)
2016-06-14 01:47:34 -07:00
call set_opt
bmake -f Makefile.win all
2010-04-15 18:33:04 -07:00
echo cl -I../ make_nm.cpp %OPT% %OPT2% /EHs
cl -I../ make_nm.cpp %OPT% %OPT2% /EHs
make_nm > a.asm
2019-09-09 00:38:17 -07:00
rm -rf a.lst
2012-10-28 18:13:56 -07:00
echo %EXE% -f %OPT3% -l a.lst a.asm
2010-04-15 18:33:04 -07:00
%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
cl -I../ -DXBYAK_TEST nm_frame.cpp %OPT% %OPT2%
2010-04-15 18:33:04 -07:00
nm_frame |%FILTER% > x.lst
diff -wb x.lst ok.lst && echo "ok"