[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 1/2] mips: set CP0 Debug DExcCode for SDBBP instructi
From: |
Aurelien Jarno |
Subject: |
[Qemu-devel] [PULL 1/2] mips: set CP0 Debug DExcCode for SDBBP instruction |
Date: |
Mon, 17 Jul 2017 16:55:55 +0200 |
From: Pavel Dovgalyuk <address@hidden>
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 <address@hidden>
Message-id: address@hidden
Reviewed-by: Aurelien Jarno <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Aurelien Jarno <address@hidden>
---
target/mips/helper.c | 2 ++
1 file changed, 2 insertions(+)
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;
--
2.11.0