VR4300: Difference between revisions

m
More formatting
m (Fixed broken code formatting)
m (More formatting)
Line 7:
Some VR4300 CPUs contain the “VR4300 multiplication bug”. This causes incorrect results to be generated, under certain circumstances, after computing a floating-point multiplication. The bug was fixed in later processor [https://en.wikipedia.org/wiki/Stepping_level steppings], and affects early model Nintendo 64 consoles generally NUS-01 (Japan Only), NUS-02 (Japan Only), NUS-03 (First US Revision).
 
GCC accepts the <code>-mfix4300</code> flag, which tells GCC to generate code with a workaround for this bug—two <code>nop</code> instructions are inserted after every <code>mul.s (fp),</code>, <code>mul.d (fp)</code>, or <code>mult (integer)</code>.
 
For example, consider this function: