Patchwork tcg-i386: use LEA for 3-operand 64-bit addition

login
register
mail settings
Submitter Richard Henderson
Date Jan. 11, 2013, 11:05 p.m.
Message ID <1357945506-25715-1-git-send-email-rth@twiddle.net>
Download mbox | patch
Permalink /patch/211448/
State New
Headers show

Comments

Richard Henderson - Jan. 11, 2013, 11:05 p.m.
From: Paolo Bonzini <pbonzini@redhat.com>

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 tcg/i386/tcg-target.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Blue Swirl - Jan. 12, 2013, 4:10 p.m.
Thanks, applied.

On Fri, Jan 11, 2013 at 11:05 PM, Richard Henderson <rth@twiddle.net> wrote:
> From: Paolo Bonzini <pbonzini@redhat.com>
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> ---
>  tcg/i386/tcg-target.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
> index e083874..7aec304 100644
> --- a/tcg/i386/tcg-target.c
> +++ b/tcg/i386/tcg-target.c
> @@ -2099,7 +2099,7 @@ static const TCGTargetOpDef x86_op_defs[] = {
>      { INDEX_op_st32_i64, { "ri", "r" } },
>      { INDEX_op_st_i64, { "re", "r" } },
>
> -    { INDEX_op_add_i64, { "r", "0", "re" } },
> +    { INDEX_op_add_i64, { "r", "r", "re" } },
>      { INDEX_op_mul_i64, { "r", "0", "re" } },
>      { INDEX_op_div2_i64, { "a", "d", "0", "1", "r" } },
>      { INDEX_op_divu2_i64, { "a", "d", "0", "1", "r" } },
> --
> 1.7.11.7
>
>

Patch

diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
index e083874..7aec304 100644
--- a/tcg/i386/tcg-target.c
+++ b/tcg/i386/tcg-target.c
@@ -2099,7 +2099,7 @@  static const TCGTargetOpDef x86_op_defs[] = {
     { INDEX_op_st32_i64, { "ri", "r" } },
     { INDEX_op_st_i64, { "re", "r" } },
 
-    { INDEX_op_add_i64, { "r", "0", "re" } },
+    { INDEX_op_add_i64, { "r", "r", "re" } },
     { INDEX_op_mul_i64, { "r", "0", "re" } },
     { INDEX_op_div2_i64, { "a", "d", "0", "1", "r" } },
     { INDEX_op_divu2_i64, { "a", "d", "0", "1", "r" } },