• Aucun résultat trouvé

I

n

I

I---.---~

I

subscript 1

I

I---i

I

subscript 2

I

I---.---~

I I

I I

I I

i---i

I

subscript n

I

L _________________________________________ J

where n is the number of words in the plex excl usi ve of itself and" therefore" also the number of subscripts. Each subscript is recorded as an integer constant.

The connection between a plex on this roll and the corresponding EQUIVALENCE variable is made by a pointer which appears on the EQUIVALENCE roll and points to the first word of the appropriate plex on this roll.

In Allocate, the EQUIVALENCE OFFSET roll is used .in the allocation of storage for EQUIVALENCE variables. It is destroyed dur.1.ng this phase" and does not appear in the later phases of the compiler.

ROLL 42: FL AC ROLL

This roll is used in Gen only, and is a fixed length roll of four groups. The groups refer to the four floating-point registers, in order.

The group size for the FL AC roll is four bytes. Each group on the roll con-tains a pointer to the value which is held in the register at the present point in the object program~ as the contents of the registers change; the pointers are changed.

These pointers are used primarily to indic-ate that the register is in use and the mode of the value in it. If the register is not in use, the corresponding group on this roll contains zero.

ROLL 43: LBL ROLL

This roll holds all labels used and/or defined in the source module. Each label is entered on the roll by Parse when i t is first encountered, whether in the label field or within a statement.

The group size for the LBL roll is four bytes. In Parse, the format of the LBL roll group is:

Appendix B: Rolls Used in the Compiler 153

Form Y28-6638-1

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

1 byte 3 bytes

r---T---,

I TAG I binary label I

L ________ --'-_. ______________________________ J

where the first byte is treated as the TAG field of a pointer, and the remaining three bytes contai.n the label, converted to a binary integer.

In the TAG field, the mode portion (the first four bits) is used to indicate whether the label has been defined; the remainder of the TAG field is used to indicate whether the label is the target of a jump, the label of a FORMAT, or neither.

The leftmost four bits of the TAG byte are used as follows:

8 Label i.s defined o Label i.s undefined

The rightmost four bits of the TAG byte indicate the· following:

1 This is the label of the target of a jump (GO TO) statement.

3 This is the label of a FORMAT statement.

5 This label is a possible re-entry point within an innermost DO loop that may have a possible extended range. (Parse inserts the hexadecimal 5 to indicate to Gen that the label is a possible re-entry point; the Gen phase then restores those registers that were saved before the extended range was entered.>

o

= None of the above conditions.

In Allocate, the lower three bytes of each LBL roll group defining a jump target label are replaced by the lower three bytes of a pointer to the BRANCH TABLE roll group, which will hold the location of the label at object time. Each group defining a FORMAT statement label is replaced (lower three bytes only) with a pointer to the FORMAT roll group which holds the base pointer and displacement for the FORMAT.

Groups defining the targets of unclosed DO loops are cleared to zero.

In Gen, the LBL roll is used to find the pOinters to the BRANCH TABLE and FORMAT rolls, but i t is not altered.

154

In Parse, the names of all unsubscripted variables which are not dummy arguments to statement functions are listed on the roll in the order of their appearance in active (non-specification) statements in the source module. Variables which are defined in specification statements, but which are never used in the source module, are not entered on the roll. The group size for the SCALAR roll is eight bytes. The format of the group is:

4 bytes

r---,

I<---scalar name---I

~---T---T---~

1--->1

L ____________________ ~ __________ TAG ~

I

_________ 0 J

1

The TAG field appearing in the seventh byte of the group indicates the mode and size of the variable in the format of the TAG field of a pointer.

In Allocate, the information left on the SCALAR roll by Parse is replaced by infor-mation indicating the storage assigned for the variable. The resulting format of the group is:

4 bytes

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

I TAG IDBG/CEAD I displacement I

~---~---~---~

J base table pointer I

L _________________________________________ J

The TAG field appearing in the first byte is unchanged, except in location, from the TAG field held in the SCALAR roll group during Parse. The DBG/CEAD flag (in the second byte) is logically split into two hexadecimal values. The first of these indicates debug references to the variable;

the value is 1 for a scalar referred to in the INIT option; otherwise, the value is zero. The second hexadecimal value is nonzero if the variable is in COMMON, a member of an EQUIVALENCE set, or an argu-ment to a subprogram or a global dummy;

otherwise, i t is zero. The displacement in bytes 3 and 4, and the base table pointer in the second word, function together to indicate the stora.ge location assigned for the variable. The base table pointer spe-cifies a BASE TABLE roll group; the dis-placement is the distance in bytes from the location contained in that group to the location of the scalar variable. If the scalar is a call by name dummy, the base table pointer is replaced by a pointer to the GLOBAL DMY roll group defining it, and the displacement is zero.

Form Y28-6638-1

Page Revised 11/15/68 by TNL Y28-6826 The SCALAR roll is checked, but modi-fied, during Unify, Gen, and Exit.

This roll stants used statements.

holds the hexadecimal con-in source module DATA The format of the roll is identical for all phases of the compiler. The group size is 16 bytes. Two hexadecimal characters are packed to a byte, and constants which

occupy fewer than 16 characters are right-adjusted in the group with leading zeros.

In Parse, this roll holds the names of variables listed in DATA statements and variables for which data values are pro-vided in Explicit specification statements.

The names are entered on the roll when they

a~e found in these statements. rhe group size for this roll is eight bytes. The groups have the following form:

Appendix B: Rolls Used in the Compiler 154.1

4 bytes

r---,

\<---variable name---\

Documents relatifs