• Aucun résultat trouvé

I<---block name---I

~---T---~

1--->1

0

1

I---.----~---~

1 COMMON DATA pointer 1

l ______________ . _________________________ J

where the COMMON DATA pointer pOints to the list of variables in the COMMON block.

ROLL 50: EQUIV AI.LOCATION ROLL

This roll is used only during Allocate, and is not. used in any other phase of the compiler. When the allocation of storage for EQUIVALENCE variables has been com-pleted, the information which has been produced on the GENERAL ALLOCATION roll is moved to this roll. The group size for the EQUIV ALLOCA'TION roll is twelve bytes. The format of the group is, therefore, ident-ical to tha·t on the GENERAL ALLOCATION roll:

4 bytes

.---,

I<---variable---I

I---T---

--~

I---name---> I displacement I

~---~---~

I base table pointer I

L _________________________________________ J

where the base table pointer indicates the group on the BASE TABLE roll which will be used for references to the variable. The displacement is the distance in bytes from the location indicated in the BASE TABLE roll group to the location of the variable.

ROLL 51: RLD ROLL

This roll is used only in Allocate and Exit; i t is not used in Parse. In both Allocate and Exit, the roll holds the information requir·ed for the production of RLD cards. The group size for the RLD roll is eight bytes. The group format is:

156

4 bytes

r---T---,

I area code 1 ESD # 1

~---~---i

I address I

l _________________________________________ J

where the area code indicates the control section in which the variable or constant is contained. The ESD number governs the modification of the location by the linkage editor, and the address is the location requiring modification.

Information is placed on this roll by both Allocate and Exit, and the RLD cards are written from the information by Exit.

The entries made on the RLD roll by Alloc-ate concern the NAMELIST tables; all remaining entries are made by Exit.

ROLL 52: COMMON ALLOCATION ROLL

This roll is used only in Allocate and is not used in any other phase of the compiler. When the allocation of COMMON storage has been completed, the information which has been produced on the GENERAL ALLOCATION roll is moved to this roll. The group size for the COMMON ALLOCATION roll is twelve bytes. The format of the group is, therefore, identical to that on the GENERAL ALLOCATION roll:

4 bytes

r---,

I<---variable---I

~---T---i I---name--->I displacement I

~---~---i

I base table pointer I

l _________________________________________ J

where the base table pointer indicates the group on the BASE TABLE roll which will be used for references to the variable.

The displacement is the distance in bytes from the location indicated in the BASE TABLE roll group to the location of the variable.

ROLL 52: LOOP CONTROL ROLL

This roll is created by Unify and is used by Gen. The information contained on the roll indicates the control of a loop.

The group size for the LOOP CONTROL roll is twelve bytes. The format of the LOOP CONTROL roll group in Unify and Gen is:

Form Y28-6638-1

Page Revised 11/15/68 by TNL Y28-6826 4 bytes

r---T---,

I traits I coefficient ]

t---L---~

I register (this loop) I

t---~

1 L _________________________________________ base or register (outer loop) J I

where the first byte of the first word (traits) indicates whether the coefficient is initiated by a direct load. The remain-ing three bytes is the coefficient, which is the multiplier for the induction vari-able. The second four bytes is the regis-ter where the coefficient is required. The base is the source of initialization of the register; i t can be either a constant, register, or an address.

This roll is first used in Parse, where the FORMAT statements are placed on it.

See Appendix D for the description of the encoding of the FORMAT statement.

Each group of the FORMAT roll is in the form of a plex (the group size is given in word 0). The configuration of a FORMAT group in Parse is:

4 bytes

r---,

] size of the group I

~---~

I pointer to the LBL roll ]

~---~

J number of bytes in the FORMAT I

t---~

J I

I I

I 1

L _________________________________________ J

Word Q contains a value which indicates the number of words in the group on the roll.

The pointer to the LBL roll points to the label of the corresponding FORMAT state-ment. 'I'he next word gives the number of bytes of storage occupied by this particu-lar FORMAT statement. The ellipses denote that the encoded FORMAT follows this con-trol informatiDn.

In Allocate, the FORMATs are replaced by the following:

4 bytes

r---T---,

I 0 I displacement I

t---L---~

~ base table pointer ~

L _________________________________________ J

which, taken together, indicate the begin-ning location of the FORMAT statement.

These groups are packed to the BASE of the roll; that is, this information for the first FORMAT appears in the first two words on the roll, the information for the second FORMAT appears in words 3 and 4, etc.

The LBL roll group which defines the label of the FORMAT statement holds a pointer to the displacement recorded for the statement on this roll.

The FORMAT roll is retained in this form for the remainder of the compilation.

This roll is created by Parse as each appropriate array reference is encountered.

The array reference indicated includes sub-scripts (one or more) which use the

~nstruction variable in a linear fashion.

Unify uses the contents of the roll.

The group size of the SCRIPT roll is 16 bytes, plus an additional 4 bytes for each DO loop that is open at the point of the array reference represented by the entry.

The group format of the SCRIPT roll in Parse and Unify is as described for the NONSTD SCRIPT roll.

RO~L 55: LOOP DATA ROLL

This roll contains the initializing and terminating data, and indicates the induc-tion variable and the nesting level of the particular loop from which this entry was created.

The roll is created in Parse at the time that the loop is epcountered. rhe group size of the LOOP DATA roll is 20 bytes.

The group format of the roll in Parse is:

4 bytes

r---T---,

i TAG I nest level I

~-_---i---~

1 pointer to induction variable I t---~

t

pointer to n1 (initial value> I

L __________________________________________ J

where the TAG byte contains a X'80' when an inner DO loop contains a possible extended range. The X'80' is placed there by Parse and tested by Gen. The Gen phase then produces object code to save general regis-ters 4 through 7 at the beginning of this DO loop so that the registers are not Appendix B: Rolls Used in the Compiler 157

Form Y28-6638-1

Page Revised 11/15/68 by TNL Y28-6826

altered in the extended range. The next three bytes indicate the nest level of the loop. The second word is a pointer to the SCALAR roll group which describes the induction variable. The third word of the group points to the initializing value for the inductio:n variable, which may be repre-sented on ·the FX CONST roll or the SCALAR roll.

During the operation of the Unify phase., the roll is completed with pointers to the LOOP CONTRO:L roll. During Unify, the LOOP CONTROL roll is also created; therefore, insertion of the pointers is done while the loop control data is being established.

The following illustration shows the configuration of the LOOP DATA roll as i t is used in Unify:

4 bytes

r---,

I nest level I

t---·---i

1 SCALAR pointer (induction variable) I

.---i

] FX CONST pointer or SCALAR pointer J

~---i ] LOOP CONTROL pointer (start init.)

I

t---i

J L _________________________________________ LOOP CONTROL pointer (end init.) J

I

The last two words (eight bytes) of the group are inserted by unify. These point-ers point to the first and last LOOP CONTROL roll groups concerned with this loop.

This roll is a duplicate of the SCRIPT roll. The contents of the SCRIPT roll are transferred to the PROGRAM SCRIPT roll in Parse as each loop is closed. Each loop is represented by a reserved block on the roll.

The group size of the PROGRAM SCRIPT roll is 16 bytes, plus an additional 4 bytes for each nest level up to and includ-ing the one containinclud-ing the reference repre-sented by the entry. The format of the PROGRAM SCRIPT roll group in Parse and Unify is as follows:

158

4 bytes

r---T---·---,

I

traits

I

frequency

I

.---~---~---~

I

ARRAY REF pointer I

.---~---i

J ARRAY pointer I

.---i I

ARRAY offset pointer ~

.---i

I induction variable coefficient

I

.---~

J induction variable coefficient I

J (nest level = 2)

I

.---~

I I

J I

I I

.---i

i induction variable coefficient I I L _________________________________________ (nest level = n) J I See the NONSTD SCRIPT roll for further description.

This roll is used only in Gen, where it handles subscripts (array references) which are not handled by Unify. The group size for the ARRAY PLEX roll is twelve bytes.

The format of the group on the roll is:

4 bytes

r---,

I

pointer to array I

~---~

J pointer to index

I

.---i

I L _________________________________________ J displacement t The pointer in the first word of the group points to the ARRAY REF roll when the

~ubscript used contains DO dependent linear subscripts (which are handled by Unify) and non-linear variables. Otherwise, the pointer refers to the ARRAY roll.

The second word of the group holds a pointer to the index value to be used in the subscripted array reference. This pointer points to general register 9 on the FX AC roll if the index value has been loaded into that register, if the index value has been stored in a temporary loca-tion, the pointer indicates the proper location on the TEMP AND CONST roll1 if the index value is a fixed constant, the pointer indicates the proper group on the FX CONST roll. When the information in this word has been used to construct the proper instruction for the array reference, the word is cleared to zero.

The displacement, in the third word of the group, appears only when the first word of the group holds a pointer to the ARRAY roll. otherwise, the displacement is on the ARRAY REF roll in the group indicated by the pointer in the first word, and this word contains the value zero. This value is the displacement value to be used in the instruction generated for the array reference.

Documents relatifs