Patchwork [1/3] remove dead code from target-i386/exec.h

login
register
mail settings
Submitter Paolo Bonzini
Date Jan. 15, 2010, 7:56 a.m.
Message ID <1263542196-12842-2-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/42956/
State New
Headers show

Comments

Paolo Bonzini - Jan. 15, 2010, 7:56 a.m.
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(-)
Tristan Gingold - Jan. 15, 2010, 2:54 p.m.
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 ?
Paolo Bonzini - Jan. 15, 2010, 3:12 p.m.
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
Anthony Liguori - Jan. 19, 2010, 10:39 p.m.
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)
>

Patch

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)