Skip to contentSkip to conversation

Fix emulation for MIPS CP3 opcode?

PATCH In review Stefan Weil 2 participants 2 messages May 1, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix emulation for MIPS CP3 opcode?

Maybe the CpU exception for OPC_CP3 should
set CP0 Cause CE to 3, not 1?

If you agree, my patch fixes this.

Stefan

translate.c +1 -1
Index: target-mips/translate.c
===================================================================
@@ -5069,7 +5069,7 @@
                 break;
             }
         } else {
-            generate_exception_err(ctx, EXCP_CpU, 1);
+            generate_exception_err(ctx, EXCP_CpU, 3);
         }
         break;
 
#1 lore raw
Quoted 2 lines · Stefan Weil

Maybe the CpU exception for OPC_CP3 should
set CP0 Cause CE to 3, not 1?

No it shouldn't. CP3 is obsolete since MIPS IV, and was unused before. It was replaced/renamed to CP1x. If an instruction for CP1x raises an exception it should signal as CP1 exception.

Thiemo