diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-07-27 16:56:26 +1000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2016-09-07 12:33:46 +1000 |
commit | a93ecff935af312d49e4c9349b6527813af303f5 (patch) | |
tree | 3177dba1018a65335ecb259b447c44dad73369c5 /target-ppc/fpu_helper.c | |
parent | f63fbc00d40b4a1cb1780b9abcdc019fae20ab1f (diff) |
ppc: Make float_invalid_op_excp() pass the return address
Instead of relying on NIP having been updated already
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target-ppc/fpu_helper.c')
-rw-r--r-- | target-ppc/fpu_helper.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/target-ppc/fpu_helper.c b/target-ppc/fpu_helper.c index e1f600a810..8d881fccfd 100644 --- a/target-ppc/fpu_helper.c +++ b/target-ppc/fpu_helper.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/helper-proto.h" +#include "exec/exec-all.h" #define float64_snan_to_qnan(x) ((x) | 0x0008000000000000ULL) #define float32_snan_to_qnan(x) ((x) | 0x00400000) @@ -200,8 +201,9 @@ static inline uint64_t float_invalid_op_excp(CPUPPCState *env, int op, /* Update the floating-point enabled exception summary */ env->fpscr |= 1 << FPSCR_FEX; if (msr_fe0 != 0 || msr_fe1 != 0) { - helper_raise_exception_err(env, POWERPC_EXCP_PROGRAM, - POWERPC_EXCP_FP | op); + /* GETPC() works here because this is inline */ + raise_exception_err_ra(env, POWERPC_EXCP_PROGRAM, + POWERPC_EXCP_FP | op, GETPC()); } } return ret; |