diff mbox series

[10/17] target/ppc: Expose some excp_helper functions

Message ID 20220301135620.2411952-11-farosas@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series target/ppc: CPU families split | expand

Commit Message

Fabiano Rosas March 1, 2022, 1:56 p.m. UTC
The next patches will move the powerpc_excp_foo functions into the
proper cpu_foo.c files. This patch makes visible some functions that
are common to all of them.

Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
---
 target/ppc/cpu.h         | 5 +++++
 target/ppc/excp_helper.c | 8 ++++----
 2 files changed, 9 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index 1b687521c7..c7bb10b0bf 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -175,6 +175,11 @@  enum {
     POWERPC_EXCP_TRAP          = 0x40,
 };
 
+const char *powerpc_excp_name(int excp);
+void powerpc_set_excp_state(PowerPCCPU *cpu,
+                            target_ulong vector, target_ulong msr);
+void powerpc_reset_excp_state(PowerPCCPU *cpu);
+
 #define PPC_INPUT(env) ((env)->bus_model)
 
 /*****************************************************************************/
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
index 2b5b1e00d8..07190d785a 100644
--- a/target/ppc/excp_helper.c
+++ b/target/ppc/excp_helper.c
@@ -36,7 +36,7 @@ 
 /* Exception processing */
 #if !defined(CONFIG_USER_ONLY)
 
-static const char *powerpc_excp_name(int excp)
+const char *powerpc_excp_name(int excp)
 {
     switch (excp) {
     case POWERPC_EXCP_CRITICAL: return "CRITICAL";
@@ -335,7 +335,7 @@  static void ppc_excp_apply_ail(PowerPCCPU *cpu, int excp, target_ulong msr,
 }
 #endif
 
-static void powerpc_reset_excp_state(PowerPCCPU *cpu)
+void powerpc_reset_excp_state(PowerPCCPU *cpu)
 {
     CPUState *cs = CPU(cpu);
     CPUPPCState *env = &cpu->env;
@@ -345,8 +345,8 @@  static void powerpc_reset_excp_state(PowerPCCPU *cpu)
     env->error_code = 0;
 }
 
-static void powerpc_set_excp_state(PowerPCCPU *cpu, target_ulong vector,
-                                   target_ulong msr)
+void powerpc_set_excp_state(PowerPCCPU *cpu, target_ulong vector,
+                            target_ulong msr)
 {
     CPUPPCState *env = &cpu->env;