!*** MODULE $ETIRDEF *** !DEC$ OPTIONS/ALIGN=(RECORDS=PACKED,COMMONS=PACKED)/NOWARN ! ! EVAX Text, information and relocation record (ETIR) ! PARAMETER ETIR$C_MINSTACOD = '00000000'X ! Minimum store code PARAMETER ETIR$C_STA_GBL = '00000000'X ! Stack global symbol value PARAMETER ETIR$C_STA_LW = '00000001'X ! Stack longword PARAMETER ETIR$C_STA_QW = '00000002'X ! Stack quadword PARAMETER ETIR$C_STA_PQ = '00000003'X ! Stack psect base plus quadword offset PARAMETER ETIR$C_STA_LI = '00000004'X ! Stack literal PARAMETER ETIR$C_STA_MOD = '00000005'X ! Stack module PARAMETER ETIR$C_STA_CKARG = '00000006'X ! Check Arguments PARAMETER ETIR$C_MAXSTACOD = '00000006'X ! Maximum stack code PARAMETER ETIR$C_MINSTOCOD = '00000032'X ! Minimum store code PARAMETER ETIR$C_STO_B = '00000032'X ! Store byte PARAMETER ETIR$C_STO_W = '00000033'X ! Store word PARAMETER ETIR$C_STO_LW = '00000034'X ! Store longword PARAMETER ETIR$C_STO_QW = '00000035'X ! Store quadword PARAMETER ETIR$C_STO_IMMR = '00000036'X ! Store immediate Repeated PARAMETER ETIR$C_STO_GBL = '00000037'X ! Store global PARAMETER ETIR$C_STO_CA = '00000038'X ! Store code address PARAMETER ETIR$C_STO_RB = '00000039'X ! Store relative branch PARAMETER ETIR$C_STO_AB = '0000003A'X ! Store absolute branch PARAMETER ETIR$C_STO_OFF = '0000003B'X ! Store offset within psect PARAMETER ETIR$C_STO_IMM = '0000003D'X ! Store immediate PARAMETER ETIR$C_STO_GBL_LW = '0000003E'X ! Store global Longword ! STO_LP_PSB not valid in level 2 use STC_LP_PSB PARAMETER ETIR$C_STO_BR_GBL = '00000040'X ! Store 21 bit displayment to global address PARAMETER ETIR$C_STO_BR_PS = '00000041'X ! Store 21 bit displayment to psect + offset PARAMETER ETIR$C_MAXSTOCOD = '00000041'X ! Maximum store code PARAMETER ETIR$C_MINOPRCOD = '00000064'X ! Minimum operate code PARAMETER ETIR$C_OPR_NOP = '00000064'X ! No-op PARAMETER ETIR$C_OPR_ADD = '00000065'X ! Add PARAMETER ETIR$C_OPR_SUB = '00000066'X ! Subtract PARAMETER ETIR$C_OPR_MUL = '00000067'X ! Multiply PARAMETER ETIR$C_OPR_DIV = '00000068'X ! Divide PARAMETER ETIR$C_OPR_AND = '00000069'X ! Logical AND PARAMETER ETIR$C_OPR_IOR = '0000006A'X ! Logical inclusive OR PARAMETER ETIR$C_OPR_EOR = '0000006B'X ! Logical exclusive OR PARAMETER ETIR$C_OPR_NEG = '0000006C'X ! Negate PARAMETER ETIR$C_OPR_COM = '0000006D'X ! Complement PARAMETER ETIR$C_OPR_INSV = '0000006E'X ! Insert bit field PARAMETER ETIR$C_OPR_ASH = '0000006F'X ! Arithmetic shift PARAMETER ETIR$C_OPR_USH = '00000070'X ! Unsigned shift PARAMETER ETIR$C_OPR_ROT = '00000071'X ! Rotate PARAMETER ETIR$C_OPR_SEL = '00000072'X ! Select one of three longwords on top of stack PARAMETER ETIR$C_OPR_REDEF = '00000073'X ! Redefine this symbol after pass 2 PARAMETER ETIR$C_OPR_DFLIT = '00000074'X ! Define a literal PARAMETER ETIR$C_MAXOPRCOD = '00000074'X ! Maximum operate code PARAMETER ETIR$C_MINCTLCOD = '00000096'X ! Minimum control code PARAMETER ETIR$C_CTL_SETRB = '00000096'X ! Set relocation base PARAMETER ETIR$C_CTL_AUGRB = '00000097'X ! Augment relocation base PARAMETER ETIR$C_CTL_DFLOC = '00000098'X ! Define debug location PARAMETER ETIR$C_CTL_STLOC = '00000099'X ! Set debug location PARAMETER ETIR$C_CTL_STKDL = '0000009A'X ! Stack debug location PARAMETER ETIR$C_MAXCTLCOD = '0000009A'X ! Maximum control code PARAMETER ETIR$C_MINSTCCOD = '000000C8'X ! Minimum store-conditional code PARAMETER ETIR$C_STC_LP = '000000C8'X ! Store-conditional Linkage Pair PARAMETER ETIR$C_STC_LP_PSB = '000000C9'X ! Store-conditional Linkage Pair with Procedure Signature PARAMETER ETIR$C_STC_GBL = '000000CA'X ! Store-conditional Address at global address PARAMETER ETIR$C_STC_GCA = '000000CB'X ! Store-conditional Code Address at global address PARAMETER ETIR$C_STC_PS = '000000CC'X ! Store-conditional Address at psect + offset PARAMETER ETIR$C_STC_NOP_GBL = '000000CD'X ! Store-conditional NOP at address of global PARAMETER ETIR$C_STC_NOP_PS = '000000CE'X ! Store-conditional NOP at pect + offset PARAMETER ETIR$C_STC_BSR_GBL = '000000CF'X ! Store-conditional BSR at global address PARAMETER ETIR$C_STC_BSR_PS = '000000D0'X ! Store-conditional BSR at pect + offset PARAMETER ETIR$C_STC_LDA_GBL = '000000D1'X ! Store-conditional LDA at global address PARAMETER ETIR$C_STC_LDA_PS = '000000D2'X ! Store-conditional LDA at psect + offset PARAMETER ETIR$C_STC_BOH_GBL = '000000D3'X ! Store-conditional BSR or Hint at global address PARAMETER ETIR$C_STC_BOH_PS = '000000D4'X ! Store-conditional BSR or Hint at pect + offset PARAMETER ETIR$C_STC_NBH_GBL = '000000D5'X ! Store-conditional NOP,BSR or HINT at global address PARAMETER ETIR$C_STC_NBH_PS = '000000D6'X ! Store-conditional NOP,BSR or HINT at psect + offset PARAMETER ETIR$C_MAXSTCCOD = '000000D6'X ! Maximum store-conditional code STRUCTURE /ETIRDEF/ INTEGER*2 ETIR$W_RECTYP ! Record type (OBJ$C_ETIR) INTEGER*2 ETIR$W_SIZE ! Record size ! Define relocation commands ! ETIR descriptions ! ! ! MNEUMONIC DESCRIPTION FORMAT STACK EFFECT ! --------- ----------- ------ ------------ ! 0 2 4 6 8 12 16 20 24 ! | | | | | | | | | ! v v v v v v v v v ! ! STA_GBL pushes symbol value on stack |type|size|counted string... +1 ! ! STA_LW pushes longword value on stack |type|size|longword | +1 ! ! STA_QW pushes quadword value on stack |type|size| quadword | +1 ! ! STA_PQ pushes image offset associated |type|size| psect | quadword | +1 ! with psect index + quadword ! offset on stack ! STA_LI pushes literal value on stack |type|size|counted string... +1 ! ! STA_MOD pushes image offset associated |type|size|counted string... +1 ! with module on stack ! ! STA_CKARG compares poped stack element to |type|size|counted string... 0 ! symbol value and pushes result ! on stack ! ! STO_B pops stack and stores low byte |type|size| -1 ! at location pointer ! ! STO_W pops stack and stores low word |type|size| -1 ! at location pointer ! ! STO_LW pops stack and stores low |type|size| -1 ! longword at location pointer ! ! STO_QW pops stack and stores qwadword |type|size| -1 ! at location pointer ! ! STO_GBL stores value associated with |type|size|counted string... 0 ! global symbol at location ! pointer ! ! STO_CA stores contents of value |type|size|counted string... 0 ! associated with global symbol ! +8 at location pointer ! ! STO_RB adds offset from location |type|size|psect| quadword | 0 ! pointer to image offset value ! associated with psect index + ! quadword offset to low word ! at location pointer ! ! STO_AB stores value associated with |type|size|counted string... 0 ! global symbol in low 21 bits ! at location pointer ! ! STO_OFF pops offset into image from |type|size| -1 ! stack and stores the value in ! the linker's location counter ! ! STO_IMMR pops repeat count and stores |type|size| size |immediate... -1 ! this number of immediates at ! location counter ! ! STO_LP stores code address at |type|size|counted string... 0 ! location pointer and global ! symbol value at location ! pointer + 8 ! ! STO_IMM stores this number of |type|size| size |immediate... 0 ! immediates at location counter ! ! STO_GBL_LW stores low order 32 bits of |type|size|counted string... 0 ! value associated with global ! symbol at location pointer ! ! STO_LP_PSB stores code address at |type|size|counted string...|size|signature block...| 0 ! location pointer and global ! symbol value at location ! pointer + 8 and signature ! information in fixup section ! (following the LP_PSB fixups). ! ! STO_BR_GBL Store low order 23 bits as |type|size|ps1 |off1 |ps2 |off2 | ! signed offset from virtual |counted string 0 ! address signified by ps2 + ! off2 to virtual address of ! global symbol shifted two bits ! to the right into the 21 bit ! displacement field of instruction ! at location ps1 + off1. ! ! STO_BR_PS Store low order 23 bits as |type|size|ps1 |off1 |ps2 |off2 | ! signed offset from virtual |ps3 |off3 | 0 ! address signified by ps2 + ! off2 to virtual address ! signified by ps3 + off3 shifted ! two bits to the right into ! the 21 bit displacement field ! of instruction at location ! ps1 + off1. ! ! OPR_NOP nothing |type|size| 0 ! ! OPR_ADD pop two elements from stack |type|size| -1 ! adds and push results ! ! OPR_SUB pop two elements from stack |type|size| -1 ! subtracts and push results ! ! OPR_MUL pop two elements from stack |type|size| -1 ! multiplys and push results ! ! OPR_DIV pop two elements from stack |type|size| -1 ! divides and push results ! ! OPR_AND pop two elements from stack |type|size| -1 ! ANDs and push results ! ! OPR_IOR pop two elements from stack |type|size| -1 ! inclusive ors and push results ! ! OPR_EOR pop two elements from stack |type|size| -1 ! exclusive ors and push results ! ! OPR_NEG pop one element from stack |type|size| 0 ! negates and push results ! ! OPR_COM pop one element from stack |type|size| 0 ! compliments and push results ! ! OPR_INSV pop two elements from stack |type|size| -1 ! inserts bit field from first ! into second and push results ! ! OPR_USH pop two elements from stack |type|size| -1 ! unsigned shift and push results ! ! OPR_ASH pop two elements from stack |type|size| -1 ! arithmetic shift and push ! results ! ! OPR_ROT pop two elements from stack |type|size| -1 ! rotate and push results ! ! OPR_SEL pop three elements from stack |type|size| -2 ! if first is true ! then push third ! else push second ! ! OPR_REDEF pop value from stack and |type|size|counted string... -1 ! assign this value to global ! symbol ! ! OPR_DFLIT pop value from stack and |type|size|counted string... -1 ! assign this value to literal ! ! ! CTL_SETRB pop value from stack and move |type|size| -1 ! to location pointer ! ! CTL_AUGRB add quadword to location |type|size| quadword | 0 ! pointer ! ! CTL_DFLOC pop index from stack and save |type|size| quadword index | -1 ! current location pointer in ! debug table using index ! ! CTL_STLOC pop index from stack, get |type|size| quadword index | -1 ! saved location pointer in ! debug table using index and ! move it to current location ! pointer ! ! CTL_STKDL pop index from stack, get |type|size| quadword index | 0 ! saved location pointer in ! debug table using index and ! push it ! ! ! MNEUMONIC DESCRIPTION FORMAT STACK EFFECT ! --------- ----------- ------ ------------ ! 0 2 4 6 8 12 16 20 24 ! | | | | | | | | | ! v v v v v v v v v ! ! STC_LP If the linkage pair specified |type|size|lp index |counted string... 0 ! by the index is referenced, ! i.e. all instructions ref'ing ! it weren't successfully replaced ! by other STC_** commands, then ! store code address at location ! pointer and global symbol value ! at location pointer + 8. ! ! STC_LP_PSB If the linkage pair specified |type|size|lp index |counted string...|- 0 ! by the index is referenced, |size|signature block...| ! i.e. all instructions ref'ing ! it weren't successfully replaced ! by other STC_** commands, then ! store code address at location ! pointer and global symbol value ! at location pointer + 8. Store ! signature information in fixup ! section following the LP_PSB ! fixups. ! ! STC_GBL store value associated with |type|size|lp index |counted string... 0 ! global symbol (if norm bit is ! set this is the procedure desc. ! address) in the linkage pair ! pointed to by the index only ! if that part of the lp is referenced. ! When the norm bit is set the index will ! point to the second quadword of ! the linkage pair. ! ! STC_GCA store the value from the field |type|size|lp index |counted string... 0 ! ESDF$L_LP_1 of the global ! symbol in the linkage pair ! pointed to by the index only ! if that part of the lp is referenced. ! The global symbol must be a procedure, ! and the norm bit must be set. ! The lp index must point to the ! first quadword of the linkage pair. ! ! ! STC_PS store the address associated |type|size|lp index |psct|qw offset| 0 ! with the psect + offset in the ! lp pointed to by the index. ! The index may point to either ! quadword. ! ! STC_NOP_GBL Store a NOP (specified by the |type|size|lp index |psc1|qw off1 | - ! compiler) at the location |repl inst|psc2|qw off2 |counted string 0 ! pointed to by PS1, offset1 ! if the displacement from ! ps2, offset2 to the value in ! the EGSY$L_LP_1 field of the ! global symbol + its psect base ! can be squished into 21 bits. ! ! ! STC_NOP_PS Store a NOP (specified by the |type|size|lp index |psc1|qw off1 | - ! compiler) at the location |repl inst|psc2|qw off2 | - ! pointed to by PS1, offset1 |psc3|qw off3 | 0 ! if the displacement from ! ps2, offset2 to ps3,offset3 ! can be squished into 21 bits. ! ! STC_BSR_GBL Store a BSR (specified in |type|size|lp index |psc1|qw off1 | - ! repl inst) at the location |repl inst|psc2|qw off2 |counted string 0 ! pointed to by PS1, offset1 ! if the displacement from ! ps2, offset2 to the value in ! the EGSY$L_LP_1 field of the ! global symbol + its psect base ! can be squished into 21 bits. ! Insert the 21 bit displacement ! into the instruction. ! ! STC_BSR_PS Store a BSR (specified in |type|size|lp index |psc1|qw off1 | - ! repl inst) at the location |repl inst|psc2|qw off2 | - ! pointed to by PS1, offset1 |psc3|qw off3 | 0 ! if the displacement from ! ps2, offset2 to ps3,offset3 ! can be squished into 21 bits. ! Insert the 21 bit displacement ! into the instruction. ! ! STC_LDA_GBL Store a LDA (specified in |type|size|lp index |psc1|qw off1 | - ! repl inst) at the location |repl inst|psc2|qw off2 |counted string 0 ! pointed to by PS1, offset1 ! if the displacement from ! ps2, offset2 to the value in ! the EGSY$L_VALUE field of the ! global symbol + its psect base ! can be squished into 16 bits. ! The global symbol cannot be from ! a shareable image. ! Insert the 16 bit displacement ! into the instruction. ! The index is only nonzero if the ! instruction being replaced refs ! a linkage pair. ! ! STC_LDA_PS Store a LDA (specified in |type|size|lp index |psc1|qw off1 | - ! repl inst) at the location |repl inst|psc2|qw off2 | - ! pointed to by PS1, offset1 |psc3|qw off3 | 0 ! if the displacement from ! ps2, offset2 to ps3,offset3 ! can be squished into 16 bits. ! PS3 cannot be a shareable image psect. ! Insert the 16 bit displacement ! into the instruction. ! The index is only nonzero if the ! instruction being replaced refs ! a linkage pair. ! ! STC_BOH_GBL Store a BSR (specified in |type|size|lp index |ps1 |qw off1 | - ! repl inst) at the location |repl inst|ps2 |qw off2 |counted string 0 ! pointed to by ps1, off1 ! if the displacement from ! ps2, off2 to the value in ! the EGSY$L_LP_1 field of the ! global symbol + its psect base ! can be squished into 21 bits. ! Insert the 21 bit displacement ! into the instruction. If the ! displacement is too large, then ! store the low order 16 bits of ! the virtual address of the global ! symbol shifted two bits to the ! right into the location ! ps1 + off1. ! ! STC_BOH_PS Store a BSR (specified in |type|size|lp index |ps1 |qw off1 | - ! repl inst) at the location |repl inst|ps2 |qw off2 | - ! pointed to by PS1, off1 |ps3 |qw off3 | 0 ! if the displacement from ! ps2, off2 to ps3,off3 ! can be squished into 21 bits. ! Insert the 21 bit displacement ! into the instruction. If the ! displacement is too large, then ! store the low order 16 bits of ! the virtual address of the global ! symbol shifted two bits to the ! right into the location ! ps1, off1. ! ! STC_NBH_GBL Equivalent to STC_NOP_GBL, |type|size|lp index |ps1 |qw off1 | - ! index, ps1, off1, ins1, ps2, |repl ins1|ps2 |qw off2 | - ! off2 + 4, counted string, |repl ins2|counted string... 0 ! followed by STC_BOH_GBL, index, ! ps2, off2, ins2, ps2, off2 + 4, ! counted string. ! Implicit assumption is that ! the original instructions (LDQ, JSR) ! are contiguous. ! ! STC_NBH_PS Equivalent to STC_NOP_PS, |type|size|lp index |ps1 |qw off1 | - ! index, ps1, off1, ins1, ps2, |repl ins1|ps2 |qw off2 | - ! off2 + 4, ps3, off3, |repl ins2|ps3 |qw off3 | 0 ! followed by STC_BOH_PS, index, ! ps2, off2, ins2, ps2, off2 + 4, ! ps3, off3. ! Implicit assumption is that ! the original instructions (LDQ, JSR) ! are contiguous. ! END STRUCTURE ! ETIRDEF !DEC$ END OPTIONS