All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] target/ppc: Optimize VSX instructions using deposit_i64()
@ 2019-03-09 21:42 Philippe Mathieu-Daudé
  2019-03-09 21:42 ` [Qemu-devel] [PATCH 1/2] target/ppc: Optimize xviexpdp() " Philippe Mathieu-Daudé
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-03-09 21:42 UTC (permalink / raw)
  To: qemu-devel, Richard Henderson
  Cc: David Gibson, qemu-ppc, Mark Cave-Ayland, Philippe Mathieu-Daudé

Hi David, Richard.

I found these two patches while cleaning dangling branches on my
previous laptop... Original commits date is 2017-07-21 05:24:05...
I simply rebased them.

It doesn't have to be merged for soft freeze, but since I'm doing
housekeeping I rather send it to keep archived by the ML.

Regards,

Phil.

Philippe Mathieu-Daudé (2):
  target/ppc: Optimize xviexpdp() using deposit_i64()
  target/ppc: Optimize x[sv]xsigdp using deposit_i64()

 target/ppc/translate/vsx-impl.inc.c | 26 +++++++-------------------
 1 file changed, 7 insertions(+), 19 deletions(-)

-- 
2.19.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH 1/2] target/ppc: Optimize xviexpdp() using deposit_i64()
  2019-03-09 21:42 [Qemu-devel] [PATCH 0/2] target/ppc: Optimize VSX instructions using deposit_i64() Philippe Mathieu-Daudé
@ 2019-03-09 21:42 ` Philippe Mathieu-Daudé
  2019-03-09 21:42 ` [Qemu-devel] [PATCH 2/2] target/ppc: Optimize x[sv]xsigdp " Philippe Mathieu-Daudé
  2019-03-10  3:37 ` [Qemu-devel] [PATCH 0/2] target/ppc: Optimize VSX instructions " David Gibson
  2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-03-09 21:42 UTC (permalink / raw)
  To: qemu-devel, Richard Henderson
  Cc: David Gibson, qemu-ppc, Mark Cave-Ayland, Philippe Mathieu-Daudé

The t0 tcg_temp register is now unused, remove it.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/ppc/translate/vsx-impl.inc.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx-impl.inc.c
index e73197e717..48c58deb14 100644
--- a/target/ppc/translate/vsx-impl.inc.c
+++ b/target/ppc/translate/vsx-impl.inc.c
@@ -1726,7 +1726,6 @@ static void gen_xviexpdp(DisasContext *ctx)
     TCGv_i64 xal;
     TCGv_i64 xbh;
     TCGv_i64 xbl;
-    TCGv_i64 t0;
 
     if (unlikely(!ctx->vsx_enabled)) {
         gen_exception(ctx, POWERPC_EXCP_VSXU);
@@ -1742,20 +1741,13 @@ static void gen_xviexpdp(DisasContext *ctx)
     get_cpu_vsrl(xal, xA(ctx->opcode));
     get_cpu_vsrh(xbh, xB(ctx->opcode));
     get_cpu_vsrl(xbl, xB(ctx->opcode));
-    t0 = tcg_temp_new_i64();
 
-    tcg_gen_andi_i64(xth, xah, 0x800FFFFFFFFFFFFF);
-    tcg_gen_andi_i64(t0, xbh, 0x7FF);
-    tcg_gen_shli_i64(t0, t0, 52);
-    tcg_gen_or_i64(xth, xth, t0);
+    tcg_gen_deposit_i64(xth, xah, xbh, 52, 11);
     set_cpu_vsrh(xT(ctx->opcode), xth);
-    tcg_gen_andi_i64(xtl, xal, 0x800FFFFFFFFFFFFF);
-    tcg_gen_andi_i64(t0, xbl, 0x7FF);
-    tcg_gen_shli_i64(t0, t0, 52);
-    tcg_gen_or_i64(xtl, xtl, t0);
+
+    tcg_gen_deposit_i64(xtl, xal, xbl, 52, 11);
     set_cpu_vsrl(xT(ctx->opcode), xtl);
 
-    tcg_temp_free_i64(t0);
     tcg_temp_free_i64(xth);
     tcg_temp_free_i64(xtl);
     tcg_temp_free_i64(xah);
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Qemu-devel] [PATCH 2/2] target/ppc: Optimize x[sv]xsigdp using deposit_i64()
  2019-03-09 21:42 [Qemu-devel] [PATCH 0/2] target/ppc: Optimize VSX instructions using deposit_i64() Philippe Mathieu-Daudé
  2019-03-09 21:42 ` [Qemu-devel] [PATCH 1/2] target/ppc: Optimize xviexpdp() " Philippe Mathieu-Daudé
@ 2019-03-09 21:42 ` Philippe Mathieu-Daudé
  2019-03-10  3:37 ` [Qemu-devel] [PATCH 0/2] target/ppc: Optimize VSX instructions " David Gibson
  2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-03-09 21:42 UTC (permalink / raw)
  To: qemu-devel, Richard Henderson
  Cc: David Gibson, qemu-ppc, Mark Cave-Ayland, Philippe Mathieu-Daudé

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/ppc/translate/vsx-impl.inc.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/target/ppc/translate/vsx-impl.inc.c b/target/ppc/translate/vsx-impl.inc.c
index 48c58deb14..3203165f49 100644
--- a/target/ppc/translate/vsx-impl.inc.c
+++ b/target/ppc/translate/vsx-impl.inc.c
@@ -1618,8 +1618,7 @@ static void gen_xsxsigdp(DisasContext *ctx)
     tcg_gen_movcond_i64(TCG_COND_EQ, t0, exp, zr, zr, t0);
     tcg_gen_movcond_i64(TCG_COND_EQ, t0, exp, nan, zr, t0);
     get_cpu_vsrh(t1, xB(ctx->opcode));
-    tcg_gen_andi_i64(rt, t1, 0x000FFFFFFFFFFFFF);
-    tcg_gen_or_i64(rt, rt, t0);
+    tcg_gen_deposit_i64(rt, t0, t1, 0, 52);
 
     tcg_temp_free_i64(t0);
     tcg_temp_free_i64(t1);
@@ -1655,8 +1654,7 @@ static void gen_xsxsigqp(DisasContext *ctx)
     tcg_gen_movi_i64(t0, 0x0001000000000000);
     tcg_gen_movcond_i64(TCG_COND_EQ, t0, exp, zr, zr, t0);
     tcg_gen_movcond_i64(TCG_COND_EQ, t0, exp, nan, zr, t0);
-    tcg_gen_andi_i64(xth, xbh, 0x0000FFFFFFFFFFFF);
-    tcg_gen_or_i64(xth, xth, t0);
+    tcg_gen_deposit_i64(xth, t0, xbh, 0, 48);
     set_cpu_vsrh(rD(ctx->opcode) + 32, xth);
     tcg_gen_mov_i64(xtl, xbl);
     set_cpu_vsrl(rD(ctx->opcode) + 32, xtl);
@@ -1845,16 +1843,14 @@ static void gen_xvxsigdp(DisasContext *ctx)
     tcg_gen_movi_i64(t0, 0x0010000000000000);
     tcg_gen_movcond_i64(TCG_COND_EQ, t0, exp, zr, zr, t0);
     tcg_gen_movcond_i64(TCG_COND_EQ, t0, exp, nan, zr, t0);
-    tcg_gen_andi_i64(xth, xbh, 0x000FFFFFFFFFFFFF);
-    tcg_gen_or_i64(xth, xth, t0);
+    tcg_gen_deposit_i64(xth, t0, xbh, 0, 52);
     set_cpu_vsrh(xT(ctx->opcode), xth);
 
     tcg_gen_extract_i64(exp, xbl, 52, 11);
     tcg_gen_movi_i64(t0, 0x0010000000000000);
     tcg_gen_movcond_i64(TCG_COND_EQ, t0, exp, zr, zr, t0);
     tcg_gen_movcond_i64(TCG_COND_EQ, t0, exp, nan, zr, t0);
-    tcg_gen_andi_i64(xtl, xbl, 0x000FFFFFFFFFFFFF);
-    tcg_gen_or_i64(xtl, xtl, t0);
+    tcg_gen_deposit_i64(xth, t0, xbl, 0, 52);
     set_cpu_vsrl(xT(ctx->opcode), xtl);
 
     tcg_temp_free_i64(t0);
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] target/ppc: Optimize VSX instructions using deposit_i64()
  2019-03-09 21:42 [Qemu-devel] [PATCH 0/2] target/ppc: Optimize VSX instructions using deposit_i64() Philippe Mathieu-Daudé
  2019-03-09 21:42 ` [Qemu-devel] [PATCH 1/2] target/ppc: Optimize xviexpdp() " Philippe Mathieu-Daudé
  2019-03-09 21:42 ` [Qemu-devel] [PATCH 2/2] target/ppc: Optimize x[sv]xsigdp " Philippe Mathieu-Daudé
@ 2019-03-10  3:37 ` David Gibson
  2 siblings, 0 replies; 4+ messages in thread
From: David Gibson @ 2019-03-10  3:37 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Richard Henderson, qemu-ppc, Mark Cave-Ayland

[-- Attachment #1: Type: text/plain, Size: 927 bytes --]

On Sat, Mar 09, 2019 at 10:42:53PM +0100, Philippe Mathieu-Daudé wrote:
> Hi David, Richard.
> 
> I found these two patches while cleaning dangling branches on my
> previous laptop... Original commits date is 2017-07-21 05:24:05...
> I simply rebased them.
> 
> It doesn't have to be merged for soft freeze, but since I'm doing
> housekeeping I rather send it to keep archived by the ML.

Applied, thanks.

> 
> Regards,
> 
> Phil.
> 
> Philippe Mathieu-Daudé (2):
>   target/ppc: Optimize xviexpdp() using deposit_i64()
>   target/ppc: Optimize x[sv]xsigdp using deposit_i64()
> 
>  target/ppc/translate/vsx-impl.inc.c | 26 +++++++-------------------
>  1 file changed, 7 insertions(+), 19 deletions(-)
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-03-10  4:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-09 21:42 [Qemu-devel] [PATCH 0/2] target/ppc: Optimize VSX instructions using deposit_i64() Philippe Mathieu-Daudé
2019-03-09 21:42 ` [Qemu-devel] [PATCH 1/2] target/ppc: Optimize xviexpdp() " Philippe Mathieu-Daudé
2019-03-09 21:42 ` [Qemu-devel] [PATCH 2/2] target/ppc: Optimize x[sv]xsigdp " Philippe Mathieu-Daudé
2019-03-10  3:37 ` [Qemu-devel] [PATCH 0/2] target/ppc: Optimize VSX instructions " David Gibson

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.