From 7b7ca8d66fe28d4924a9cc42251bb548bec24c86 Mon Sep 17 00:00:00 2001 From: Abe Kornelis Date: Sun, 13 Oct 2024 16:18:22 +0200 Subject: [PATCH 1/3] Add support for testing Z9 optable and machine options --- bat/RUNTEST.BAT | 23 +++++ rt/bat/RUNOPTABLES.BAT | 98 +++++++++++++++++++ rt/mlc/OPTB#Z9.OPT | 6 ++ rt/mlc/OPTB#ZS3.OPT | 6 ++ rt/mlc/OPTB_ARCH-7.OPT | 6 ++ rt/mlc/OPTB_ZS-3.OPT | 6 ++ rt/mlc/OPTB_z9.OPT | 6 ++ rt/mlc/OPTB_zSeries-3.OPT | 6 ++ .../groovy/org/z390/test/TestOptables.groovy | 78 +++++++++++++++ 9 files changed, 235 insertions(+) create mode 100644 bat/RUNTEST.BAT create mode 100644 rt/mlc/OPTB#Z9.OPT create mode 100644 rt/mlc/OPTB#ZS3.OPT create mode 100644 rt/mlc/OPTB_ARCH-7.OPT create mode 100644 rt/mlc/OPTB_ZS-3.OPT create mode 100644 rt/mlc/OPTB_z9.OPT create mode 100644 rt/mlc/OPTB_zSeries-3.OPT diff --git a/bat/RUNTEST.BAT b/bat/RUNTEST.BAT new file mode 100644 index 00000000..1e06a689 --- /dev/null +++ b/bat/RUNTEST.BAT @@ -0,0 +1,23 @@ +@if /I "%1" == "tron" (echo on) else (echo off) +rem runtest run a regression test using gradle + +setlocal +if /I "%1" == "tron" (set z_TraceMode=tron + shift /1 + ) else (if /I "%1" == "troff" (set z_TraceMode=troff + shift /1 + ) else (set z_TraceMode=) + ) +set /A z_NestLevel=%z_NestLevel%+1 +rem ----- Lvl(%z_NestLevel%) Start %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 +pushd %~dps0..\z390test + +if %1. == . (call gradlew test --rerun + ) else (call gradlew test --rerun --tests %1 %2 %3 %4 %5 %6 %7 %8 %9 + ) +set z_ReturnCode=%ERRORLEVEL% + +:return +popd +rem ----- Lvl(%z_NestLevel%) End %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 +exit /b %z_ReturnCode% diff --git a/rt/bat/RUNOPTABLES.BAT b/rt/bat/RUNOPTABLES.BAT index 1835536e..1173bf8c 100644 --- a/rt/bat/RUNOPTABLES.BAT +++ b/rt/bat/RUNOPTABLES.BAT @@ -16,6 +16,8 @@ set z_MaxRetCode=0 set count_ok=0 set count_err=0 +set err_optable= +set err_machine= if /I %1. EQU /Q. goto Quick if /I %1. NEQ . goto %1 :Quick @@ -33,6 +35,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% optable 360-20 *None set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_optable=%err_optable% 360-20 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . if /I %1. NEQ /Q. goto return @@ -42,6 +45,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% optable DOS set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_optable=%err_optable% DOS if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . if /I %1. NEQ /Q. goto return @@ -51,6 +55,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% optable 370 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_optable=%err_optable% 370 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . if /I %1. NEQ /Q. goto return @@ -60,6 +65,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% optable XA set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_optable=%err_optable% XA if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . if /I %1. NEQ /Q. goto return @@ -69,6 +75,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% optable ESA set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_optable=%err_optable% ESA if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . if /I %1. NEQ /Q. goto return @@ -79,6 +86,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% optable ZOP set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_optable=%err_optable% ZOP if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . if /I %1. NEQ /Q. goto return @@ -88,6 +96,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% optable ZS1 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_optable=%err_optable% ZS1 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . if /I %1. NEQ /Q. goto return @@ -98,6 +107,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% optable YOP set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_optable=%err_optable% YOP if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . if /I %1. NEQ /Q. goto return @@ -107,6 +117,28 @@ call rt\bat\RUNOPTABLE %z_TraceMode% optable ZS2 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_optable=%err_optable% ZS2 + if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) +if %1. NEQ . if /I %1. NEQ /Q. goto return + +rem Optable Z9 - Synonym of ZS3 +:Z9 +if %1. NEQ . if /I %1. EQU /Q. goto ZS3 +call rt\bat\RUNOPTABLE %z_TraceMode% optable Z9 +set z_ReturnCode=%ERRORLEVEL% +if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( + set /A count_err=%count_err%+1 + set err_optable=%err_optable% Z9 + if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) +if %1. NEQ . if /I %1. NEQ /Q. goto return + +rem Optable ZS3 - Synonym of Z9 +:ZS3 +call rt\bat\RUNOPTABLE %z_TraceMode% optable ZS3 +set z_ReturnCode=%ERRORLEVEL% +if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( + set /A count_err=%count_err%+1 + set err_optable=%err_optable% ZS3 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . if /I %1. NEQ /Q. goto return @@ -116,6 +148,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% optable UNI *None set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_optable=%err_optable% uni if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . if /I %1. NEQ /Q. goto return @@ -135,6 +168,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine S360-20 *None set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% S360-20 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -144,6 +178,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine S370 370 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% S370 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -153,6 +188,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine S370XA XA set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% S370XA if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -162,6 +198,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine ARCH-0 XA set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% ARCH-0 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -171,6 +208,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine S370ESA ESA set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% S370ESA if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -180,6 +218,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine S390 ESA set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% S390 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -189,6 +228,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine S390E ESA set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% S390E if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -198,6 +238,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine ARCH-1 ESA set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% ARCH-1 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -207,6 +248,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine ARCH-2 ESA set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% ARCH-2 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -216,6 +258,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine ARCH-3 ESA set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% ARCH-3 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -225,6 +268,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine ARCH-4 ESA set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% ARCH-4 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -234,6 +278,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine zSeries ZS1 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% zSeries if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -243,6 +288,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine zSeries-1 ZS1 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% zSeries-1 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -252,6 +298,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine ZS ZS1 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% ZS if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -261,6 +308,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine ZS-1 ZS1 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% ZS-1 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -270,6 +318,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine z800 ZS1 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% z800 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -279,6 +328,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine z900 ZS1 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% z900 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -288,6 +338,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine ARCH-5 ZS1 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% ARCH-5 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -297,6 +348,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine z890 ZS2 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% z890 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -306,6 +358,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine z990 ZS2 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% z990 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -315,6 +368,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine zSeries-2 ZS2 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% zSeries-2 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -324,6 +378,7 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine ZS-2 ZS2 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% ZS-2 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return @@ -333,11 +388,54 @@ call rt\bat\RUNOPTABLE %z_TraceMode% machine ARCH-6 ZS2 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( set /A count_err=%count_err%+1 + set err_machine=%err_machine% ARCH-6 + if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) +if %1. NEQ . goto return + +rem Machine z9 - equivalent of Optable(ZS3) +:machine_z9 +call rt\bat\RUNOPTABLE %z_TraceMode% machine z9 ZS3 +set z_ReturnCode=%ERRORLEVEL% +if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( + set /A count_err=%count_err%+1 + set err_machine=%err_machine% z9 + if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) +if %1. NEQ . goto return + +rem Machine zSeries-3 - equivalent of Optable(ZS3) +:zSeries-3 +call rt\bat\RUNOPTABLE %z_TraceMode% machine zSeries-3 ZS3 +set z_ReturnCode=%ERRORLEVEL% +if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( + set /A count_err=%count_err%+1 + set err_machine=%err_machine% zSeries-3 + if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) +if %1. NEQ . goto return + +rem Machine ZS-3 - equivalent of Optable(ZS3) +:ZS-3 +call rt\bat\RUNOPTABLE %z_TraceMode% machine ZS-3 ZS3 +set z_ReturnCode=%ERRORLEVEL% +if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( + set /A count_err=%count_err%+1 + set err_machine=%err_machine% ZS-3 + if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) +if %1. NEQ . goto return + +rem Machine ARCH-7 - equivalent of Optable(ZS3) +:ARCH-6 +call rt\bat\RUNOPTABLE %z_TraceMode% machine ARCH-7 ZS3 +set z_ReturnCode=%ERRORLEVEL% +if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( + set /A count_err=%count_err%+1 + set err_machine=%err_machine% ARCH-7 if %z_ReturnCode% GTR %z_MaxRetCode% (set z_MaxRetCode=%z_ReturnCode%) ) if %1. NEQ . goto return :report echo %count_ok% tests were okay and %count_err% failed. Returncode is %z_MaxRetCode% +IF %count_err% NEQ 0 echo Failed optables: %err_optable% +IF %count_err% NEQ 0 echo Failed machines: %err_machine% :return popd diff --git a/rt/mlc/OPTB#Z9.OPT b/rt/mlc/OPTB#Z9.OPT new file mode 100644 index 00000000..e03ef04b --- /dev/null +++ b/rt/mlc/OPTB#Z9.OPT @@ -0,0 +1,6 @@ +noallow + optable(Z9,list) + stats +noloadhigh +nodump +notest diff --git a/rt/mlc/OPTB#ZS3.OPT b/rt/mlc/OPTB#ZS3.OPT new file mode 100644 index 00000000..8604fb96 --- /dev/null +++ b/rt/mlc/OPTB#ZS3.OPT @@ -0,0 +1,6 @@ +noallow + optable(ZS3,list) + stats +noloadhigh +nodump +notest diff --git a/rt/mlc/OPTB_ARCH-7.OPT b/rt/mlc/OPTB_ARCH-7.OPT new file mode 100644 index 00000000..558d9d07 --- /dev/null +++ b/rt/mlc/OPTB_ARCH-7.OPT @@ -0,0 +1,6 @@ +noallow + machine(ARCH-7,list) + stats +noloadhigh +nodump +notest diff --git a/rt/mlc/OPTB_ZS-3.OPT b/rt/mlc/OPTB_ZS-3.OPT new file mode 100644 index 00000000..2ab6e37a --- /dev/null +++ b/rt/mlc/OPTB_ZS-3.OPT @@ -0,0 +1,6 @@ +noallow + machine(ZS-3,list) + stats +noloadhigh +nodump +notest diff --git a/rt/mlc/OPTB_z9.OPT b/rt/mlc/OPTB_z9.OPT new file mode 100644 index 00000000..eb4e5526 --- /dev/null +++ b/rt/mlc/OPTB_z9.OPT @@ -0,0 +1,6 @@ +noallow + machine(Z9,list) + stats +noloadhigh +nodump +notest diff --git a/rt/mlc/OPTB_zSeries-3.OPT b/rt/mlc/OPTB_zSeries-3.OPT new file mode 100644 index 00000000..1f5b6fdb --- /dev/null +++ b/rt/mlc/OPTB_zSeries-3.OPT @@ -0,0 +1,6 @@ +noallow + machine(ZSERIES-3,list) + stats +noloadhigh +nodump +notest diff --git a/z390test/src/test/groovy/org/z390/test/TestOptables.groovy b/z390test/src/test/groovy/org/z390/test/TestOptables.groovy index 3f4368c6..ec736991 100644 --- a/z390test/src/test/groovy/org/z390/test/TestOptables.groovy +++ b/z390test/src/test/groovy/org/z390/test/TestOptables.groovy @@ -128,6 +128,32 @@ class TestOptables extends z390Test { assert rc == 0 } + @Test + void test_optable_Z9() { + /** + * test 8A - optable(Z9) + */ + var z390prn = basePath("rt", "mlc", "OPTB#Z9.PRN") + env = ['Z390PRN': basePath("rt", "mlc", "OPTB#Z9.PRN"), + 'HLASMPRN': basePath("rt", "mlc", "OPTB#Z9.TF1")] + int rc = this.asmlg(basePath("rt", "mlc", "OPTB#"), *this.options, "sysprn(${z390prn})", "@${basePath("rt", "mlc", "OPTB#Z9.OPT")}") + this.printOutput() + assert rc == 0 + } + + @Test + void test_optable_ZS3() { + /** + * test 8B - optable(ZS3) + */ + var z390prn = basePath("rt", "mlc", "OPTB#ZS3.PRN") + env = ['Z390PRN': basePath("rt", "mlc", "OPTB#ZS3.PRN"), + 'HLASMPRN': basePath("rt", "mlc", "OPTB#ZS3.TF1")] + int rc = this.asmlg(basePath("rt", "mlc", "OPTB#"), *this.options, "sysprn(${z390prn})", "@${basePath("rt", "mlc", "OPTB#ZS3.OPT")}") + this.printOutput() + assert rc == 0 + } + @Test void test_optable_UNI() { /** @@ -443,4 +469,56 @@ class TestOptables extends z390Test { this.printOutput() assert rc == 0 } + + @Test + void test_machine_z9() { + /** + * test 8C - machine(z9) + */ + var z390prn = basePath("rt", "mlc", "OPTB_z9.PRN") + env = ['Z390PRN': basePath("rt", "mlc", "OPTB_z9.PRN"), + 'HLASMPRN': basePath("rt", "mlc", "OPTB#Z9.TF1")] + int rc = this.asmlg(basePath("rt", "mlc", "OPTB#"), *this.options, "sysprn(${z390prn})", "@${basePath("rt", "mlc", "OPTB_z9.OPT")}") + this.printOutput() + assert rc == 0 + } + + @Test + void test_machine_zSeries3() { + /** + * test 8D - machine(zSeries-3) + */ + var z390prn = basePath("rt", "mlc", "OPTB_zSeries-3.PRN") + env = ['Z390PRN': basePath("rt", "mlc", "OPTB_zSeries-3.PRN"), + 'HLASMPRN': basePath("rt", "mlc", "OPTB#Z9.TF1")] + int rc = this.asmlg(basePath("rt", "mlc", "OPTB#"), *this.options, "sysprn(${z390prn})", "@${basePath("rt", "mlc", "OPTB_zSeries-3.OPT")}") + this.printOutput() + assert rc == 0 + } + + @Test + void test_machine_ZS3() { + /** + * test 8E - machine(ZS-3) + */ + var z390prn = basePath("rt", "mlc", "OPTB_ZS-3.PRN") + env = ['Z390PRN': basePath("rt", "mlc", "OPTB_ZS-3.PRN"), + 'HLASMPRN': basePath("rt", "mlc", "OPTB#Z9.TF1")] + int rc = this.asmlg(basePath("rt", "mlc", "OPTB#"), *this.options, "sysprn(${z390prn})", "@${basePath("rt", "mlc", "OPTB_ZS-3.OPT")}") + this.printOutput() + assert rc == 0 + } + + @Test + void test_machine_ARCH7() { + /** + * test 8F - machine(ARCH-7) + */ + var z390prn = basePath("rt", "mlc", "OPTB_ARCH-7.PRN") + env = ['Z390PRN': basePath("rt", "mlc", "OPTB_ARCH-7.PRN"), + 'HLASMPRN': basePath("rt", "mlc", "OPTB#Z9.TF1")] + int rc = this.asmlg(basePath("rt", "mlc", "OPTB#"), *this.options, "sysprn(${z390prn})", "@${basePath("rt", "mlc", "OPTB_ARCH-7.OPT")}") + this.printOutput() + assert rc == 0 + } } \ No newline at end of file From d87a10b99ea3f250dba75033a4330986fad4ae71 Mon Sep 17 00:00:00 2001 From: Abe Kornelis Date: Mon, 28 Oct 2024 16:06:57 +0100 Subject: [PATCH 2/3] changes for issue #573 to fix optable listing for ZS3/Z9 --- src/az390.java | 48 +++++++++++++++++++++++++++++++++++++++--------- src/tz390.java | 25 +++++++++++++------------ 2 files changed, 52 insertions(+), 21 deletions(-) diff --git a/src/az390.java b/src/az390.java index d530a8af..5bb613a1 100644 --- a/src/az390.java +++ b/src/az390.java @@ -429,6 +429,7 @@ public class az390 implements Runnable { * 2024-08-15 AFK #554 Correct OPTABLE(ESA,LIST) output to match HLASM * 2024-08-23 AFK #561 Correct OPTABLE(ZOP,LIST) output to match HLASM * 2024-09-09 AFK #568 Correct OPTABLE(YOP,LIST) output to match HLASM + * 2024-10-13 AFK #573 Correct OPTABLE(Z9,LIST) output to match HLASM ***************************************************** * Global variables last rpi *****************************************************/ @@ -1924,6 +1925,16 @@ else if (tz390.op_trace_type[index]==102) else if (tz390.op_name[index].equals("PALB")) {my_operands=""; // #554 } // #554 + else if (tz390.op_name[index].equals("CUTFU") // #573 + || tz390.op_name[index].equals("CUUTF") // #573 + || tz390.op_name[index].equals("CU12") // #573 + || tz390.op_name[index].equals("CU21") // #573 + || tz390.op_name[index].equals("SSKE")) // #573 + {if (tz390.opt_optable_optb_nr >= 7) // Z9 and above // #573 + {my_format="RRF"; // #573 + my_operands="R1,R2<,M3>"; // #573 + } // #573 + } // #573 } else if (tz390.op_trace_type[index]==142) {if (tz390.op_name[index].equals("EFPC") @@ -1936,13 +1947,18 @@ else if (tz390.op_trace_type[index]==142) {my_operands="R1"; // #500 } } - //**!! else if (tz390.op_trace_type[index]==143) - //**!! {if (!tz390.opt_optable.equals("ZOP") // #500 - //**!! && !tz390.opt_optable.equals("YOP") // #500 - //**!! ) // #500 - //**!! {entry=entry+"R1,R2<,M3>"; // #500 - //**!! } // #500 - //**!! } + else if (tz390.op_trace_type[index]==143) // #573 + {if (tz390.op_name[index].equals("TROO") // #573 + || tz390.op_name[index].equals("TROT") // #573 + || tz390.op_name[index].equals("TRTO") // #573 + || tz390.op_name[index].equals("TRTT") // #573 + ) // #573 + {if (tz390.opt_optable_optb_nr >= 7) // Z9 and above // #573 + {my_format="RRF"; // #573 + my_operands="R1,R2<,M3>"; // #573 + } // #573 + } // #573 + } // #573 else if (tz390.op_trace_type[index]==144) {if (tz390.op_name[index].equals("ESEA") || tz390.op_name[index].equals("EPAIR") @@ -1959,6 +1975,13 @@ else if (tz390.op_name[index].equals("PCC") ) {my_operands=""; // #500 } // #500 + else if (tz390.op_name[index].equals("CU14") // #573 + || tz390.op_name[index].equals("CU24")) // #573 + {if (tz390.opt_optable_optb_nr >= 7) // Z9 and above // #573 + {my_format="RRF"; // #573 + my_operands="R1,R2<,M3>"; // #573 + } // #573 + } // #573 } else if (tz390.op_trace_type[index]==147) {my_operands="R1"; // #500 @@ -1983,6 +2006,10 @@ else if (tz390.op_trace_type[index]==147) else // full opcode // #554 my_operands="RI2"; // mask implied by mnemonic // #554 } // #554 + else if (tz390.op_trace_type[index]==160 // #573 + || tz390.op_trace_type[index]==161) // #573 + {my_operands="R1,I2"; // #573 + } // #573 else if (tz390.op_trace_type[index]==163) // #554 {my_operands="R1,RI2"; // #554 } // #554 @@ -2077,6 +2104,9 @@ else if (tz390.op_name[index].equals("MVCK") case 30: my_format="RRF"; // #500 my_operands="R1,R3,R2,M4"; // #554 + if (tz390.op_trace_type[index]==301) // #573 + {my_operands="R1,M3,R2,M4"; // #573 + } // #573 break; case 31: my_format="SS"; // #500 @@ -2124,11 +2154,11 @@ else if (tz390.op_trace_type[index]==343) case 36: // Alternate formats have mnemonics ending in 'A' if (my_mnemonic.substring(my_mnemonic.length()-1).equals("A")) // #500 - {my_format="RRF"; // #500 + {my_format="RRF"; // #500 #573 my_operands="R1,R2,R3,M4"; // #500 } else - {my_format="RRR"; // #500 + {my_format="RRF"; // #500 #573 my_operands="R1,R2,R3"; // #500 } break; diff --git a/src/tz390.java b/src/tz390.java index aec98162..3eaa1e02 100644 --- a/src/tz390.java +++ b/src/tz390.java @@ -335,6 +335,7 @@ public class tz390 { * 2024-08-23 AFK #561 Correct OPTABLE(ZOP,LIST) output to match HLASM * 2024-09-04 #564 fix invalid argument in String compare * 2024-09-09 AFK #568 Correct OPTABLE(YOP,LIST) output to match HLASM + * 2024-10-13 AFK #573 Correct OPTABLE(Z9,LIST) output to match HLASM ******************************************************** * Shared z390 tables (last RPI) *****************************************************/ @@ -2393,20 +2394,9 @@ public class tz390 { {"0104=PTFF,1,10", // "0104" "PTFF" "E" 1 Z9-1 "010A=PFPO,1,10", // 40 "010A" "PFPO" "E" 1 RPI 1013 "B27C=STCKF,7,70", // "B27C" "STCKF" "S" 7 Z9-2 - "B280=LPP,7,70", // S,LPP,D1(B1) RPI 2221 - "B284=LCCTL,7,70", // S,LCCTL,D1(B1) RPI 2221 - "B285=LPCTL,7,70", // S,LPCTL,D1(B1) RPI 2221 - "B286=QSI,7,70", // S,QSI,D1(B1) RPI 2221 - "B287=LSCTL,7,70", // S,LSCTL,D1(B1) RPI 2221 - "B28E=QCTRI,7,70", // S,QCTRI,D1(B1) RPI 2221 "B2B0=STFLE,7,70", // "B2B0" "STFLE" "S" 7 Z9-3 "B2B9=SRNMT,7,71", // 3395 "B2B9" "SRNMT" "S" 7 DFP 56 "B2BD=LFAS,7,72", // 3395 "B2BD" "LFAS" "S" 7 DFP 55 - "B2E0=SCCTR,14,142", // RRE,SCCTR,R1,R2 RPI 2221 - "B2E1=SPCTR,14,142", // RRE,SPCTR,R1,R2 RPI 2221 - "B2E4=ECCTR,14,142", // RRE B2E4 R1,R2", // RPI 2221 - "B2E5=EPCTR,14,142", // RRE B2E5 R1,R2", // RPI 2221 - "B2ED=ECPGA,14,142", // RRE B2ED R1,R2", // RPI 2221 "B338=MAYLR,15,150", // "B338" "MAYLR" "RRF1" 15 Z9-4 "B339=MYLR,15,150", // "B339" "MYLR" "RRF1" 15 Z9-5 "B33A=MAYR,15,150", // "B33A" "MAYR" "RRF1" 15 Z9-6 @@ -2520,7 +2510,18 @@ public class tz390 { "ED59=TDGXT,24,241", // "TDGXT" "RXE" 24 DFP 54 }; String[] op_table_ZS4 = // Table added for RPI 1209A - {"B928=PCKMO,14,144", // "B928" "PCKMO" "RE4" 14 RPI 1125 Z196 + {"B280=LPP,7,70", // S,LPP,D1(B1) RPI 2221 + "B284=LCCTL,7,70", // S,LCCTL,D1(B1) RPI 2221 + "B285=LPCTL,7,70", // S,LPCTL,D1(B1) RPI 2221 + "B286=QSI,7,70", // S,QSI,D1(B1) RPI 2221 + "B287=LSCTL,7,70", // S,LSCTL,D1(B1) RPI 2221 + "B28E=QCTRI,7,70", // S,QCTRI,D1(B1) RPI 2221 + "B2E0=SCCTR,14,142", // RRE,SCCTR,R1,R2 RPI 2221 + "B2E1=SPCTR,14,142", // RRE,SPCTR,R1,R2 RPI 2221 + "B2E4=ECCTR,14,142", // RRE B2E4 R1,R2", // RPI 2221 + "B2E5=EPCTR,14,142", // RRE B2E5 R1,R2", // RPI 2221 + "B2ED=ECPGA,14,142", // RRE B2ED R1,R2", // RPI 2221 + "B928=PCKMO,14,144", // "B928" "PCKMO" "RE4" 14 RPI 1125 Z196 "B960=CGRT,39,151", // 10 "B960" "CGRT" "RRF5" 39 RPI 817 #485 "B960m=CGRTm,40,151;*Short;F=", // "B960m" "CGRTm" "RRF6" 40 #485 "B961=CLGRT,39,151", // 10 "B961" "CLGRT" "RRF5" 39 RPI 817 #485 From 10df0656f7096e13f79f146148be42e134187062 Mon Sep 17 00:00:00 2001 From: Abe Kornelis Date: Fri, 1 Nov 2024 21:58:05 +0100 Subject: [PATCH 3/3] Fix typo in test script --- rt/bat/RUNOPTABLES.BAT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rt/bat/RUNOPTABLES.BAT b/rt/bat/RUNOPTABLES.BAT index 1173bf8c..ebf24230 100644 --- a/rt/bat/RUNOPTABLES.BAT +++ b/rt/bat/RUNOPTABLES.BAT @@ -423,7 +423,7 @@ if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else ( if %1. NEQ . goto return rem Machine ARCH-7 - equivalent of Optable(ZS3) -:ARCH-6 +:ARCH-7 call rt\bat\RUNOPTABLE %z_TraceMode% machine ARCH-7 ZS3 set z_ReturnCode=%ERRORLEVEL% if %z_ReturnCode% EQU 0 (set /A count_ok=%count_ok%+1) else (