|
HP OpenVMS systems documentation |
Previous | Contents | Index |
This format is used for the long forms of the PROLOGUE and BODY region header records. The R field identifies the record type, as shown in the following table:
Record Type | R |
---|---|
PROLOGUE | 00 |
BODY | 01 |
This format is used only for the BR_MEM descriptor record.
The five bits in the BRMASK field are used to indicate which of the
five preserved branch registers (B1-B5) are saved in the prologue. Bit
0 corresponds to B1; bit 4 corresponds to B5. If the bit is clear, the
corresponding register is not saved; if the bit is set, the
corresponding register is saved.
B.2.2 Format P2
This format is used only for the BR_GR descriptor record.
The five bits in the BRMASK field are used to indicate which of the five preserved branch registers (B1-B5) are saved in the prologue. Bit 7 of byte 1 corresponds to B1; bit 3 of byte 0 corresponds to B5. If the bit is clear, the corresponding register is not saved; if the bit is set, the corresponding register is saved.
The GR field identifies the general register in which the first of
these registers is stored. Additional general registers are used as
needed. For example, assume that B1, B4, and B5 are stored. The mask
bits would be 11001, and GR might be set to 37, indicating that the
three branch registers are stored in R37, R38, and R39, respectively.
B.2.3 Format P3
This format is used by the group of descriptor records that specify a general register or branch register number. The record type is identified by the R field, which is read as a four bit number whose low-order bit is bit 7 of byte 1. The following table shows the record types:
Record Type | R | Notes |
---|---|---|
PSP_GR | 0 | |
RP_GR | 1 | |
PFS_GR | 2 | |
PREDS_GR | 3 | |
UNAT_GR | 4 | |
LC_GR | 5 | |
RP_BR | 6 | |
RNAT_GR | 7 | |
BSP_GR | 8 | |
BSPSTORE_GR | 9 | |
FPSR_GR | 10 | Not supported on OpenVMS |
PRIUNAT_GR | 11 |
This format is used only by the SPILL_MASK descriptor record. The first byte is followed by the IMASK field, whose length is determined by the length of the current prologue region as given by the region header record. The IMASK field contains two bits for each instruction slot in the region, and the size is rounded up to the next whole number of bytes, if necessary.
The high-order (leftmost) two bits of the first byte of the IMASK field correspond to the first instruction slot of the region. Bit pairs are read from left to right (high-order bits to low-order bits) within each byte, and bytes are read from increasing memory addresses. Each bit field describes the behavior of the corresponding instruction slot as follows:
Bit Pair | Meaning |
---|---|
00 | The instruction slot does not save one of these registers. |
01 | The instruction slot saves the next floating-point register. |
10 | The instruction slot saves the next general register. |
11 | The instruction slot saves the next branch register. |
This format is used only by the FRGR_MEM descriptor record.
The bits in the GRMASK field correspond to the preserved general registers (R4-R7). The bits are read from right to left: bit 4 of byte 1 corresponds to R4, and bit 7 corresponds to R7.
The bits in the FRMASK field correspond to the preserved floating-point registers (F2-F5 and F16-F31). The bits are read from right to left: bit 0 of byte 3 corresponds to F2, and bit 3 of byte 1 corresponds to F31.
A value of 1 in each bit position indicates that the corresponding
register is saved.
B.2.6 Format P6
This format is used by the FR_MEM and GR_MEM descriptor records. The R bit identifies the record type, as shown in the following table:
Record Type | R |
---|---|
FR_MEM | 0 |
GR_MEM | 1 |
The bits in the RMASK field correspond to either the preserved general
registers (R4-R7) or the set of the first four preserved floating-point
registers (F2-F5). The bits are read from right to left: bit 0
corresponds to R4 or F2, and bit 3 corresponds to R7 or F5. A value of
1 in each bit position indicates that the corresponding register is
saved.
B.2.7 Format P7
This format is used for a number of descriptor records. The R field identifies the record type, as shown in the following table:
Record Type | R | Additional ULEB128 Fields | Notes |
---|---|---|---|
MEM_STACK_F | 0 | T, SIZE | |
MEM_STACK_V | 1 | T | |
SPILL_BASE | 2 | PSPOFF | |
PSP_SPREL | 3 | SPOFF | |
RP_WHEN | 4 | T | |
RP_PSPREL | 5 | PSPOFF | |
PFS_WHEN | 6 | T | |
PFS_PSPREL | 7 | PSPOFF | |
PREDS_WHEN | 8 | T | |
PREDS_PSPREL | 9 | PSPOFF | |
LC_WHEN | 10 | T | |
LC_PSPREL | 11 | PSPOFF | |
UNAT_WHEN | 12 | T | |
UNAT_PSPREL | 13 | PSPOFF | |
FPSR_WHEN | 14 | T | Not supported on OpenVMS |
FPSR_PSPREL | 15 | PSPOFF | Not supported on OpenVMS |
Stack pointer offsets (SPOFF) are represented as positive longword
offsets from the top of the stack frame (that is, the location is SP +
4 * SPOFF). Previous stack pointer offsets (PSPOFF) are encoded as
positive numbers representing a negative longword offset relative to
PSP+16 (that is, the location is PSP + 16 - 4 * PSPOFF).
B.2.8 Format P8
This format is used for a number of descriptor records. The R field identifies the record type, as shown in the following table:
Record Type | R | Additional ULEB128 Fields | Notes |
---|---|---|---|
RP_SPREL | 1 | SPOFF | |
PFS_SPREL | 2 | SPOFF | |
PREDS_SPREL | 3 | SPOFF | |
LC_SPREL | 4 | SPOFF | |
UNAT_SPREL | 5 | SPOFF | |
FPSR_SPREL | 6 | SPOFF | Not supported on OpenVMS |
BSP_WHEN | 7 | T | |
BSP_PSPREL | 8 | PSPOFF | |
BSP_SPREL | 9 | SPOFF | |
BSPSTORE_WHEN | 10 | T | |
BSPSTORE_PSPREL | 11 | PSPOFF | |
BSPSTORE_SPREL | 12 | SPOFF | |
RNAT_WHEN | 13 | T | |
RNAT_PSPREL | 14 | PSPOFF | |
RNAT_SPREL | 15 | SPOFF | |
PRIUNAT_WHEN_GR | 16 | T | |
PRIUNAT_PSPREL | 17 | PSPOFF | |
PRIUNAT_SPREL | 18 | SPOFF | |
PRIUNAT_WHEN_MEM | 19 | T |
Stack pointer offsets (SPOFF) are represented as positive longword
offsets from the top of the stack frame (that is, the location is SP +
4 * SPOFF). Previous stack pointer offsets (PSPOFF) are encoded as
positive numbers representing a negative longword offset relative to
PSP+16 (that is, the location is PSP + 16 -4 * PSPOFF).
B.2.9 Format P9
This format is used only by the GR_GR descriptor record.
The bits in the GRMASK field correspond to the preserved general
registers (R4-R7). The bits are read from right to left: bit 0 of byte
1 corresponds to R4, and bit 3 corresponds to R7. The GR field
identifies the general register in which the first of these registers
is stored. Additional general registers are used as needed. For
example, assume that R4, R5, and R7 are stored. The mask bits would be
1011, and GR might be set to 37, indicating that the three preserved
general registers are stored in R37, R38, and R39, respectively.
B.2.10 Format P10
This format is reserved for ABI-specific unwind descriptor records, typically to identify a region whose stack frame indicates some saved context record (for example, a Unix signal context).
The value defined to indicate the OpenVMS ABI is 13. Codes for other operating systems are defined in the Itanium documentation.
The interpretation of the CONTEXT field is ABI dependent. No codes or
interpretations are currently defined for OpenVMS. All codes are
reserved for future use.
B.3 Descriptor Records for Body Regions
The EPILOGUE, LABEL_STATE, and COPY_STATE descriptor records can each
appear in two formats, depending on the magnitudes of their fields.
B.3.1 Format B1
This record is used for the short form of LABEL_STATE and COPY_STATE descriptor records. If the label is no greater than 31, this format may be used; otherwise, format B4 must be used. The record types are shown in the following table:
Record Type | R |
---|---|
label_state | 0 |
copy_state | 1 |
This format is used only for the short form of the EPILOGUE descriptor
record. If the ECOUNT field is no greater than 31, this format may be
used; otherwise, format B3 must be used.
B.3.3 Format B3
This format is used only for the long form of the EPILOGUE descriptor record.
This format is used only for the long form of the LABEL_STATE and COPY_STATE descriptor records. The record types are shown in the following table:
Record Type | R |
---|---|
label_state | 0 |
copy_state | 1 |
The record formats listed here describe general spills and restores,
and may appear in either body or prologue regions.
B.4.1 Format X1
This format is used by the SPILL_PSPREL and SPILL_SPREL descriptor records, which identify when a register is saved by spilling to the memory stack. The R bit identifies the record type, as shown in the following table:
Record Type | R |
---|---|
SPILL_PSPREL | 0 |
SPILL_SPREL | 1 |
The A, B, and REG fields identify the register being spilled. The encodings are given in the following table:
Register | A | B | REG | Notes |
---|---|---|---|---|
R3-R31 | 0 | 0 | GR | |
F2-F5 or F16-F31 | 0 | 1 | FR | |
B1-B5 | 1 | 0 | BR | |
P1-P63 | 1 | 1 | 0 | |
PSP | 1 | 1 | 1 | |
PRIUNAT | 1 | 1 | 2 | |
RP | 1 | 1 | 3 | |
AR.BSP | 1 | 1 | 4 | |
AR.BSPSTORE | 1 | 1 | 5 | |
AR.RNAT | 1 | 1 | 6 | |
AR.UNAT | 1 | 1 | 7 | |
AR.FPSR | 1 | 1 | 8 | Not supported on OpenVMS |
AR.PFS | 1 | 1 | 9 | |
AR.LC | 1 | 1 | 10 |
This format is used only by the SPILL_REG descriptor record, which identifies when a register is saved by copying to another register, or when a register is restored from its spill location. The register being saved or restored is identified by the A, B, and REG fields, using the same encodings given for Format X1. The target register to which the saved register is copied is identified by the X, Y, and TREG fields; a special encoding also indicates the restore operation. The encodings for these fields are given in the following table:
Register | X | Y | TREG |
---|---|---|---|
Restore | 0 | 0 | 0 |
R1-R127 | 0 | 0 | GR |
F2-F127 | 0 | 1 | FR |
B0-B7 | 1 | 0 | BR |
This format is used by the SPILL_PSPREL_P and SPILL_SPREL_P descriptor records, which identify when a register is saved under control of a predicate register. The R bit identifies the record type, as shown in the following table:
Record Type | R |
---|---|
SPILL_PSPREL_P | 0 |
SPILL_SPREL_P | 1 |
The QP field identifies the controlling predicate register. The
remaining fields are encoded the same as Format X1.
B.4.4 Format X4
This format is used only by the SPILL_REG_P descriptor record, which identifies when a register is saved to another register under control of a predicate register, or when a register is restored under control of a predicate register. The QP field identifies the controlling predicate register. The remaining fields are encoded the same as Formats X1 and X2.
Previous | Next | Contents | Index |