path: root/target-ppc/cpu.h
diff options
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2016-07-27 16:56:19 +1000
committerDavid Gibson <david@gibson.dropbear.id.au>2016-09-07 12:33:46 +1000
commitdb789c6cd3383e472c2de0115c3d3fa4b2e5c825 (patch)
treefea2e88db3a39d6161d2a56671f8039cccf2266d /target-ppc/cpu.h
parent323ad19bcc601d3ec9cb6f0f5b4d67b602fc519e (diff)
ppc: Provide basic raise_exception_* functions
Instead of using the same helpers called from translate.c, let's have a bunch of functions that take the various argument combinations, especially the retaddr which will be needed in subsequent patches, and leave the helpers to be just that, helpers for translate.c We don't yet convert all users, we'll go through them in subsequent patches. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> -- v2. Fix raise_exception_ra() to properly pass raddr Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'target-ppc/cpu.h')
1 files changed, 8 insertions, 0 deletions
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index d84ea3c1a7..a872efb887 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -2299,6 +2299,14 @@ static inline void cpu_get_tb_cpu_state(CPUPPCState *env, target_ulong *pc,
*flags = env->hflags;
+void QEMU_NORETURN raise_exception(CPUPPCState *env, uint32_t exception);
+void QEMU_NORETURN raise_exception_ra(CPUPPCState *env, uint32_t exception,
+ uintptr_t raddr);
+void QEMU_NORETURN raise_exception_err(CPUPPCState *env, uint32_t exception,
+ uint32_t error_code);
+void QEMU_NORETURN raise_exception_err_ra(CPUPPCState *env, uint32_t exception,
+ uint32_t error_code, uintptr_t raddr);
#if !defined(CONFIG_USER_ONLY)
static inline int booke206_tlbm_id(CPUPPCState *env, ppcmas_tlb_t *tlbm)