! *** PREDECLARED TYPES %IF %DECLARED ( %BASIC$QUADWORD_DECLARED ) = 0 %THEN RECORD BASIC$QUADWORD LONG FILL ( 2 ) END RECORD %LET %BASIC$QUADWORD_DECLARED = 1 %END %IF %IF %DECLARED ( %BASIC$OCTAWORD_DECLARED ) = 0 %THEN RECORD BASIC$OCTAWORD LONG FILL ( 4 ) END RECORD %LET %BASIC$OCTAWORD_DECLARED = 1 %END %IF %IF %DECLARED ( %BASIC$HFLOAT_AXP_DECLARED ) = 0 %THEN RECORD BASIC$HFLOAT_AXP LONG FILL ( 4 ) END RECORD %LET %BASIC$HFLOAT_AXP_DECLARED = 1 %END %IF %IF %DECLARED ( %BASIC$F_FLOATING_COMPLEX_DECL ) = 0 %THEN RECORD BASIC$F_FLOATING_COMPLEX SINGLE REAL_PART SINGLE IMAGINARY_PART END RECORD %LET %BASIC$F_FLOATING_COMPLEX_DECL = 1 %END %IF %IF %DECLARED ( %BASIC$D_FLOATING_COMPLEX_DECL ) = 0 %THEN RECORD BASIC$D_FLOATING_COMPLEX DOUBLE REAL_PART DOUBLE IMAGINARY_PART END RECORD %LET %BASIC$D_FLOATING_COMPLEX_DECL = 1 %END %IF %IF %DECLARED ( %BASIC$G_FLOATING_COMPLEX_DECL ) = 0 %THEN RECORD BASIC$G_FLOATING_COMPLEX GFLOAT REAL_PART GFLOAT IMAGINARY_PART END RECORD %LET %BASIC$G_FLOATING_COMPLEX_DECL = 1 %END %IF %IF %DECLARED ( %BASIC$H_FLOAT_AXP_CMPLX_DCL ) = 0 %THEN RECORD BASIC$H_FLOATING_COMPLEX_AXP BASIC$HFLOAT_AXP REAL_PART BASIC$HFLOAT_AXP IMAGINARY_PART END RECORD %LET %BASIC$H_FLOAT_AXP_CMPLX_DCL = 1 %END %IF ! ! EVAX Text, information and relocation record (ETIR) ! DECLARE LONG CONSTANT ETIR$C_MINSTACOD = 0 ! Minimum store code DECLARE LONG CONSTANT ETIR$C_STA_GBL = 0 ! Stack global symbol value DECLARE LONG CONSTANT ETIR$C_STA_LW = 1 ! Stack longword DECLARE LONG CONSTANT ETIR$C_STA_QW = 2 ! Stack quadword DECLARE LONG CONSTANT ETIR$C_STA_PQ = 3 ! Stack psect base plus quadword offset DECLARE LONG CONSTANT ETIR$C_STA_LI = 4 ! Stack literal DECLARE LONG CONSTANT ETIR$C_STA_MOD = 5 ! Stack module DECLARE LONG CONSTANT ETIR$C_STA_CKARG = 6 ! Check Arguments DECLARE LONG CONSTANT ETIR$C_MAXSTACOD = 6 ! Maximum stack code DECLARE LONG CONSTANT ETIR$C_MINSTOCOD = 50 ! Minimum store code DECLARE LONG CONSTANT ETIR$C_STO_B = 50 ! Store byte DECLARE LONG CONSTANT ETIR$C_STO_W = 51 ! Store word DECLARE LONG CONSTANT ETIR$C_STO_LW = 52 ! Store longword DECLARE LONG CONSTANT ETIR$C_STO_QW = 53 ! Store quadword DECLARE LONG CONSTANT ETIR$C_STO_IMMR = 54 ! Store immediate Repeated DECLARE LONG CONSTANT ETIR$C_STO_GBL = 55 ! Store global DECLARE LONG CONSTANT ETIR$C_STO_CA = 56 ! Store code address DECLARE LONG CONSTANT ETIR$C_STO_RB = 57 ! Store relative branch DECLARE LONG CONSTANT ETIR$C_STO_AB = 58 ! Store absolute branch DECLARE LONG CONSTANT ETIR$C_STO_OFF = 59 ! Store offset within psect DECLARE LONG CONSTANT ETIR$C_STO_IMM = 61 ! Store immediate DECLARE LONG CONSTANT ETIR$C_STO_GBL_LW = 62 ! Store global Longword ! STO_LP_PSB not valid in level 2 use STC_LP_PSB DECLARE LONG CONSTANT ETIR$C_STO_BR_GBL = 64 ! Store 21 bit displayment to global address DECLARE LONG CONSTANT ETIR$C_STO_BR_PS = 65 ! Store 21 bit displayment to psect + offset DECLARE LONG CONSTANT ETIR$C_MAXSTOCOD = 65 ! Maximum store code DECLARE LONG CONSTANT ETIR$C_MINOPRCOD = 100 ! Minimum operate code DECLARE LONG CONSTANT ETIR$C_OPR_NOP = 100 ! No-op DECLARE LONG CONSTANT ETIR$C_OPR_ADD = 101 ! Add DECLARE LONG CONSTANT ETIR$C_OPR_SUB = 102 ! Subtract DECLARE LONG CONSTANT ETIR$C_OPR_MUL = 103 ! Multiply DECLARE LONG CONSTANT ETIR$C_OPR_DIV = 104 ! Divide DECLARE LONG CONSTANT ETIR$C_OPR_AND = 105 ! Logical AND DECLARE LONG CONSTANT ETIR$C_OPR_IOR = 106 ! Logical inclusive OR DECLARE LONG CONSTANT ETIR$C_OPR_EOR = 107 ! Logical exclusive OR DECLARE LONG CONSTANT ETIR$C_OPR_NEG = 108 ! Negate DECLARE LONG CONSTANT ETIR$C_OPR_COM = 109 ! Complement DECLARE LONG CONSTANT ETIR$C_OPR_INSV = 110 ! Insert bit field DECLARE LONG CONSTANT ETIR$C_OPR_ASH = 111 ! Arithmetic shift DECLARE LONG CONSTANT ETIR$C_OPR_USH = 112 ! Unsigned shift DECLARE LONG CONSTANT ETIR$C_OPR_ROT = 113 ! Rotate DECLARE LONG CONSTANT ETIR$C_OPR_SEL = 114 ! Select one of three longwords on top of stack DECLARE LONG CONSTANT ETIR$C_OPR_REDEF = 115 ! Redefine this symbol after pass 2 DECLARE LONG CONSTANT ETIR$C_OPR_DFLIT = 116 ! Define a literal DECLARE LONG CONSTANT ETIR$C_MAXOPRCOD = 116 ! Maximum operate code DECLARE LONG CONSTANT ETIR$C_MINCTLCOD = 150 ! Minimum control code DECLARE LONG CONSTANT ETIR$C_CTL_SETRB = 150 ! Set relocation base DECLARE LONG CONSTANT ETIR$C_CTL_AUGRB = 151 ! Augment relocation base DECLARE LONG CONSTANT ETIR$C_CTL_DFLOC = 152 ! Define debug location DECLARE LONG CONSTANT ETIR$C_CTL_STLOC = 153 ! Set debug location DECLARE LONG CONSTANT ETIR$C_CTL_STKDL = 154 ! Stack debug location DECLARE LONG CONSTANT ETIR$C_MAXCTLCOD = 154 ! Maximum control code DECLARE LONG CONSTANT ETIR$C_MINSTCCOD = 200 ! Minimum store-conditional code DECLARE LONG CONSTANT ETIR$C_STC_LP = 200 ! Store-conditional Linkage Pair DECLARE LONG CONSTANT ETIR$C_STC_LP_PSB = 201 ! Store-conditional Linkage Pair with Procedure Signature DECLARE LONG CONSTANT ETIR$C_STC_GBL = 202 ! Store-conditional Address at global address DECLARE LONG CONSTANT ETIR$C_STC_GCA = 203 ! Store-conditional Code Address at global address DECLARE LONG CONSTANT ETIR$C_STC_PS = 204 ! Store-conditional Address at psect + offset DECLARE LONG CONSTANT ETIR$C_STC_NOP_GBL = 205 ! Store-conditional NOP at address of global DECLARE LONG CONSTANT ETIR$C_STC_NOP_PS = 206 ! Store-conditional NOP at pect + offset DECLARE LONG CONSTANT ETIR$C_STC_BSR_GBL = 207 ! Store-conditional BSR at global address DECLARE LONG CONSTANT ETIR$C_STC_BSR_PS = 208 ! Store-conditional BSR at pect + offset DECLARE LONG CONSTANT ETIR$C_STC_LDA_GBL = 209 ! Store-conditional LDA at global address DECLARE LONG CONSTANT ETIR$C_STC_LDA_PS = 210 ! Store-conditional LDA at psect + offset DECLARE LONG CONSTANT ETIR$C_STC_BOH_GBL = 211 ! Store-conditional BSR or Hint at global address DECLARE LONG CONSTANT ETIR$C_STC_BOH_PS = 212 ! Store-conditional BSR or Hint at pect + offset DECLARE LONG CONSTANT ETIR$C_STC_NBH_GBL = 213 ! Store-conditional NOP,BSR or HINT at global address DECLARE LONG CONSTANT ETIR$C_STC_NBH_PS = 214 ! Store-conditional NOP,BSR or HINT at psect + offset DECLARE LONG CONSTANT ETIR$C_MAXSTCCOD = 214 ! Maximum store-conditional code ! ******************************************************************************************************** DECLARE LONG CONSTANT ETIR$S_ETIRDEF = 4 record ETIRDEF WORD ETIR$W_RECTYP ! Record type (OBJ$C_ETIR) WORD 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 record ETIRDEF