mips: set CP0 Debug DExcCode for SDBBP instruction
PATCH 1/1 mips: set CP0 Debug DExcCode for SDBBP instruction
From: Pavel Dovgalyuk <[email protected]>
This patch fixes setting DExcCode field of CP0 Debug register when SDBBP instruction is executed. According to EJTAG specification, this field must be set to the value 9 (Bp).
--- target/mips/helper.c | 2 ++ 1 file changed, 2 insertions(+)
target/mips/helper.c +2 -0
@@ -627,6 +627,8 @@ void mips_cpu_do_interrupt(CPUState *cs) goto set_DEPC;case EXCP_DBp: env->CP0_Debug |=1 << CP0DB_DBp; +/* Setup DExcCode - SDBBP instruction */ + env->CP0_Debug = (env->CP0_Debug & ~(0x1fULL <<CP0DB_DEC )) |9 <<CP0DB_DEC ; goto set_DEPC;case EXCP_DDBS : env->CP0_Debug |=1 <<CP0DB_DDBS ;
Quoted 7 lines · Pavel Dovgalyuk
From: Pavel Dovgalyuk <[email protected]>
This patch fixes setting DExcCode field of CP0 Debug register when SDBBP instruction is executed. According to EJTAG specification, this field must be set to the value 9 (Bp).
Signed-off-by Pavel Dovgalyuk <[email protected]>
Quoted 19 lines
--- target/mips/helper.c | 2 ++ 1 file changed, 2 insertions(+)target/mips/helper.c +2
-0@@ -627,6 +627,8 @@ void mips_cpu_do_interrupt(CPUState *cs) goto set_DEPC;case EXCP_DBp: env->CP0_Debug |=1 << CP0DB_DBp; +/* Setup DExcCode - SDBBP instruction */ + env->CP0_Debug = (env->CP0_Debug & ~(0x1fULL <<CP0DB_DEC )) |9 <<CP0DB_DEC ; goto set_DEPC;case EXCP_DDBS : env->CP0_Debug |=1 <<CP0DB_DDBS ;
Quoted 17 lines · Pavel Dovgalyuk
From: Pavel Dovgalyuk <[email protected]>
This patch fixes setting DExcCode field of CP0 Debug register when SDBBP instruction is executed. According to EJTAG specification, this field must be set to the value 9 (Bp).
Signed-off-by Pavel Dovgalyuk <[email protected]>--- target/mips/helper.c | 2 ++ 1 file changed, 2 insertions(+)target/mips/helper.c +0
-0
target/mips/helper.c void mips_cpu_do_interrupt(CPUState *cs) · line 634
Quoted 8 lines
target/mips/helper.c +2
-0@@ -627,6 +627,8 @@ void mips_cpu_do_interrupt(CPUState *cs) goto set_DEPC;case EXCP_DBp: env->CP0_Debug |=1 << CP0DB_DBp; +/* Setup DExcCode - SDBBP instruction */ + env->CP0_Debug = (env->CP0_Debug & ~(0x1fULL <<CP0DB_DEC )) |9 <<CP0DB_DEC ; goto set_DEPC;case EXCP_DDBS : env->CP0_Debug |=1 <<CP0DB_DDBS ;
Signature · 2 lines
Aurelien Jarno GPG: 4096R/1DDD8C9B [email protected] http://www.aurel32.net