VR4300: Difference between revisions
m
Fixed broken code formatting
Fraser.mips (talk | contribs) m (→Known Bugs: Added a clearer example of the MUL/MUL CPU bug) |
m (Fixed broken code formatting) |
||
Line 10:
For example, consider this function:
▲ <code>float mul(float x, float y) { return x * y; }</code>
Without the fix it may generate this code:
<
jal mul
nop
Line 20 ⟶ 19:
jr $31
mul.s $f0,$f12,$f14
</
The mul.s after the nop (red) may produce unexpected results, if the operands in the mul.s after the jr (yellow) include NaN, Zero or Infinity.
With the fix it may generate this code:
<
mul.s $f1,$f13,$f15
nop
Line 34 ⟶ 33:
jr $31
nop
</
Depending on the other instructions that can be reordered the nops could be other instructions that perform work, so this is a worst case scenario.
[[Category:Motherboard components]]
|