Go to the previous, next section.
The ldc
(load constant) instruction requires an operand that is a
constant value stored in a simple_immed
structure. These
constant values may be integers or floating-point numbers or symbolic
addresses. A simple_immed
contains a union of these fields
along with a tag to identify which field is used. The tag value may be
IMMED_INT
, IMMED_FLOAT
, or
IMMED_SYMBOL
.
A symbolic address is specified by a symbol and a constant integer
offset. The offset is specified in terms of bits. For example, to get
the address of a field within a structure, the simple_immed
would contain a pointer to the simple_sym
of the variable
with the offset equal to the number of bits between the beginning of the
structure and the desired field.
Go to the previous, next section.