Skip to contentSkip to conversation

target-mips: Allow DSP access to be disabled once enabled.

PATCH Applied Eric Johnson 2 participants 2 messages Jan 8, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-mips: Allow DSP access to be disabled once enabled.

Clear the DSP hflags at the start of compute_hflags. Otherwise access is not properly disabled once enabled.

---
 target-mips/cpu.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
target-mips/cpu.h +1 -1
index 31602ac..5963d62 100644
@@ -751,7 +751,7 @@ static inline void compute_hflags(CPUMIPSState *env)
 {
     env->hflags &= ~(MIPS_HFLAG_COP1X | MIPS_HFLAG_64 | MIPS_HFLAG_CP0 |
                      MIPS_HFLAG_F64 | MIPS_HFLAG_FPU | MIPS_HFLAG_KSU |
-                     MIPS_HFLAG_UX);
+                     MIPS_HFLAG_UX | MIPS_HFLAG_DSP | MIPS_HFLAG_DSPR2);
     if (!(env->CP0_Status & (1 << CP0St_EXL)) &&
         !(env->CP0_Status & (1 << CP0St_ERL)) &&
         !(env->hflags & MIPS_HFLAG_DM)) {
Signature · 1 line
1.7.4.4
#1 lore raw
Quoted 14 lines · Eric Johnson

Clear the DSP hflags at the start of compute_hflags. Otherwise access is not properly disabled once enabled.

---
 target-mips/cpu.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
target-mips/cpu.h +0 -0
index 31602ac..5963d62 100644

target-mips/cpu.h static inline void compute_hflags(CPUMIPSState *env) · line 757

Quoted 8 lines
target-mips/cpu.h +1 -1
@@ -751,7 +751,7 @@ static inline void compute_hflags(CPUMIPSState *env)
 {
     env->hflags &= ~(MIPS_HFLAG_COP1X | MIPS_HFLAG_64 | MIPS_HFLAG_CP0 |
                      MIPS_HFLAG_F64 | MIPS_HFLAG_FPU | MIPS_HFLAG_KSU |
-                     MIPS_HFLAG_UX);
+                     MIPS_HFLAG_UX | MIPS_HFLAG_DSP | MIPS_HFLAG_DSPR2);
     if (!(env->CP0_Status & (1 << CP0St_EXL)) &&
         !(env->CP0_Status & (1 << CP0St_ERL)) &&
         !(env->hflags & MIPS_HFLAG_DM)) {

Thanks, applied.

Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net