All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>,
	Richard Henderson <rth@twiddle.net>,
	Laurent Vivier <laurent@vivier.eu>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [Qemu-devel] [PATCH v4 4/6] target/m68k: optimize bcd_flags() using extract op
Date: Fri, 12 May 2017 20:38:41 -0300	[thread overview]
Message-ID: <20170512233843.27713-5-f4bug@amsat.org> (raw)
In-Reply-To: <20170512233843.27713-1-f4bug@amsat.org>

Patch created mechanically using Coccinelle script via:

    $ spatch --macro-file scripts/cocci-macro-file.h --in-place \
        --sp-file scripts/coccinelle/tcg_gen_extract.cocci --dir target

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Laurent Vivier <laurent@vivier.eu>
---
 target/m68k/translate.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 9f60fbc0db..babb9e2c5b 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -1463,8 +1463,7 @@ static void bcd_flags(TCGv val)
     tcg_gen_andi_i32(QREG_CC_C, val, 0x0ff);
     tcg_gen_or_i32(QREG_CC_Z, QREG_CC_Z, QREG_CC_C);
 
-    tcg_gen_shri_i32(QREG_CC_C, val, 8);
-    tcg_gen_andi_i32(QREG_CC_C, QREG_CC_C, 1);
+    tcg_gen_extract_i32(QREG_CC_C, val, 8, 1);
 
     tcg_gen_mov_i32(QREG_CC_X, QREG_CC_C);
 }
-- 
2.11.0

  parent reply	other threads:[~2017-05-12 23:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-12 23:38 [Qemu-devel] [RFC PATCH v4 0/6] optimize various tcg_gen() functions using extract op Philippe Mathieu-Daudé
2017-05-12 23:38 ` [Qemu-devel] [RFC PATCH v4 1/6] coccinelle: add a script to optimize tcg op using tcg_gen_extract() Philippe Mathieu-Daudé
2017-05-15 14:04   ` Eric Blake
2017-05-15 14:06     ` Paolo Bonzini
2017-05-15 14:10       ` Laurent Vivier
2017-05-12 23:38 ` [Qemu-devel] [PATCH v4 2/6] target/alpha: optimize cvtlq() using extract op Philippe Mathieu-Daudé
2017-05-13  0:04   ` Richard Henderson
2017-05-12 23:38 ` [Qemu-devel] [PATCH v4 3/6] target/arm: optimize rev16() " Philippe Mathieu-Daudé
2017-05-12 23:38 ` Philippe Mathieu-Daudé [this message]
2017-05-13  0:05   ` [Qemu-devel] [PATCH v4 4/6] target/m68k: optimize bcd_flags() " Richard Henderson
2017-05-12 23:38 ` [Qemu-devel] [PATCH v4 5/6] target/ppc: optimize various functions " Philippe Mathieu-Daudé
2017-05-13  0:05   ` Richard Henderson
2017-05-15  4:12   ` David Gibson
2017-05-16  0:02     ` Philippe Mathieu-Daudé
2017-05-12 23:38 ` [Qemu-devel] [PATCH v4 6/6] target/sparc: " Philippe Mathieu-Daudé
2017-05-13  0:08   ` Richard Henderson
2017-07-18  3:18     ` Philippe Mathieu-Daudé
2017-07-18  3:44       ` Richard Henderson
2017-05-13  1:16 ` [Qemu-devel] [RFC PATCH v4 0/6] optimize various tcg_gen() " Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170512233843.27713-5-f4bug@amsat.org \
    --to=f4bug@amsat.org \
    --cc=aurelien@aurel32.net \
    --cc=laurent@vivier.eu \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.