He,
Thank you for your continued support!
Per:
ST 15,4(,13) --- The 'ST' seems useless under your situation. May I know the compile options you used? I tried 31bit and 64bit Metal C, but I didn't get result like yours. For 31bit, the ST is generated and the field 4(,13) is used later in epilog. For 64 bit, the ST instruction is not generated.
The compiler options (gleaned from the listing) were:*NOGONUMBER *NOALIAS *NORENT *TERMINAL *NOUPCONV *SOURCE *LIST
*XREF *NOAGG *NOPPONLY *NOEXPMAC *NOSHOWINC *NOOFFSET *MEMORY *SSCOMM
*NOSHOWMACROS *SKIPSRC(HIDE) *NOREPORT *NOMAKEDEP *PREFETCH *THREADED
*NOLONGNAME *START *EXECOPS *ARGPARSE *NOEXPORTALL*NODLL(NOCALLBACKANY)
*NOLIBANSI *NOWSIZEOF *REDIR *ANSIALIAS *DIGRAPH *NOROCONST *ROSTRING
*TUNE(7) *ARCH(7) *SPILL(128) *MAXMEM(2097152) *NOCOMPACT
*TARGET(LE,CURRENT) *FLAG(I) *NOTEST(SYM,NOBLOCK,NOLINE,NOPATH,NOHOOK) *NOOPTIMIZE
*INLINE(AUTO,NOREPORT,100,1000) *NESTINC(255) *BITFIELD(UNSIGNED)
*NOINFO
*NODFP
*NOVECTOR
*FLOAT(IEEE,FOLD,NOMAF,NORRM,AFP(NOVOLATILE)) *ROUND(N)
*STRICT
*NOCOMPRESS *NOSTRICT_INDUCTION *AGGRCOPY(NOOVERLAP) *CHARS(UNSIGNED)
*NOIGNERRNO
*NOINITAUTO
*CSECT
*NOEVENTS
*ASSERT(RESTRICT)
*NORESTRICT
*NOOBJECT
*GENASM
*OPTFILE(//'TLN.V200.PSOURCE(TLNMCOPT)')
*NOSERVICE
*NOOE
*NOIPA
*SEARCH(/usr/include/metal/, 'CBC.SCCNSAM')
*LSEARCH('TLN.V200.PSOURCE.H', 'TLN.V200.PSOURCE.CHDSECT', 'C21S.METALC.ZOS21.CHDSECT',
'C21S.METALC.MODGEN21.CHDSECT')
*NOLOCALE *HALT(16) *PLIST(HOST)
*NOCONVLIT
*NOASCII
*NOGOFF *ILP32 *NOWARN64 *HGPR(PRESERVE) *NOHOT *METAL *NOARMODE
*NOXPLINK(NOBACKCHAIN,NOSTOREARGS,NOCALLBACK,GUARD,OSCALL(NOSTACK))
*ENUMSIZE(SMALL)
*NOHALTONMSG
*NOSUPPRESS
*RESERVED_REG(R12)
*NORTCHECK
*NODEBUG
*NOSQL
*NOCICS
*UNROLL(AUTO)
*KEYWORD()
*NOKEYWORD(asm,typeof)
*NOSEVERITY
*NODSAUSER
*NOINCLUDE
*NOSMP
*SYSSTATE(NOASCENV,OSREL(NONE))
*NOFUNCEVENT
*ASM
Per:
LAE 1,0(,1) --- Don't know why but the default prolog mentions 'Prime AR 1 and AR 13 with LAE instructions', we may should follow it.
This instruction is preceded by a SAC 512, meaning the program is executing in AR ASC mode at the time of the LAE. If my rusty assembler knowledge is correct, what this will do is take the value in the the base register and it's AR, update the address subject to the index and offset (both of which are 0 in this case) and put the result in the first register. R1+0 (index)+0 (offset) = R1. Since we are in AR mode, the system will propagate AR1 into AR1, so this instruction is effectively doing nothing.
If the ASC mode was primary (SAC 0), then this instruction would have had the effect of preserving R1 and setting AR1 to zero.
Thoughts?
Thanks,
Scott