[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 3/6] target/arm: optimize rev16() using extract o
From: |
Philippe Mathieu-Daudé |
Subject: |
[Qemu-devel] [PATCH v4 3/6] target/arm: optimize rev16() using extract op |
Date: |
Fri, 12 May 2017 20:38:40 -0300 |
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é <address@hidden>
---
target/arm/translate-a64.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c
index 24de30d92c..759b2466ef 100644
--- a/target/arm/translate-a64.c
+++ b/target/arm/translate-a64.c
@@ -4038,14 +4038,12 @@ static void handle_rev16(DisasContext *s, unsigned int
sf,
tcg_gen_andi_i64(tcg_tmp, tcg_rn, 0xffff);
tcg_gen_bswap16_i64(tcg_rd, tcg_tmp);
- tcg_gen_shri_i64(tcg_tmp, tcg_rn, 16);
- tcg_gen_andi_i64(tcg_tmp, tcg_tmp, 0xffff);
+ tcg_gen_extract_i64(tcg_tmp, tcg_rn, 16, 16);
tcg_gen_bswap16_i64(tcg_tmp, tcg_tmp);
tcg_gen_deposit_i64(tcg_rd, tcg_rd, tcg_tmp, 16, 16);
if (sf) {
- tcg_gen_shri_i64(tcg_tmp, tcg_rn, 32);
- tcg_gen_andi_i64(tcg_tmp, tcg_tmp, 0xffff);
+ tcg_gen_extract_i64(tcg_tmp, tcg_rn, 32, 16);
tcg_gen_bswap16_i64(tcg_tmp, tcg_tmp);
tcg_gen_deposit_i64(tcg_rd, tcg_rd, tcg_tmp, 32, 16);
--
2.11.0
- [Qemu-devel] [RFC PATCH v4 0/6] optimize various tcg_gen() functions using extract op, Philippe Mathieu-Daudé, 2017/05/12
- [Qemu-devel] [PATCH v4 2/6] target/alpha: optimize cvtlq() using extract op, Philippe Mathieu-Daudé, 2017/05/12
- [Qemu-devel] [PATCH v4 3/6] target/arm: optimize rev16() using extract op,
Philippe Mathieu-Daudé <=
- [Qemu-devel] [PATCH v4 4/6] target/m68k: optimize bcd_flags() using extract op, Philippe Mathieu-Daudé, 2017/05/12
- [Qemu-devel] [PATCH v4 5/6] target/ppc: optimize various functions using extract op, Philippe Mathieu-Daudé, 2017/05/12
- [Qemu-devel] [PATCH v4 6/6] target/sparc: optimize various functions using extract op, Philippe Mathieu-Daudé, 2017/05/12
- Re: [Qemu-devel] [RFC PATCH v4 0/6] optimize various tcg_gen() functions using extract op, Julia Lawall, 2017/05/12