]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commitdiff
target-mips: enable access to DSP ASE if implemented
authorPetar Jovanovic <petarj@mips.com>
Wed, 23 Jan 2013 02:57:02 +0000 (03:57 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Thu, 31 Jan 2013 22:42:03 +0000 (23:42 +0100)
compute_hflags() will reset DSP h-flags, so MX bit should be initially set
for usermode in cpu_state_reset() if DSP ASE is implemented.
This change will bring back user-mode support for DSP ASE, since one of the
recent changes broke it.

Signed-off-by: Petar Jovanovic <petarj@mips.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-mips/translate.c

index e58d916b040faa50d689b663c48dd4b2388436a0..3b77b53b9369309ce3a48b25b6d96a8c22701c64 100644 (file)
@@ -15978,10 +15978,8 @@ void cpu_state_reset(CPUMIPSState *env)
     if (env->CP0_Config1 & (1 << CP0C1_FP)) {
         env->CP0_Status |= (1 << CP0St_CU1);
     }
-    if (env->cpu_model->insn_flags & ASE_DSPR2) {
-        env->hflags |= MIPS_HFLAG_DSP | MIPS_HFLAG_DSPR2;
-    } else if (env->cpu_model->insn_flags & ASE_DSP) {
-        env->hflags |= MIPS_HFLAG_DSP;
+    if (env->CP0_Config3 & (1 << CP0C3_DSPP)) {
+        env->CP0_Status |= (1 << CP0St_MX);
     }
 #else
     if (env->hflags & MIPS_HFLAG_BMASK) {