Previous: Pipeline
Up: The Architecture of CAST
Next: Program Counter Unit
Previous Page: Pipeline
Next Page: Program Counter Unit
Tagged data are used to support the implementation of generic operations. The type information is encoded in the stack element, and scalar data (like integer and boolean values) are directly accessible. CAST uses 40-bit words which consist of 32-bit data fields and 8-bit tag fields. The hardware supports integer and boolean values and two types of lists by some special instructions which check the tag simultaneously with the execution of the operation and trap if they are not of the expected value. The trap handler can determine the type of the operands and start the appropriate program. All other tags can be freely used by software. This is supported by some instructions which extract and set the tag (see 0.2.6).
The tag of a result is normally the tag of the first source operand or a boolean tag, if a relational operation was performed.