pref
Prefetch
Hints that the data at address ($t2 + offset) will be needed soon, so the hardware can begin moving it into cache.
Forms
pref , ()
Operands
imm5- An unsigned 5-bit immediate,
0to31, used for values such as a shift count. imm16- A signed 16-bit immediate,
-32768to32767. $t2- Any general-purpose register,
$0to$31, using its numeric or named spelling, such as$8or$t0($zerois$0;$rais$31).
The first operand is the hint type. A prefetch is only ever a hint and never changes what a program computes; this simulator has no cache, so it does nothing. It is accepted so that compiler output assembles unchanged.
.data
.align 2
value: .word 42
.text
# Provide a valid address as a prefetch hint; inspect memory value remains 42.
la $t0, value
pref 0, 0($t0)