COP1: Difference between revisions

No edit summary
Line 241:
 
== Full Mode vs Half Mode ==
The COP1 can run in one of two modes, which is controlled via COP0.Status Bit 26. In "Full Mode", the COP1 has 32 bit registers that are each 64 bits wide are available. In "Half Mode", only the 16 even registers are supposedlegal to be used; using evenodd numbered registers is considered undefined behavior.
 
Older software usually ran in "Half Mode". A reason for that could be that context switches (for multiple threadsmultithreading) can be performed more cheaply, as only 16 FPU registers need to be stored.
 
When using "Half Mode" it is important to not use any FPU registers with odd indices. For compiled code this has to be configured accordingly ("+nooddspreg" in clang).
Line 249:
''The remainder of this section documents undefined behavior. Skip this unless you are an emulator developer who cares about accuracy a little bit too much.''
 
If software decides to use odd indices in "Half Mode", different things happen, depending on the instruction:
Odd numbered registers (while in "Half Mode") behave differently, which is summarized in the following table:
 
{| class="wikitable"
14

edits