VR4300

The VR4300 is the CPU of the Nintendo 64, and is an NEC VR4300i with slight modifications. Running at 93.75 MHz, the VR4300 handles game logic, reading responding to controller input from the PIF, and preparing display lists and audio command lists for the RCP to draw and synthesize audio.

VR4300 Users Manual

= Known Bugs =

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 steppings, and affects some but not all Nintendo 64 consoles. There is a ROM which tests if your hardware is affected by this bug (where?)

GCC accepts the  flag, which tells GCC to generate code with a workaround for this bug—two   instructions are inserted after every   or. For example, consider this function:

float mul(float x, float y) { return x * y; }

If the fix is disabled, GCC will generate the following assembly (for the n32 ABI):

mul: jr     $31 mul.s  $f0,$f12,$f14
 * 1) Does not contain workaround, may cause problems.

With the setting enabled, GCC will append  instructions. Note that in this case, the second one goes into the branch delay slot.

mul: jr     $31 nop mul.s  $f0,$f12,$f14 nop
 * 1) Contains workaround for CPU bug.