hercules-390 / hyperion

Hercules 390
Other
248 stars 67 forks source link

Test case pfpo-esa.tst fails with spec. execption in 390 mode. #164

Closed srorso closed 7 years ago

srorso commented 7 years ago

Test case pfpo-esa fails with a specification exception when run with archlvl esa-390. It fails as expected with an operation exception with archlvl s/370.

The test case fails when run stand-alone but runs successfully when run in sequence because of a typo in the archlvl command in the .tst file. The typo causes the test case to pass because the alphabetically prior test case, mvcle, runs in s/370 mode and there is no reset of archlvl by runtest between test cases. (And I am not sure there should be a reset.)

The alltests.out log shows the following:

HHC00801I Processor CP00: Specification exception code 0006  ilc 0
HHC02325E PSW=0001000000000070  Instruction fetch error
HHC02269I GR00=00000000 GR01=00000000 GR02=00000000 GR03=00000000
HHC02269I GR04=00000000 GR05=00000000 GR06=00000000 GR07=00000000
HHC02269I GR08=00000000 GR09=00000000 GR10=00000000 GR11=00000000
HHC02269I GR12=00000000 GR13=00000000 GR14=00000000 GR15=00000000
HHC00007I Previous message from function 's390_display_inst' at hscmisc.c(2610)
HHC00803I Processor CP00: program interrupt loop PSW 00020000 DEADDEAD

The issue occurs when run under Windows 10 32-bit and Debian 8.6 64-bit. Other systems have not (yet) been tested.

srorso commented 7 years ago

Sorry, need to reproduce on unmodified Hyperion.

srorso commented 7 years ago

Issue occurs on Hyperion without Softfloat mods; verified on Windows 32-bit.

srorso commented 7 years ago

In ESA/390 mode, bit position 12 of the PSW must be a 1, otherwise a specification exception occurs, according to Figure 4-2 on page 4-5 and right-hand paragraph 4 on page 4-6 of the ESA/390 Principles of Operation, SA22-7201-08. Changing the restart and program check new PSWs in pfpo-esa.tst addresses the issue.

PSW 0000 0000 0000 0070  -->  0008 0000 0000 0070    (restart PSW)
PSW 0002 0000 DEAD DEAD  -->  000A 0000 DEAD DEAD    (Pgmchk new PSW)

Because the .tst file is generated from an .assemble file under CMS and I don't have CMS, I respectfully seek the assistance of the author in committing the "permanent" change.

jphartmann commented 7 years ago

A test case cannot do anything of its own volition. The *xyz commands are comments as far as Hercules is concerned; they are processed after Hercules has terminated and thus cannot in any way affect the program being run. So the onus is on the test writer to ensure the system is brought into a predictable and consistent state.

That said, I cannot see how that test case could ever have run, but then there are other things that are strange here.

I shall look into this tomorrow.

jphartmann commented 7 years ago

I have removed that pfpo-esa test case and sent an updated test case that supports both esa and z to steve.

The z test fails with 0c1.

srorso commented 7 years ago

Updated cases committed with SoftFloat-3a integration in ieee.c. Closing.