]> Git Repo - qemu.git/commitdiff
mips: set CP0 Debug DExcCode for SDBBP instruction
authorPavel Dovgalyuk <[email protected]>
Fri, 23 Jun 2017 10:41:16 +0000 (12:41 +0200)
committerAurelien Jarno <[email protected]>
Mon, 17 Jul 2017 14:48:21 +0000 (16:48 +0200)
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]>
Message-id: 20170502120350.3368.92338.stgit@PASHA-ISP
Reviewed-by: Aurelien Jarno <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
target/mips/helper.c

index e359ca3b448daa15b3536af3b0c19e77c465dfe5..166f0d1243aa3802c5dab5205184a70f44eb3118 100644 (file)
@@ -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;
This page took 0.026839 seconds and 4 git commands to generate.