Revision 1.0
DMEM Organization and Usage
127
It can be convenient to reserve a VU register to hold an entire vector of
constants, available for use in vector computational instructions.
Labels in DMEM
Labels can be used in the data section to later reference offsets for the
purposes of loading or storing things.
Since DMEM is only 4K bytes, any DMEM address can be expressed with the
16 bit offset of a load/store instruction (and using the base register of
$0
).
Dynamic Data
Data which will be loaded or generated by the program does not need to be
initialized, however it may be useful to allocate space in your global DMEM
map at compile time.
Truncating the
.dat
file before building the ELF object to a size that
includes the static data, but not the dynamic data (which does not need to be
initialized) will result in a smaller ELF object and therefore less ROM and
DRAM usage.
Diagnostic Information
The assembler provides several useful directives for computing and/or
printing diagnostic information. These are most useful while laying out the
DMEM.
These directives include
.bound, .align, .symbol,
and
.print.
All of these directives are explained in “Assembly Directives” on page 114.
Using temporary assembler symbols to compute sizes, alignment, and hold
diagnostic information is another useful tip.
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 ...