Skip to contentSkip to conversation

Common cpu_loop_exit prototype

PATCH Applied Jan Kiszka 2 participants 2 messages Nov 28, 2008 – Nov 30, 2008

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/2 Common cpu_loop_exit prototype

All archs use the same cpu_loop_exit, so move the prototype in a common header. i386 was carrying a __hidden attribute, but that was empty for this arch anyway.

---

 exec-all.h          |    1 +
 target-alpha/cpu.h  |    1 -
 target-arm/exec.h   |    2 --
 target-cris/exec.h  |    2 --
 target-i386/exec.h  |    1 -
 target-m68k/exec.h  |    2 --
 target-mips/exec.h  |    1 -
 target-ppc/cpu.h    |    1 -
 target-sh4/exec.h   |    2 --
 target-sparc/exec.h |    3 ---
 10 files changed, 1 insertions(+), 15 deletions(-)
exec-all.h +1 -0
index aec318b..ca97f57 100644
@@ -82,6 +82,7 @@ TranslationBlock *tb_gen_code(CPUState *env,
                               target_ulong pc, target_ulong cs_base, int flags,
                               int cflags);
 void cpu_exec_init(CPUState *env);
+void cpu_loop_exit(void);
 int page_unprotect(target_ulong address, unsigned long pc, void *puc);
 void tb_invalidate_phys_page_range(target_phys_addr_t start, target_phys_addr_t end,
                                    int is_cpu_write_access);
target-alpha/cpu.h +0 -1
index 122e2c2..65be4fb 100644
@@ -409,7 +409,6 @@ int cpu_alpha_signal_handler(int host_signum, void *pinfo,
                              void *puc);
 int cpu_alpha_mfpr (CPUState *env, int iprn, uint64_t *valp);
 int cpu_alpha_mtpr (CPUState *env, int iprn, uint64_t val, uint64_t *oldvalp);
-void cpu_loop_exit (void);
 void pal_init (CPUState *env);
 #if !defined (CONFIG_USER_ONLY)
 void call_pal (CPUState *env);
target-arm/exec.h +0 -2
index c543cf4..88f0886 100644
@@ -58,6 +58,4 @@ static inline int cpu_halted(CPUState *env) {
 #include "softmmu_exec.h"
 #endif
 
-void cpu_loop_exit(void);
-
 void raise_exception(int);
target-cris/exec.h +0 -2
index 6171473..ec7346a 100644
@@ -45,8 +45,6 @@ int cpu_cris_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
 void cpu_cris_flush_flags(CPUCRISState *env, int cc_op);
 void helper_movec(CPUCRISState *env, int reg, uint32_t val);
 
-void cpu_loop_exit(void);
-
 static inline int cpu_halted(CPUState *env) {
 	if (!env->halted)
 		return 0;
target-i386/exec.h +0 -1
index d0756e1..3663166 100644
@@ -72,7 +72,6 @@ void raise_interrupt(int intno, int is_int, int error_code,
 void raise_exception_err(int exception_index, int error_code);
 void raise_exception(int exception_index);
 void do_smm_enter(void);
-void __hidden cpu_loop_exit(void);
 
 /* n must be a constant to be efficient */
 static inline target_long lshift(target_long x, int n)
target-m68k/exec.h +0 -2
index 745606e..f67941d 100644
@@ -44,8 +44,6 @@ int cpu_m68k_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
 #include "softmmu_exec.h"
 #endif
 
-void cpu_loop_exit(void);
-
 static inline int cpu_halted(CPUState *env) {
     if (!env->halted)
         return 0;
target-mips/exec.h +0 -1
index 5d3e356..8ab6437 100644
@@ -29,7 +29,6 @@ int cpu_mips_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
 void do_interrupt (CPUState *env);
 void r4k_invalidate_tlb (CPUState *env, int idx, int use_extra);
 
-void cpu_loop_exit(void);
 void do_raise_exception_err (uint32_t exception, int error_code);
 void do_raise_exception (uint32_t exception);
 
target-ppc/cpu.h +0 -1
index 711044b..8f7309b 100644
@@ -689,7 +689,6 @@ int cpu_ppc_signal_handler (int host_signum, void *pinfo,
 
 void do_interrupt (CPUPPCState *env);
 void ppc_hw_interrupt (CPUPPCState *env);
-void cpu_loop_exit (void);
 
 void dump_stack (CPUPPCState *env);
 
target-sh4/exec.h +0 -2
index f2e6fea..6122610 100644
@@ -65,6 +65,4 @@ int find_utlb_entry(CPUState * env, target_ulong address, int use_asid);
 
 void do_interrupt(CPUState * env);
 
-void cpu_loop_exit(void);
-
 #endif				/* _EXEC_SH4_H */
target-sparc/exec.h +0 -3
index 75410aa..36fd117 100644
@@ -24,9 +24,6 @@ static inline void regs_to_env(void)
 /* op_helper.c */
 void do_interrupt(CPUState *env);
 
-/* cpu-exec.c */
-void cpu_loop_exit(void);
-
 static inline int cpu_halted(CPUState *env1) {
     if (!env1->halted)
         return 0;
#1 lore raw
Quoted 4 lines · Jan Kiszka

All archs use the same cpu_loop_exit, so move the prototype in a common header. i386 was carrying a __hidden attribute, but that was empty for this arch anyway.

Thanks, applied.

Quoted 140 lines

---

 exec-all.h          |    1 +
 target-alpha/cpu.h  |    1 -
 target-arm/exec.h   |    2 --
 target-cris/exec.h  |    2 --
 target-i386/exec.h  |    1 -
 target-m68k/exec.h  |    2 --
 target-mips/exec.h  |    1 -
 target-ppc/cpu.h    |    1 -
 target-sh4/exec.h   |    2 --
 target-sparc/exec.h |    3 ---
 10 files changed, 1 insertions(+), 15 deletions(-)
exec-all.h +1 -0
index aec318b..ca97f57 100644
@@ -82,6 +82,7 @@ TranslationBlock *tb_gen_code(CPUState *env,
                               target_ulong pc, target_ulong cs_base, int flags,
                               int cflags);
 void cpu_exec_init(CPUState *env);
+void cpu_loop_exit(void);
 int page_unprotect(target_ulong address, unsigned long pc, void *puc);
 void tb_invalidate_phys_page_range(target_phys_addr_t start, target_phys_addr_t end,
                                    int is_cpu_write_access);
target-alpha/cpu.h +0 -1
index 122e2c2..65be4fb 100644
@@ -409,7 +409,6 @@ int cpu_alpha_signal_handler(int host_signum, void *pinfo,
                              void *puc);
 int cpu_alpha_mfpr (CPUState *env, int iprn, uint64_t *valp);
 int cpu_alpha_mtpr (CPUState *env, int iprn, uint64_t val, uint64_t *oldvalp);
-void cpu_loop_exit (void);
 void pal_init (CPUState *env);
 #if !defined (CONFIG_USER_ONLY)
 void call_pal (CPUState *env);
target-arm/exec.h +0 -2
index c543cf4..88f0886 100644
@@ -58,6 +58,4 @@ static inline int cpu_halted(CPUState *env) {
 #include "softmmu_exec.h"
 #endif
 
-void cpu_loop_exit(void);
-
 void raise_exception(int);
target-cris/exec.h +0 -2
index 6171473..ec7346a 100644
@@ -45,8 +45,6 @@ int cpu_cris_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
 void cpu_cris_flush_flags(CPUCRISState *env, int cc_op);
 void helper_movec(CPUCRISState *env, int reg, uint32_t val);
 
-void cpu_loop_exit(void);
-
 static inline int cpu_halted(CPUState *env) {
 	if (!env->halted)
 		return 0;
target-i386/exec.h +0 -1
index d0756e1..3663166 100644
@@ -72,7 +72,6 @@ void raise_interrupt(int intno, int is_int, int error_code,
 void raise_exception_err(int exception_index, int error_code);
 void raise_exception(int exception_index);
 void do_smm_enter(void);
-void __hidden cpu_loop_exit(void);
 
 /* n must be a constant to be efficient */
 static inline target_long lshift(target_long x, int n)
target-m68k/exec.h +0 -2
index 745606e..f67941d 100644
@@ -44,8 +44,6 @@ int cpu_m68k_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
 #include "softmmu_exec.h"
 #endif
 
-void cpu_loop_exit(void);
-
 static inline int cpu_halted(CPUState *env) {
     if (!env->halted)
         return 0;
target-mips/exec.h +0 -1
index 5d3e356..8ab6437 100644
@@ -29,7 +29,6 @@ int cpu_mips_handle_mmu_fault (CPUState *env, target_ulong address, int rw,
 void do_interrupt (CPUState *env);
 void r4k_invalidate_tlb (CPUState *env, int idx, int use_extra);
 
-void cpu_loop_exit(void);
 void do_raise_exception_err (uint32_t exception, int error_code);
 void do_raise_exception (uint32_t exception);
 
target-ppc/cpu.h +0 -1
index 711044b..8f7309b 100644
@@ -689,7 +689,6 @@ int cpu_ppc_signal_handler (int host_signum, void *pinfo,
 
 void do_interrupt (CPUPPCState *env);
 void ppc_hw_interrupt (CPUPPCState *env);
-void cpu_loop_exit (void);
 
 void dump_stack (CPUPPCState *env);
 
target-sh4/exec.h +0 -2
index f2e6fea..6122610 100644
@@ -65,6 +65,4 @@ int find_utlb_entry(CPUState * env, target_ulong address, int use_asid);
 
 void do_interrupt(CPUState * env);
 
-void cpu_loop_exit(void);
-
 #endif				/* _EXEC_SH4_H */
target-sparc/exec.h +0 -3
index 75410aa..36fd117 100644
@@ -24,9 +24,6 @@ static inline void regs_to_env(void)
 /* op_helper.c */
 void do_interrupt(CPUState *env);
 
-/* cpu-exec.c */
-void cpu_loop_exit(void);
-
 static inline int cpu_halted(CPUState *env1) {
     if (!env1->halted)
         return 0;
Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net