kerravon86@yahoo.com.au [hercules-390]
2018-10-15 23:58:24 UTC
I have taken a program from z/OS compiled
with IBM's C compiler and attempted to run
it on Hercules/380 which is based on
Hercules 3.07 but which enables lots of
z/Arch facilities.
The program is falling over on an STD
from R8:
10:11:47 PSW=078D1000 800BE39C 0000000000000000 INST=6080D0F0 STD 8,240(0,13) store_float_long
10:11:47 V:00000000000CF424:K:8E=00000000 00000000 00000000 00000000 ................
10:11:47 R0=00000000000CF434 R1=00000000000CF324 R2=00000000000B59D0 R3=00000000000BE38A
10:11:47 R4=0000000000000000 R5=00000000000B59D0 R6=0000000000000000 R7=00000000000B59D4
10:11:47 R8=00000000000C40F8 R9=0000000002011308 RA=00000000000CF094 RB=0000000000000001
10:11:47 RC=00000000000CECD8 RD=00000000000CF334 RE=00000000000CF334 RF=0000000000000000
10:11:47 CR00=C080EC40 CR01=0F855C00 CR02=FFFFFFFF CR03=00000000
10:11:47 CR04=00000000 CR05=00000000 CR06=00000000 CR07=00000000
10:11:47 CR08=00000000 CR09=00000000 CR10=00000000 CR11=00000000
10:11:47 CR12=00000000 CR13=00000000 CR14=EFC00000 CR15=00FE51B8
10:11:47 FPR0=00000000 00000000 FPR2=00000000 00000000
10:11:47 FPR4=00000000 00000000 FPR6=00000000 00000000
10:11:47 HHCCP014I CPU0000: Data exception CODE=0007 ILC=4 DXC=01
I looked up STD in the z/Arch POP but didn't
find anything useful.
I looked at the Hercules 3.07 and Hyperion
code and found this check:
https://github.com/hercules-390/hyperion/blob/master/opcode.h
/* Program check if r1 is not 0, 2, 4, or 6 */
#define HFPREG_CHECK(_r, _regs) \
if( (_r) & 9 ) \
(_regs)->program_interrupt( (_regs), PGM_SPECIFICATION_EXCEPTION)
So R8 is not valid, ie an R8/R9 pair.
Note that from looking at the Hercules code
it appears that z/Arch has increased the
number of floating point registers:
/*160*/ /* FWORD storefpr[8]; */ /* FP register save area */
/*xxx*/ FWORD storefpr[32]; /* FP register save area */
I can do that too, but R8 is still going to
fall under the (_r) & 9 check which
ensures the 4-bit value is either 0, 2,
4 or 6. I don't see a z/Arch version of
the check that relaxes that
restriction.
Any idea what is going on?
Thanks. Paul.
with IBM's C compiler and attempted to run
it on Hercules/380 which is based on
Hercules 3.07 but which enables lots of
z/Arch facilities.
The program is falling over on an STD
from R8:
10:11:47 PSW=078D1000 800BE39C 0000000000000000 INST=6080D0F0 STD 8,240(0,13) store_float_long
10:11:47 V:00000000000CF424:K:8E=00000000 00000000 00000000 00000000 ................
10:11:47 R0=00000000000CF434 R1=00000000000CF324 R2=00000000000B59D0 R3=00000000000BE38A
10:11:47 R4=0000000000000000 R5=00000000000B59D0 R6=0000000000000000 R7=00000000000B59D4
10:11:47 R8=00000000000C40F8 R9=0000000002011308 RA=00000000000CF094 RB=0000000000000001
10:11:47 RC=00000000000CECD8 RD=00000000000CF334 RE=00000000000CF334 RF=0000000000000000
10:11:47 CR00=C080EC40 CR01=0F855C00 CR02=FFFFFFFF CR03=00000000
10:11:47 CR04=00000000 CR05=00000000 CR06=00000000 CR07=00000000
10:11:47 CR08=00000000 CR09=00000000 CR10=00000000 CR11=00000000
10:11:47 CR12=00000000 CR13=00000000 CR14=EFC00000 CR15=00FE51B8
10:11:47 FPR0=00000000 00000000 FPR2=00000000 00000000
10:11:47 FPR4=00000000 00000000 FPR6=00000000 00000000
10:11:47 HHCCP014I CPU0000: Data exception CODE=0007 ILC=4 DXC=01
I looked up STD in the z/Arch POP but didn't
find anything useful.
I looked at the Hercules 3.07 and Hyperion
code and found this check:
https://github.com/hercules-390/hyperion/blob/master/opcode.h
/* Program check if r1 is not 0, 2, 4, or 6 */
#define HFPREG_CHECK(_r, _regs) \
if( (_r) & 9 ) \
(_regs)->program_interrupt( (_regs), PGM_SPECIFICATION_EXCEPTION)
So R8 is not valid, ie an R8/R9 pair.
Note that from looking at the Hercules code
it appears that z/Arch has increased the
number of floating point registers:
/*160*/ /* FWORD storefpr[8]; */ /* FP register save area */
/*xxx*/ FWORD storefpr[32]; /* FP register save area */
I can do that too, but R8 is still going to
fall under the (_r) & 9 check which
ensures the 4-bit value is either 0, 2,
4 or 6. I don't see a z/Arch version of
the check that relaxes that
restriction.
Any idea what is going on?
Thanks. Paul.