Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #573 - optable listing for optable(ZS3) should match HLASM #593

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions bat/RUNTEST.BAT
Original file line number Diff line number Diff line change
@@ -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%
98 changes: 98 additions & 0 deletions rt/bat/RUNOPTABLES.BAT

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions rt/mlc/OPTB#Z9.OPT
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
noallow
optable(Z9,list)
stats
noloadhigh
nodump
notest
6 changes: 6 additions & 0 deletions rt/mlc/OPTB#ZS3.OPT
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
noallow
optable(ZS3,list)
stats
noloadhigh
nodump
notest
6 changes: 6 additions & 0 deletions rt/mlc/OPTB_ARCH-7.OPT
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
noallow
machine(ARCH-7,list)
stats
noloadhigh
nodump
notest
6 changes: 6 additions & 0 deletions rt/mlc/OPTB_ZS-3.OPT
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
noallow
machine(ZS-3,list)
stats
noloadhigh
nodump
notest
6 changes: 6 additions & 0 deletions rt/mlc/OPTB_z9.OPT
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
noallow
machine(Z9,list)
stats
noloadhigh
nodump
notest
6 changes: 6 additions & 0 deletions rt/mlc/OPTB_zSeries-3.OPT
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
noallow
machine(ZSERIES-3,list)
stats
noloadhigh
nodump
notest
48 changes: 39 additions & 9 deletions src/az390.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
*****************************************************/
Expand Down Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks the same as the previous line??? Does not appear to be changing anything, but okay.

my_operands="R1,R2,R3,M4"; // #500
}
else
{my_format="RRR"; // #500
{my_format="RRF"; // #500 #573
my_operands="R1,R2,R3"; // #500
}
break;
Expand Down
25 changes: 13 additions & 12 deletions src/tz390.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)
*****************************************************/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
78 changes: 78 additions & 0 deletions z390test/src/test/groovy/org/z390/test/TestOptables.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
/**
Expand Down Expand Up @@ -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
}
}