4. Hawk Long Immediate Instructions

Part of the Hawk Manual
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science


4.1. Long Immediate Format
4.2. Load Immediate Long

4.1. Long Immediate Format

07060504 03020100 15141312 11100908
1 1 1 0 dst const:7:0

15141312 11100908 07060504 03020100

Long immediate instructions occupy 32 bits and are not supported on the Sparrowhawk; the extra 16 bits come from the next successive instruction halfword. There is only one instruciton in this group, LIL. Bits 7 to 0 (the least significant byte) of the 24 bit constant are in the instruction register, while bits 23 to 8 (the most significant two bytes) of the constant are in the immediately following halfword.

4.2. Load Immediate Long

07060504 03020100 15141312 11100908                        
1 1 1 0 dst (pc) const:7:0 LIL dst,const r[dst] = sx(const)

LIL       NZVC unchanged

The LIL (load immediate long) instruction stores a 24 bit sign extended constant into the destination register r[dst]. The low 8 bits of the constant come from the const field of the instruction register, while the higher 16 bits come from the halfword that immediately follows. The following examples load r[5] with the largest possible positive integer that LIL permits; any larger values will be interpreted as negative numbers because of sign extension:

        LIL     R5,#7FFFFF
        LIL     R5,8388607

If dst is zero, the LIL instruction serves as an absolute branch or jump. The signed 24-bit constant limits the use of this to code in the low 8 megabytes of the address space.