target-ppc: SPR_BOOKE_ESR not set on FP exceptions
authorAaron Larson <alarson@ddci.com>
Thu, 22 Jun 2017 00:03:08 +0000 (17:03 -0700)
committerDavid Gibson <david@gibson.dropbear.id.au>
Tue, 11 Jul 2017 01:04:01 +0000 (11:04 +1000)
Properly set the book E exception syndrome register when a floating
point exception occurs.

Currently on a book E processor, the POWERPC_EXCP_FP exception handler
fails to set "env->spr[SPR_BOOKE_ESR] = ESR_FP;" as required by the
book E specification.

Signed-off-by: Aaron Larson <alarson@ddci.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/excp_helper.c

index 3a9f0861e7737e13f9c34d47b4714e2c1acc01ba..e6009e70e5830daf570a768132b71c9a888b56e7 100644 (file)
@@ -283,6 +283,7 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int excp_model, int excp)
              * precise in the MSR.
              */
             msr |= 0x00100000;
+            env->spr[SPR_BOOKE_ESR] = ESR_FP;
             break;
         case POWERPC_EXCP_INVAL:
             LOG_EXCP("Invalid instruction at " TARGET_FMT_lx "\n", env->nip);