qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] tcg: optimize gen_extr_i64_i32()


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH] tcg: optimize gen_extr_i64_i32()
Date: Tue, 30 May 2017 12:01:37 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 05/12/2017 11:13 PM, Richard Henderson wrote:
On 05/12/2017 05:29 PM, Philippe Mathieu-Daudé wrote:
Inspired by Richard Henderson comment:


http://lists.nongnu.org/archive/html/qemu-devel/2017-05/msg02277.html

Patch applied mechanically with this coccinelle semantic patch:

     @@
     expression lo, hi,arg;
     @@
     -tcg_gen_extrl_i64_i32(lo, arg);
     -tcg_gen_extrh_i64_i32(hi, arg);
     +tcg_gen_extr_i64_i32(lo, hi, arg);

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
  tcg/tcg-op.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tcg/tcg-op.c b/tcg/tcg-op.c
index 6b1f41500c..f3d556c21a 100644
--- a/tcg/tcg-op.c
+++ b/tcg/tcg-op.c
@@ -2562,8 +2562,7 @@ void tcg_gen_extr_i64_i32(TCGv_i32 lo, TCGv_i32
hi, TCGv_i64 arg)
          tcg_gen_mov_i32(lo, TCGV_LOW(arg));
          tcg_gen_mov_i32(hi, TCGV_HIGH(arg));
      } else {
-        tcg_gen_extrl_i64_i32(lo, arg);
-        tcg_gen_extrh_i64_i32(hi, arg);
+        tcg_gen_extr_i64_i32(lo, hi, arg);

You've just created an instance of infinite self-recursion.

Now I understand why Eric writes "applied mechanically" then "verified manually" in his commits, it avoid to ask for non-sens review...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]