move cpu_pc_from_tb to target-*/exec.h
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 29 Jun 2010 07:58:50 +0000 (09:58 +0200)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 3 Jul 2010 06:48:12 +0000 (09:48 +0300)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
22 files changed:
target-alpha/cpu.h
target-alpha/exec.h
target-arm/cpu.h
target-arm/exec.h
target-cris/cpu.h
target-cris/exec.h
target-i386/cpu.h
target-i386/exec.h
target-m68k/cpu.h
target-m68k/exec.h
target-microblaze/cpu.h
target-microblaze/exec.h
target-mips/cpu.h
target-mips/exec.h
target-ppc/cpu.h
target-ppc/exec.h
target-s390x/cpu.h
target-s390x/exec.h
target-sh4/cpu.h
target-sh4/exec.h
target-sparc/cpu.h
target-sparc/exec.h

index 314d6acc4eb18c1d706f40c528b9ffdd54010cf9..c33339635aac479ef6b15766e2dcb2d670f64b97 100644 (file)
@@ -512,11 +512,6 @@ void pal_init (CPUState *env);
 void call_pal (CPUState *env);
 #endif
 
-static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
-{
-    env->pc = tb->pc;
-}
-
 static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,
                                         target_ulong *cs_base, int *flags)
 {
index 0fb459da43eb6e11b4c36a2c27b3dc37557fd74e..a8a38d29f465af4f45da0fc506e12d93c5ba2f8e 100644 (file)
@@ -53,4 +53,9 @@ static inline int cpu_halted(CPUState *env)
     return EXCP_HALTED;
 }
 
+static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
+{
+    env->pc = tb->pc;
+}
+
 #endif /* !defined (__ALPHA_EXEC_H__) */
index f3d138de6b0b54161df81f98b4b6b23dbc5b28d0..ddf764e2b8981436e84b8d72704cf4c8552dd128 100644 (file)
@@ -437,11 +437,6 @@ static inline void cpu_clone_regs(CPUState *env, target_ulong newsp)
 #include "cpu-all.h"
 #include "exec-all.h"
 
-static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
-{
-    env->regs[15] = tb->pc;
-}
-
 static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,
                                         target_ulong *cs_base, int *flags)
 {
index 0225c3fcd3540d44dc535ab68c478c5b6e9840a9..e4c35a33ebbd670146db6a87511c9586eb107259 100644 (file)
@@ -50,3 +50,9 @@ static inline int cpu_halted(CPUState *env) {
 #endif
 
 void raise_exception(int);
+
+static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
+{
+    env->regs[15] = tb->pc;
+}
+
index a62d57cf8a8f420e27b7c7556630169d1749452d..f86c52a43ea52aa1025c3370bfabd6cd591b3392 100644 (file)
@@ -252,11 +252,6 @@ static inline void cpu_set_tls(CPUCRISState *env, target_ulong newtls)
 #include "cpu-all.h"
 #include "exec-all.h"
 
-static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
-{
-    env->pc = tb->pc;
-}
-
 static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,
                                         target_ulong *cs_base, int *flags)
 {
index 55776baef057bee8b30b5b454f87e7bae82fbd66..93ce768d755f8bdce0cf396fcb5ee8e439c98ebc 100644 (file)
@@ -45,3 +45,9 @@ static inline int cpu_halted(CPUState *env) {
        }
        return EXCP_HALTED;
 }
+
+static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
+{
+    env->pc = tb->pc;
+}
+
index 4de486e37666fae9b9d2f5f0d9b526313b63b66f..704c2658427df346a0a9fad45ffb2f4a0d4dd847 100644 (file)
@@ -941,11 +941,6 @@ static inline void cpu_clone_regs(CPUState *env, target_ulong newsp)
 #include "hw/apic.h"
 #endif
 
-static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
-{
-    env->eip = tb->pc - tb->cs_base;
-}
-
 static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,
                                         target_ulong *cs_base, int *flags)
 {
index 4ff3c573cade55fb7180a6bcb1955c6610b5d1bb..fc8945b964d8d98e2da03241f04a8a435225ef95 100644 (file)
@@ -327,3 +327,9 @@ static inline void cpu_load_efer(CPUState *env, uint64_t val)
     if (env->efer & MSR_EFER_SVME)
         env->hflags |= HF_SVME_MASK;
 }
+
+static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
+{
+    env->eip = tb->pc - tb->cs_base;
+}
+
index b2f37ec33dee76554058fbddcded4b56a0d7bf94..0f8451482a7f4a3803d1da23a70ac532714235d2 100644 (file)
@@ -244,11 +244,6 @@ static inline void cpu_clone_regs(CPUState *env, target_ulong newsp)
 #include "cpu-all.h"
 #include "exec-all.h"
 
-static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
-{
-    env->pc = tb->pc;
-}
-
 static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,
                                         target_ulong *cs_base, int *flags)
 {
index ece9aa09cdfdd1ea8fd18c852932cd8cc79b3a53..f31e06ed95cf3f71cfac3712413576aad65285f9 100644 (file)
@@ -42,3 +42,9 @@ static inline int cpu_halted(CPUState *env) {
     }
     return EXCP_HALTED;
 }
+
+static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
+{
+    env->pc = tb->pc;
+}
+
index ff8c8c8a8020648dcdcc62a64548894d039477e0..a2677cfa1533dbfc680635309fbddc324d643377 100644 (file)
@@ -307,11 +307,6 @@ static inline int cpu_interrupts_enabled(CPUState *env)
 #include "cpu-all.h"
 #include "exec-all.h"
 
-static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
-{
-    env->sregs[SR_PC] = tb->pc;
-}
-
 static inline target_ulong cpu_get_pc(CPUState *env)
 {
     return env->sregs[SR_PC];
index db1c99e81341ce326f1b98bfc761a1f9d5124d16..87b2494dc67340cd7ae343c4096eaaa551d5f5af 100644 (file)
@@ -44,3 +44,9 @@ static inline int cpu_halted(CPUState *env) {
        }
        return EXCP_HALTED;
 }
+
+static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
+{
+    env->sregs[SR_PC] = tb->pc;
+}
+
index c21b8e43ffd1f7b6664142996737ab304a1c12c7..1aaca77774c687dab5b2fb05e5384308a9492141 100644 (file)
@@ -612,13 +612,6 @@ target_phys_addr_t cpu_mips_translate_address (CPUState *env, target_ulong addre
                                               int rw);
 #endif
 
-static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
-{
-    env->active_tc.PC = tb->pc;
-    env->hflags &= ~MIPS_HFLAG_BMASK;
-    env->hflags |= tb->flags & MIPS_HFLAG_BMASK;
-}
-
 static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,
                                         target_ulong *cs_base, int *flags)
 {
index a07761d88f3fe0f40b0eafca251a05f51a556efd..af61b54dcf0aa24353710a09e0379255d0126063 100644 (file)
@@ -76,4 +76,11 @@ static inline void compute_hflags(CPUState *env)
     }
 }
 
+static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
+{
+    env->active_tc.PC = tb->pc;
+    env->hflags &= ~MIPS_HFLAG_BMASK;
+    env->hflags |= tb->flags & MIPS_HFLAG_BMASK;
+}
+
 #endif /* !defined(__QEMU_MIPS_EXEC_H__) */
index 2ad44867278879755b2718997ab7a2ec2d3fe074..ca0eb1e386e2200158fd44384db56466248b33a1 100644 (file)
@@ -1601,11 +1601,6 @@ enum {
 
 /*****************************************************************************/
 
-static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
-{
-    env->nip = tb->pc;
-}
-
 static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,
                                         target_ulong *cs_base, int *flags)
 {
index 09f592c2a39a225f3187c9b40e4e9b3868fa76bf..44cc5e987e78713a8044d5e516e53220382b1598 100644 (file)
@@ -52,4 +52,9 @@ static inline int cpu_halted(CPUState *env)
     return EXCP_HALTED;
 }
 
+static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
+{
+    env->nip = tb->pc;
+}
+
 #endif /* !defined (__PPC_H__) */
index dd407b2424ff2aad025900b53808c31a36b462d0..49d3128896a1d559601debd42c5f73410cd045b7 100644 (file)
@@ -123,11 +123,6 @@ extern CPUState *s390_cpu_addr2state(uint16_t cpu_addr);
 #define EXCP_ADDR 5 /* addressing exception */
 #define EXCP_EXECUTE_SVC 0xff00000 /* supervisor call via execute insn */
 
-static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock* tb)
-{
-    env->psw.addr = tb->pc;
-}
-
 static inline void cpu_get_tb_cpu_state(CPUState* env, target_ulong *pc,
                                         target_ulong *cs_base, int *flags)
 {
index 837f8534759b5a1778679d78f97283ebac836678..bf3f264026813b884c672e348e459aea4f507d82 100644 (file)
@@ -45,3 +45,9 @@ static inline int cpu_halted(CPUState *env)
     }
     return EXCP_HALTED;
 }
+
+static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock* tb)
+{
+    env->psw.addr = tb->pc;
+}
+
index f8b1680296afa66b6cafc3e64ddb893bef28b0fc..f2dee37878aa0e1df2268d0db3717e12c17b2a35 100644 (file)
@@ -303,12 +303,6 @@ static inline int cpu_ptel_pr (uint32_t ptel)
 #define PTEA_TC        (1 << 3)
 #define cpu_ptea_tc(ptea) (((ptea) & PTEA_TC) >> 3)
 
-static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
-{
-    env->pc = tb->pc;
-    env->flags = tb->flags;
-}
-
 #define TB_FLAG_PENDING_MOVCA  (1 << 4)
 
 static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,
index edd667d70316e81b0f42e73f8e6d27f6e23457bd..2999c023c0130ea4ca1be18a05eb78d37cc8d38c 100644 (file)
@@ -47,4 +47,10 @@ static inline int cpu_halted(CPUState *env) {
 #include "softmmu_exec.h"
 #endif
 
+static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
+{
+    env->pc = tb->pc;
+    env->flags = tb->flags;
+}
+
 #endif                         /* _EXEC_SH4_H */
index 8f0484b24acc6508f01873d49cf0eab7f6c9bd1d..95fe3dc7a1eeb93771bf5e6c67c5683f0db2044f 100644 (file)
@@ -625,12 +625,6 @@ void cpu_tick_set_limit(CPUTimer *timer, uint64_t limit);
 trap_state* cpu_tsptr(CPUState* env);
 #endif
 
-static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
-{
-    env->pc = tb->pc;
-    env->npc = tb->cs_base;
-}
-
 static inline void cpu_get_tb_cpu_state(CPUState *env, target_ulong *pc,
                                         target_ulong *cs_base, int *flags)
 {
index c84e0558ae712ad6749cdfd6a07085225208f425..f8115716eb17623d9a55521ed5afde322bbeecd9 100644 (file)
@@ -32,4 +32,10 @@ static inline int cpu_halted(CPUState *env1) {
     return EXCP_HALTED;
 }
 
+static inline void cpu_pc_from_tb(CPUState *env, TranslationBlock *tb)
+{
+    env->pc = tb->pc;
+    env->npc = tb->cs_base;
+}
+
 #endif