Fixing error reporting from gentests. Also renaming to 'xb gentests'.
This commit is contained in:
parent
7622746ecf
commit
c1d167aff8
30
xb.bat
30
xb.bat
|
@ -92,7 +92,7 @@ ECHO.
|
||||||
ECHO xb build [--checked OR --debug OR --release] [--force]
|
ECHO xb build [--checked OR --debug OR --release] [--force]
|
||||||
ECHO Initializes dependencies and prepares build environment.
|
ECHO Initializes dependencies and prepares build environment.
|
||||||
ECHO.
|
ECHO.
|
||||||
ECHO xb gentest
|
ECHO xb gentests
|
||||||
ECHO Generates test binaries (under src/xenia/cpu/frontend/test/bin/).
|
ECHO Generates test binaries (under src/xenia/cpu/frontend/test/bin/).
|
||||||
ECHO Run after modifying test .s files.
|
ECHO Run after modifying test .s files.
|
||||||
ECHO.
|
ECHO.
|
||||||
|
@ -262,9 +262,9 @@ GOTO :eof
|
||||||
|
|
||||||
|
|
||||||
REM ============================================================================
|
REM ============================================================================
|
||||||
REM xb gentest
|
REM xb gentests
|
||||||
REM ============================================================================
|
REM ============================================================================
|
||||||
:perform_gentest
|
:perform_gentests
|
||||||
SETLOCAL EnableDelayedExpansion
|
SETLOCAL EnableDelayedExpansion
|
||||||
ECHO Generating test binaries...
|
ECHO Generating test binaries...
|
||||||
|
|
||||||
|
@ -274,34 +274,36 @@ SET PPC_LD=%BINUTILS%\powerpc-none-elf-ld.exe
|
||||||
SET PPC_OBJDUMP=%BINUTILS%\powerpc-none-elf-objdump.exe
|
SET PPC_OBJDUMP=%BINUTILS%\powerpc-none-elf-objdump.exe
|
||||||
SET PPC_NM=%BINUTILS%\powerpc-none-elf-nm.exe
|
SET PPC_NM=%BINUTILS%\powerpc-none-elf-nm.exe
|
||||||
|
|
||||||
SET TEST_SRC=src\xenia\cpu\frontend\test\
|
SET TEST_SRC=src/xenia/cpu/frontend/test
|
||||||
SET TEST_BIN=%TEST_SRC%\bin
|
SET TEST_SRC_WIN=src\xenia\cpu\frontend\test
|
||||||
|
SET TEST_BIN=%TEST_SRC%/bin
|
||||||
|
SET TEST_BIN_WIN=%TEST_SRC_WIN%\bin
|
||||||
IF NOT EXIST %TEST_BIN% (mkdir %TEST_BIN%)
|
IF NOT EXIST %TEST_BIN% (mkdir %TEST_BIN%)
|
||||||
|
|
||||||
SET ANY_ERRORS=0
|
SET ANY_ERRORS=0
|
||||||
PUSHD %TEST_SRC%
|
PUSHD %TEST_SRC_WIN%
|
||||||
FOR %%G in (*.s) DO (
|
FOR %%G in (*.s) DO (
|
||||||
ECHO ^> generating %%~nG...
|
ECHO ^> generating %%~nG...
|
||||||
POPD
|
POPD
|
||||||
SET SRC_FILE=%TEST_SRC%\%%G
|
SET SRC_FILE=%TEST_SRC%/%%G
|
||||||
SET SRC_NAME=%%~nG
|
SET SRC_NAME=%%~nG
|
||||||
SET OBJ_FILE=%TEST_BIN%\!SRC_NAME!.o
|
SET OBJ_FILE=%TEST_BIN%/!SRC_NAME!.o
|
||||||
%PPC_AS% -a64 -be -mregnames -mpower7 -maltivec -mvsx -mvmx128 -R -o !OBJ_FILE! !SRC_FILE!
|
CMD /c %PPC_AS% -a64 -be -mregnames -mpower7 -maltivec -mvsx -mvmx128 -R -o !OBJ_FILE! !SRC_FILE! 2>&1
|
||||||
IF !ERRORLEVEL! NEQ 0 (
|
IF !ERRORLEVEL! NEQ 0 (
|
||||||
SET ANY_ERRORS=1
|
SET ANY_ERRORS=1
|
||||||
)
|
)
|
||||||
%PPC_OBJDUMP% --adjust-vma=0x100000 -Mpower7 -Mvmx128 -D -EB !OBJ_FILE! > %TEST_BIN%\!SRC_NAME!.dis.tmp
|
%PPC_OBJDUMP% --adjust-vma=0x100000 -Mpower7 -Mvmx128 -D -EB !OBJ_FILE! > %TEST_BIN%/!SRC_NAME!.dis.tmp
|
||||||
IF !ERRORLEVEL! NEQ 0 (
|
IF !ERRORLEVEL! NEQ 0 (
|
||||||
SET ANY_ERRORS=1
|
SET ANY_ERRORS=1
|
||||||
)
|
)
|
||||||
REM Eat the first 4 lines to kill the file path that'll differ across machines.
|
REM Eat the first 4 lines to kill the file path that'll differ across machines.
|
||||||
MORE +4 %TEST_BIN%\!SRC_NAME!.dis.tmp > %TEST_BIN%\!SRC_NAME!.dis
|
MORE +4 %TEST_BIN_WIN%\!SRC_NAME!.dis.tmp > %TEST_BIN_WIN%\!SRC_NAME!.dis
|
||||||
DEL %TEST_BIN%\!SRC_NAME!.dis.tmp
|
DEL %TEST_BIN_WIN%\!SRC_NAME!.dis.tmp
|
||||||
%PPC_LD% -A powerpc:common64 -melf64ppc -EB -nostdlib --oformat binary -Ttext 0x100000 -e 0x100000 -o %TEST_BIN%\!SRC_NAME!.bin !OBJ_FILE!
|
%PPC_LD% -A powerpc:common64 -melf64ppc -EB -nostdlib --oformat binary -Ttext 0x100000 -e 0x100000 -o %TEST_BIN%/!SRC_NAME!.bin !OBJ_FILE!
|
||||||
IF !ERRORLEVEL! NEQ 0 (
|
IF !ERRORLEVEL! NEQ 0 (
|
||||||
SET ANY_ERRORS=1
|
SET ANY_ERRORS=1
|
||||||
)
|
)
|
||||||
%PPC_NM% --numeric-sort !OBJ_FILE! > %TEST_BIN%\!SRC_NAME!.map
|
%PPC_NM% --numeric-sort !OBJ_FILE! > %TEST_BIN%/!SRC_NAME!.map
|
||||||
IF !ERRORLEVEL! NEQ 0 (
|
IF !ERRORLEVEL! NEQ 0 (
|
||||||
SET ANY_ERRORS=1
|
SET ANY_ERRORS=1
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue