From 0ee604abce61ab091b00ced40610866e02f55790 Mon Sep 17 00:00:00 2001 From: Aaron Larson Date: Wed, 21 Jun 2017 17:03:08 -0700 Subject: [PATCH] target-ppc: SPR_BOOKE_ESR not set on FP exceptions 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 Signed-off-by: David Gibson --- target/ppc/excp_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 3a9f0861e7..e6009e70e5 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -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);