Revision 1.0
Vector Unit Registers
35
Instructions can operate on pairs of elements, adding two vectors (8 pairs of
numbers), for example.
VU registers can also be addressed as scalars, allowing you to add 1 number
(the same number) to a vector (8 numbers), for example.
Further, registers can be broken into
scalar halves
and
scalar quarters,
allowing you to treat pieces of VU as subsets, performing the same
operations on consecutive ranges of elements. This is best understood with
an illustrated example, see Figure 3-8, “Scalar Half and Scalar Quarter
Vector Register Elements,” on page 59.
RSP assembly language syntax for vector registers is explained in the section
“Vector Register Element Syntax” in Chapter 5.
Loads, Stores, and Moves
VU loads, stores, and moves
always
reference data within VU registers by
their bytes. So if you want to load a short (2 bytes) into element 3 of a VU
register, you must do this:
lsv
$v1[6], 0($1)
Element 3 corresponds to byte 6, of the VU registers.
Caution:
A very common programming error is to confuse the “byte
index” of a VU load/store with the “element index” of a computational
instruction.
Summary of Contents for Ultra64
Page 2: ...2 ...
Page 10: ...10 ...
Page 12: ...12 Figure 6 2 buildtask Operation 137 ...
Page 14: ...14 ...
Page 80: ...80 Vector Unit Instructions vmadm dres_int dres_int vconst 3 vmadn dres_frac vconst vconst 0 ...
Page 104: ...104 RSP Coprocessor 0 ...
Page 150: ...150 Advanced Information ...
Page 155: ...Revision 1 0 155 ...
Page 248: ...248 Exceptions None ...
Page 251: ...Revision 1 0 251 Exceptions None ...
Page 254: ...254 Exceptions None ...
Page 257: ...Revision 1 0 257 Exceptions None ...
Page 293: ...Revision 1 0 293 Exceptions None ...
Page 316: ...316 Exceptions None ...