48
Vector Unit Instructions
VU Loads and Stores
Vector loads and stores are scalar unit (SU) instructions used to move the
contents of DMEM to and from VU registers (see “VU Register Format” on
page 34). VU loads and stores can only access DMEM; they cannot access
DRAM. Data must be transferred into DMEM using a DMA operation before
use.
VU Load and Store instructions follow the general format of MIPS
Coprocessor loads and stores (
LWC2, SWC2
), except for a different
interpretation of the 16 offset bits. This usage of the 16 bit offset field in MIPS
coprocessor opcode space extends the number of memory operations,
without using up a lot of instruction space.
Figure 3-1
VU Load and Store Instruction Format
The operands are:
Base
is an SU register containing a DMEM memory address. Only the
lower 12 bits of this register are used, other bits are ignored.
VT
is the VU register to or from which memory data is written.
The
opcode
is the memory item type and operation being performed.
Element
is the byte element of the VU register being accessed.
Offset
is a 7 bit constant shifted by the memory item size and added to
the memory address in
base
. This means that the offset supplied in the
assembly language must be an operand-size-aligned integral; a
multiple of 2 bytes for a short load, 4 bytes for a long, etc. Since the
offset is added to the
base
, the effective address can still be
byte-aligned, however.
All VU loads are
delayed load instructions,
with three load delay slots
(results from a VU load are available for use in the fourth instruction
following the load). If a VU instruction attempts to use the destination
0
16
21
26
31
vt
base
LWC2 or SWC2
element
opcode
11
7
offset
25
20
15
10
6
Содержание Ultra64
Страница 2: ...2 ...
Страница 10: ...10 ...
Страница 12: ...12 Figure 6 2 buildtask Operation 137 ...
Страница 14: ...14 ...
Страница 80: ...80 Vector Unit Instructions vmadm dres_int dres_int vconst 3 vmadn dres_frac vconst vconst 0 ...
Страница 104: ...104 RSP Coprocessor 0 ...
Страница 150: ...150 Advanced Information ...
Страница 155: ...Revision 1 0 155 ...
Страница 248: ...248 Exceptions None ...
Страница 251: ...Revision 1 0 251 Exceptions None ...
Страница 254: ...254 Exceptions None ...
Страница 257: ...Revision 1 0 257 Exceptions None ...
Страница 293: ...Revision 1 0 293 Exceptions None ...
Страница 316: ...316 Exceptions None ...