* [Qemu-devel] [PATCH 0/3] cleanup cpu_exec 1/n @ 2010-01-15 7:56 Paolo Bonzini 2010-01-15 7:56 ` [Qemu-devel] [PATCH 1/3] remove dead code from target-i386/exec.h Paolo Bonzini ` (2 more replies) 0 siblings, 3 replies; 7+ messages in thread From: Paolo Bonzini @ 2010-01-15 7:56 UTC (permalink / raw) To: qemu-devel For now, just some removal of dead code (empty inline functions). Paolo Bonzini (3): remove dead code from target-i386/exec.h kill regs_to_env and env_to_regs fix wrong indentation cpu-exec.c | 13 +---------- target-alpha/exec.h | 8 ------ target-arm/exec.h | 8 ------ target-cris/exec.h | 8 ------ target-i386/exec.h | 56 ---------------------------------------------- target-m68k/exec.h | 8 ------ target-microblaze/exec.h | 8 ------ target-mips/exec.h | 8 ------ target-ppc/exec.h | 8 ------ target-s390x/exec.h | 8 ------ target-sh4/exec.h | 10 -------- target-sparc/exec.h | 8 ------ 12 files changed, 1 insertions(+), 150 deletions(-) ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 1/3] remove dead code from target-i386/exec.h 2010-01-15 7:56 [Qemu-devel] [PATCH 0/3] cleanup cpu_exec 1/n Paolo Bonzini @ 2010-01-15 7:56 ` Paolo Bonzini 2010-01-15 14:54 ` Tristan Gingold 2010-01-19 22:39 ` Anthony Liguori 2010-01-15 7:56 ` [Qemu-devel] [PATCH 2/3] kill regs_to_env and env_to_regs Paolo Bonzini 2010-01-15 7:56 ` [Qemu-devel] [PATCH 3/3] fix wrong indentation Paolo Bonzini 2 siblings, 2 replies; 7+ messages in thread From: Paolo Bonzini @ 2010-01-15 7:56 UTC (permalink / raw) To: qemu-devel These are unused since edea5f0 (no need to define global registers in cpu-exec.c, 2008-05-10). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- target-i386/exec.h | 48 ------------------------------------------------ 1 files changed, 0 insertions(+), 48 deletions(-) diff --git a/target-i386/exec.h b/target-i386/exec.h index 864d030..e8365b1 100644 --- a/target-i386/exec.h +++ b/target-i386/exec.h @@ -292,58 +292,10 @@ static inline void load_eflags(int eflags, int update_mask) static inline void env_to_regs(void) { -#ifdef reg_EAX - EAX = env->regs[R_EAX]; -#endif -#ifdef reg_ECX - ECX = env->regs[R_ECX]; -#endif -#ifdef reg_EDX - EDX = env->regs[R_EDX]; -#endif -#ifdef reg_EBX - EBX = env->regs[R_EBX]; -#endif -#ifdef reg_ESP - ESP = env->regs[R_ESP]; -#endif -#ifdef reg_EBP - EBP = env->regs[R_EBP]; -#endif -#ifdef reg_ESI - ESI = env->regs[R_ESI]; -#endif -#ifdef reg_EDI - EDI = env->regs[R_EDI]; -#endif } static inline void regs_to_env(void) { -#ifdef reg_EAX - env->regs[R_EAX] = EAX; -#endif -#ifdef reg_ECX - env->regs[R_ECX] = ECX; -#endif -#ifdef reg_EDX - env->regs[R_EDX] = EDX; -#endif -#ifdef reg_EBX - env->regs[R_EBX] = EBX; -#endif -#ifdef reg_ESP - env->regs[R_ESP] = ESP; -#endif -#ifdef reg_EBP - env->regs[R_EBP] = EBP; -#endif -#ifdef reg_ESI - env->regs[R_ESI] = ESI; -#endif -#ifdef reg_EDI - env->regs[R_EDI] = EDI; -#endif } static inline int cpu_has_work(CPUState *env) -- 1.6.5.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] remove dead code from target-i386/exec.h 2010-01-15 7:56 ` [Qemu-devel] [PATCH 1/3] remove dead code from target-i386/exec.h Paolo Bonzini @ 2010-01-15 14:54 ` Tristan Gingold 2010-01-15 15:12 ` Paolo Bonzini 2010-01-19 22:39 ` Anthony Liguori 1 sibling, 1 reply; 7+ messages in thread From: Tristan Gingold @ 2010-01-15 14:54 UTC (permalink / raw) To: Paolo Bonzini; +Cc: qemu-devel On Jan 15, 2010, at 8:56 AM, Paolo Bonzini wrote: > These are unused since edea5f0 (no need to define global registers in > cpu-exec.c, 2008-05-10). Why not removing env_to_regs and regs_to_env ? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] remove dead code from target-i386/exec.h 2010-01-15 14:54 ` Tristan Gingold @ 2010-01-15 15:12 ` Paolo Bonzini 0 siblings, 0 replies; 7+ messages in thread From: Paolo Bonzini @ 2010-01-15 15:12 UTC (permalink / raw) To: Tristan Gingold; +Cc: qemu-devel On 01/15/2010 03:54 PM, Tristan Gingold wrote: > > On Jan 15, 2010, at 8:56 AM, Paolo Bonzini wrote: > >> These are unused since edea5f0 (no need to define global registers in >> cpu-exec.c, 2008-05-10). > > Why not removing env_to_regs and regs_to_env ? That's 2/3 indeed. :-) Paolo ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Qemu-devel] [PATCH 1/3] remove dead code from target-i386/exec.h 2010-01-15 7:56 ` [Qemu-devel] [PATCH 1/3] remove dead code from target-i386/exec.h Paolo Bonzini 2010-01-15 14:54 ` Tristan Gingold @ 2010-01-19 22:39 ` Anthony Liguori 1 sibling, 0 replies; 7+ messages in thread From: Anthony Liguori @ 2010-01-19 22:39 UTC (permalink / raw) To: Paolo Bonzini; +Cc: qemu-devel On 01/15/2010 01:56 AM, Paolo Bonzini wrote: > These are unused since edea5f0 (no need to define global registers in > cpu-exec.c, 2008-05-10). > > Signed-off-by: Paolo Bonzini<pbonzini@redhat.com> > Applied. Thanks. Regards, Anthony Liguori > --- > target-i386/exec.h | 48 ------------------------------------------------ > 1 files changed, 0 insertions(+), 48 deletions(-) > > diff --git a/target-i386/exec.h b/target-i386/exec.h > index 864d030..e8365b1 100644 > --- a/target-i386/exec.h > +++ b/target-i386/exec.h > @@ -292,58 +292,10 @@ static inline void load_eflags(int eflags, int update_mask) > > static inline void env_to_regs(void) > { > -#ifdef reg_EAX > - EAX = env->regs[R_EAX]; > -#endif > -#ifdef reg_ECX > - ECX = env->regs[R_ECX]; > -#endif > -#ifdef reg_EDX > - EDX = env->regs[R_EDX]; > -#endif > -#ifdef reg_EBX > - EBX = env->regs[R_EBX]; > -#endif > -#ifdef reg_ESP > - ESP = env->regs[R_ESP]; > -#endif > -#ifdef reg_EBP > - EBP = env->regs[R_EBP]; > -#endif > -#ifdef reg_ESI > - ESI = env->regs[R_ESI]; > -#endif > -#ifdef reg_EDI > - EDI = env->regs[R_EDI]; > -#endif > } > > static inline void regs_to_env(void) > { > -#ifdef reg_EAX > - env->regs[R_EAX] = EAX; > -#endif > -#ifdef reg_ECX > - env->regs[R_ECX] = ECX; > -#endif > -#ifdef reg_EDX > - env->regs[R_EDX] = EDX; > -#endif > -#ifdef reg_EBX > - env->regs[R_EBX] = EBX; > -#endif > -#ifdef reg_ESP > - env->regs[R_ESP] = ESP; > -#endif > -#ifdef reg_EBP > - env->regs[R_EBP] = EBP; > -#endif > -#ifdef reg_ESI > - env->regs[R_ESI] = ESI; > -#endif > -#ifdef reg_EDI > - env->regs[R_EDI] = EDI; > -#endif > } > > static inline int cpu_has_work(CPUState *env) > ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 2/3] kill regs_to_env and env_to_regs 2010-01-15 7:56 [Qemu-devel] [PATCH 0/3] cleanup cpu_exec 1/n Paolo Bonzini 2010-01-15 7:56 ` [Qemu-devel] [PATCH 1/3] remove dead code from target-i386/exec.h Paolo Bonzini @ 2010-01-15 7:56 ` Paolo Bonzini 2010-01-15 7:56 ` [Qemu-devel] [PATCH 3/3] fix wrong indentation Paolo Bonzini 2 siblings, 0 replies; 7+ messages in thread From: Paolo Bonzini @ 2010-01-15 7:56 UTC (permalink / raw) To: qemu-devel Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- cpu-exec.c | 9 --------- target-alpha/exec.h | 8 -------- target-arm/exec.h | 8 -------- target-cris/exec.h | 8 -------- target-i386/exec.h | 8 -------- target-m68k/exec.h | 8 -------- target-microblaze/exec.h | 8 -------- target-mips/exec.h | 8 -------- target-ppc/exec.h | 8 -------- target-s390x/exec.h | 8 -------- target-sh4/exec.h | 10 ---------- target-sparc/exec.h | 8 -------- 12 files changed, 0 insertions(+), 99 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index 4635be3..a426db9 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -56,9 +56,6 @@ int qemu_cpu_has_work(CPUState *env) void cpu_loop_exit(void) { - /* NOTE: the register at this point must be saved by hand because - longjmp restore them */ - regs_to_env(); longjmp(env->jmp_env, 1); } @@ -130,8 +127,6 @@ static TranslationBlock *tb_find_slow(target_ulong pc, tb_invalidated_flag = 0; - regs_to_env(); /* XXX: do it just before cpu_gen_code() */ - /* find translated block using physical mappings */ phys_pc = get_phys_addr_code(env, pc); phys_page1 = phys_pc & TARGET_PAGE_MASK; @@ -230,7 +225,6 @@ int cpu_exec(CPUState *env1) #include "hostregs_helper.h" env = env1; - env_to_regs(); #if defined(TARGET_I386) /* put eflags in CPU temporary format */ CC_SRC = env->eflags & (CC_O | CC_S | CC_Z | CC_A | CC_P | CC_C); @@ -544,7 +538,6 @@ int cpu_exec(CPUState *env1) #ifdef CONFIG_DEBUG_EXEC if (qemu_loglevel_mask(CPU_LOG_TB_CPU)) { /* restore flags in standard format */ - regs_to_env(); #if defined(TARGET_I386) env->eflags = env->eflags | helper_cc_compute_all(CC_OP) | (DF & DF_MASK); log_cpu_state(env, X86_DUMP_CCOP); @@ -651,8 +644,6 @@ int cpu_exec(CPUState *env1) /* reset soft MMU for next block (it can currently only be set by a memory fault) */ } /* for(;;) */ - } else { - env_to_regs(); } } /* for(;;) */ diff --git a/target-alpha/exec.h b/target-alpha/exec.h index 3533eb1..66526e2 100644 --- a/target-alpha/exec.h +++ b/target-alpha/exec.h @@ -39,14 +39,6 @@ register struct CPUAlphaState *env asm(AREG0); #include "softmmu_exec.h" #endif /* !defined(CONFIG_USER_ONLY) */ -static inline void env_to_regs(void) -{ -} - -static inline void regs_to_env(void) -{ -} - static inline int cpu_has_work(CPUState *env) { return (env->interrupt_request & CPU_INTERRUPT_HARD); diff --git a/target-arm/exec.h b/target-arm/exec.h index e9848e1..0225c3f 100644 --- a/target-arm/exec.h +++ b/target-arm/exec.h @@ -26,14 +26,6 @@ register struct CPUARMState *env asm(AREG0); #include "cpu.h" #include "exec-all.h" -static inline void env_to_regs(void) -{ -} - -static inline void regs_to_env(void) -{ -} - static inline int cpu_has_work(CPUState *env) { return (env->interrupt_request & diff --git a/target-cris/exec.h b/target-cris/exec.h index 0b6c5eb..728aa80 100644 --- a/target-cris/exec.h +++ b/target-cris/exec.h @@ -24,14 +24,6 @@ register struct CPUCRISState *env asm(AREG0); #include "cpu.h" #include "exec-all.h" -static inline void env_to_regs(void) -{ -} - -static inline void regs_to_env(void) -{ -} - #if !defined(CONFIG_USER_ONLY) #include "softmmu_exec.h" #endif diff --git a/target-i386/exec.h b/target-i386/exec.h index e8365b1..1fd74fd 100644 --- a/target-i386/exec.h +++ b/target-i386/exec.h @@ -290,14 +290,6 @@ static inline void load_eflags(int eflags, int update_mask) (eflags & update_mask) | 0x2; } -static inline void env_to_regs(void) -{ -} - -static inline void regs_to_env(void) -{ -} - static inline int cpu_has_work(CPUState *env) { int work; diff --git a/target-m68k/exec.h b/target-m68k/exec.h index 9aad5fa..1267bb6 100644 --- a/target-m68k/exec.h +++ b/target-m68k/exec.h @@ -28,14 +28,6 @@ register uint32_t T0 asm(AREG1); #include "cpu.h" #include "exec-all.h" -static inline void env_to_regs(void) -{ -} - -static inline void regs_to_env(void) -{ -} - #if !defined(CONFIG_USER_ONLY) #include "softmmu_exec.h" #endif diff --git a/target-microblaze/exec.h b/target-microblaze/exec.h index 552f622..646701c 100644 --- a/target-microblaze/exec.h +++ b/target-microblaze/exec.h @@ -23,14 +23,6 @@ register struct CPUMBState *env asm(AREG0); #include "cpu.h" #include "exec-all.h" -static inline void env_to_regs(void) -{ -} - -static inline void regs_to_env(void) -{ -} - #if !defined(CONFIG_USER_ONLY) #include "softmmu_exec.h" #endif diff --git a/target-mips/exec.h b/target-mips/exec.h index 8a118bb..01e9c4d 100644 --- a/target-mips/exec.h +++ b/target-mips/exec.h @@ -25,14 +25,6 @@ void fpu_dump_state(CPUState *env, FILE *f, void cpu_mips_clock_init (CPUState *env); void cpu_mips_tlb_flush (CPUState *env, int flush_global); -static inline void env_to_regs(void) -{ -} - -static inline void regs_to_env(void) -{ -} - static inline int cpu_has_work(CPUState *env) { return (env->interrupt_request & diff --git a/target-ppc/exec.h b/target-ppc/exec.h index ef1e44b..09f592c 100644 --- a/target-ppc/exec.h +++ b/target-ppc/exec.h @@ -35,14 +35,6 @@ register struct CPUPPCState *env asm(AREG0); #include "softmmu_exec.h" #endif /* !defined(CONFIG_USER_ONLY) */ -static inline void env_to_regs(void) -{ -} - -static inline void regs_to_env(void) -{ -} - static inline int cpu_has_work(CPUState *env) { return (msr_ee && (env->interrupt_request & CPU_INTERRUPT_HARD)); diff --git a/target-s390x/exec.h b/target-s390x/exec.h index 13dc7dd..8ac3d8d 100644 --- a/target-s390x/exec.h +++ b/target-s390x/exec.h @@ -35,14 +35,6 @@ static inline int cpu_has_work(CPUState *env) return env->interrupt_request & CPU_INTERRUPT_HARD; // guess } -static inline void regs_to_env(void) -{ -} - -static inline void env_to_regs(void) -{ -} - static inline int cpu_halted(CPUState *env) { if (!env->halted) { diff --git a/target-sh4/exec.h b/target-sh4/exec.h index 1c08eaf..edd667d 100644 --- a/target-sh4/exec.h +++ b/target-sh4/exec.h @@ -47,14 +47,4 @@ static inline int cpu_halted(CPUState *env) { #include "softmmu_exec.h" #endif -static inline void regs_to_env(void) -{ - /* XXXXX */ -} - -static inline void env_to_regs(void) -{ - /* XXXXX */ -} - #endif /* _EXEC_SH4_H */ diff --git a/target-sparc/exec.h b/target-sparc/exec.h index 3e021e9..70df828 100644 --- a/target-sparc/exec.h +++ b/target-sparc/exec.h @@ -13,14 +13,6 @@ register struct CPUSPARCState *env asm(AREG0); #include "cpu.h" #include "exec-all.h" -static inline void env_to_regs(void) -{ -} - -static inline void regs_to_env(void) -{ -} - /* op_helper.c */ void do_interrupt(CPUState *env); -- 1.6.5.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 3/3] fix wrong indentation 2010-01-15 7:56 [Qemu-devel] [PATCH 0/3] cleanup cpu_exec 1/n Paolo Bonzini 2010-01-15 7:56 ` [Qemu-devel] [PATCH 1/3] remove dead code from target-i386/exec.h Paolo Bonzini 2010-01-15 7:56 ` [Qemu-devel] [PATCH 2/3] kill regs_to_env and env_to_regs Paolo Bonzini @ 2010-01-15 7:56 ` Paolo Bonzini 2 siblings, 0 replies; 7+ messages in thread From: Paolo Bonzini @ 2010-01-15 7:56 UTC (permalink / raw) To: qemu-devel Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- cpu-exec.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index a426db9..2f119a9 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -588,11 +588,9 @@ int cpu_exec(CPUState *env1) /* see if we can patch the calling TB. When the TB spans two pages, we cannot safely do a direct jump. */ - { - if (next_tb != 0 && tb->page_addr[1] == -1) { + if (next_tb != 0 && tb->page_addr[1] == -1) { tb_add_jump((TranslationBlock *)(next_tb & ~3), next_tb & 3, tb); } - } spin_unlock(&tb_lock); env->current_tb = tb; -- 1.6.5.2 ^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-01-19 22:40 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-01-15 7:56 [Qemu-devel] [PATCH 0/3] cleanup cpu_exec 1/n Paolo Bonzini 2010-01-15 7:56 ` [Qemu-devel] [PATCH 1/3] remove dead code from target-i386/exec.h Paolo Bonzini 2010-01-15 14:54 ` Tristan Gingold 2010-01-15 15:12 ` Paolo Bonzini 2010-01-19 22:39 ` Anthony Liguori 2010-01-15 7:56 ` [Qemu-devel] [PATCH 2/3] kill regs_to_env and env_to_regs Paolo Bonzini 2010-01-15 7:56 ` [Qemu-devel] [PATCH 3/3] fix wrong indentation Paolo Bonzini
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).