Go to the previous, next section.

Label Instructions

SUIF uses special pseudo-instructions to mark the positions of labels within the lists of instructions. These label (lab) instructions are represented by the in_lab class, which contains a single field holding the symbol for a label. The label and set_label methods access this field.

No operation is performed by a label instruction. Its only purpose is to mark the location of a label symbol in an instruction list. The label field must be a pointer to the symbol for the label, which must be defined within the scope where the label instruction occurs. The destination operand is unused and trying to set it will cause an error. The result type should always be the SUIF void type.

Go to the previous, next section.