[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/17] target/ppc: Expose some excp_helper functions
From: |
Fabiano Rosas |
Subject: |
[PATCH 10/17] target/ppc: Expose some excp_helper functions |
Date: |
Tue, 1 Mar 2022 10:56:13 -0300 |
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 --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;
--
2.34.1
- [PATCH 01/17] target/ppc: Add a tracepoint for System Calls, (continued)
- [PATCH 01/17] target/ppc: Add a tracepoint for System Calls, Fabiano Rosas, 2022/03/01
- [PATCH 03/17] target/ppc: Move 40x CPUs code to their own file, Fabiano Rosas, 2022/03/01
- [PATCH 06/17] target/ppc: Move 74xx CPUs code to their own file, Fabiano Rosas, 2022/03/01
- [PATCH 04/17] target/ppc: Move 6xx CPUs code to their own file, Fabiano Rosas, 2022/03/01
- [PATCH 07/17] target/ppc: Move BookE CPUs code to their own file, Fabiano Rosas, 2022/03/01
- [PATCH 05/17] target/ppc: Move 7xx CPUs code to their own file, Fabiano Rosas, 2022/03/01
- [PATCH 08/17] target/ppc: Move BookS CPUs to their own file, Fabiano Rosas, 2022/03/01
- [PATCH 09/17] target/ppc: Remove leftover comments from cpu_init, Fabiano Rosas, 2022/03/01
- [PATCH 10/17] target/ppc: Expose some excp_helper functions,
Fabiano Rosas <=
- [PATCH 14/17] target/ppc: Move powerpc_excp_74xx into cpu_74xx.c, Fabiano Rosas, 2022/03/01
- [PATCH 13/17] target/ppc: Move powerpc_excp_7xx into cpu_7xx.c, Fabiano Rosas, 2022/03/01
- [PATCH 17/17] target/ppc: Move powerpc_excp* to the PowerPCCPU Class, Fabiano Rosas, 2022/03/01
- [PATCH 11/17] target/ppc: Move powerpc_excp_40x into cpu_40x.c, Fabiano Rosas, 2022/03/01
- [PATCH 15/17] target/ppc: Move powerpc_excp_booke into cpu_booke.c, Fabiano Rosas, 2022/03/01
- [PATCH 02/17] target/ppc: Use trace-events instead of CPU_LOG_INT, Fabiano Rosas, 2022/03/01
- [PATCH 12/17] target/ppc: Move powerpc_excp_6xx into cpu_6xx.c, Fabiano Rosas, 2022/03/01
- [PATCH 16/17] target/ppc: Move powerpc_excp_books into cpu_books.c, Fabiano Rosas, 2022/03/01