diff options
author | Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> | 2017-06-23 12:41:16 +0200 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2017-07-17 16:48:21 +0200 |
commit | c6c2c0fc32362ba234ae3bdad1a55c2d6aefaa12 (patch) | |
tree | ebd4b1acaf8a910371aed175a85ba9f07d665b6a | |
parent | 77031ee1ce4c7e5f4b4941535c4912eb2eb3503c (diff) |
mips: set CP0 Debug DExcCode for SDBBP instruction
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 <pavel.dovgaluk@ispras.ru>
Message-id: 20170502120350.3368.92338.stgit@PASHA-ISP
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
-rw-r--r-- | target/mips/helper.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target/mips/helper.c b/target/mips/helper.c index e359ca3b44..166f0d1243 100644 --- a/target/mips/helper.c +++ b/target/mips/helper.c @@ -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; |