All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value for Neon multiply-by-scalar
@ 2011-01-19 19:29 Peter Maydell
  2011-01-20 12:32 ` [Qemu-devel] " Christophe Lyon
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Peter Maydell @ 2011-01-19 19:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: Christophe Lyon, patches

Fix the register and part of register we get the scalar from in
the various "multiply vector by scalar" ops (VMUL by scalar
and friends).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 target-arm/translate.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target-arm/translate.c b/target-arm/translate.c
index c60cd18..0c2856a 100644
--- a/target-arm/translate.c
+++ b/target-arm/translate.c
@@ -3608,14 +3608,14 @@ static inline TCGv neon_get_scalar(int size, int reg)
 {
     TCGv tmp;
     if (size == 1) {
-        tmp = neon_load_reg(reg >> 1, reg & 1);
-    } else {
-        tmp = neon_load_reg(reg >> 2, (reg >> 1) & 1);
-        if (reg & 1) {
-            gen_neon_dup_low16(tmp);
-        } else {
+        tmp = neon_load_reg(reg & 7, reg >> 4);
+        if (reg & 8) {
             gen_neon_dup_high16(tmp);
+        } else {
+            gen_neon_dup_low16(tmp);
         }
+    } else {
+        tmp = neon_load_reg(reg & 15, reg >> 4);
     }
     return tmp;
 }
-- 
1.6.3.3

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

* [Qemu-devel] Re: [PATCH] target-arm: Fix loading of scalar value for Neon multiply-by-scalar
  2011-01-19 19:29 [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value for Neon multiply-by-scalar Peter Maydell
@ 2011-01-20 12:32 ` Christophe Lyon
  2011-01-21 13:32 ` [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value forNeon multiply-by-scalar Schildbach, Wolfgang
  2011-01-26 13:34 ` [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value for Neon multiply-by-scalar Aurelien Jarno
  2 siblings, 0 replies; 6+ messages in thread
From: Christophe Lyon @ 2011-01-20 12:32 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, patches

On 19.01.2011 20:29, Peter Maydell wrote:
> Fix the register and part of register we get the scalar from in
> the various "multiply vector by scalar" ops (VMUL by scalar
> and friends).
> 


I do confirm that with this patch, I can see many improvements in my tests.

Thanks.

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

* RE: [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value forNeon multiply-by-scalar
  2011-01-19 19:29 [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value for Neon multiply-by-scalar Peter Maydell
  2011-01-20 12:32 ` [Qemu-devel] " Christophe Lyon
@ 2011-01-21 13:32 ` Schildbach, Wolfgang
  2011-01-21 13:43   ` Peter Maydell
  2011-01-22 14:36   ` [Qemu-devel] [PATCH] target-arm: Fix loading of scalar valueforNeon multiply-by-scalar Schildbach, Wolfgang
  2011-01-26 13:34 ` [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value for Neon multiply-by-scalar Aurelien Jarno
  2 siblings, 2 replies; 6+ messages in thread
From: Schildbach, Wolfgang @ 2011-01-21 13:32 UTC (permalink / raw)
  To: Peter Maydell, qemu-devel; +Cc: Christophe Lyon, patches

> -----Original Message-----
> From: qemu-devel-bounces+wschi=dolby.com@nongnu.org 
> [mailto:qemu-devel-bounces+wschi=dolby.com@nongnu.org] On 
> Behalf Of Peter Maydell
> Sent: Wednesday, January 19, 2011 11:30 AM
> To: qemu-devel@nongnu.org
> Cc: Christophe Lyon; patches@linaro.org
> Subject: [Qemu-devel] [PATCH] target-arm: Fix loading of 
> scalar value forNeon multiply-by-scalar
> 
> Fix the register and part of register we get the scalar from 
> in the various "multiply vector by scalar" ops (VMUL by 
> scalar and friends).

FWIW, on the two test cases that I have, this patch (together with
Christophe's) does not improve behaviour (see
https://bugs.launchpad.net/bugs/702885).

Regards,
- Wolfgang

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

* Re: [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value forNeon multiply-by-scalar
  2011-01-21 13:32 ` [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value forNeon multiply-by-scalar Schildbach, Wolfgang
@ 2011-01-21 13:43   ` Peter Maydell
  2011-01-22 14:36   ` [Qemu-devel] [PATCH] target-arm: Fix loading of scalar valueforNeon multiply-by-scalar Schildbach, Wolfgang
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2011-01-21 13:43 UTC (permalink / raw)
  To: Schildbach, Wolfgang; +Cc: Christophe Lyon, qemu-devel, patches

On 21 January 2011 13:32, Schildbach, Wolfgang <WSCHI@dolby.com> wrote:
> FWIW, on the two test cases that I have, this patch (together with
> Christophe's) does not improve behaviour (see
> https://bugs.launchpad.net/bugs/702885).

Hrm. Can you attached the compiled ARM binaries to that
bug report, to save me the effort of digging out an armcc,
please?

thanks
-- PMM

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

* RE: [Qemu-devel] [PATCH] target-arm: Fix loading of scalar valueforNeon multiply-by-scalar
  2011-01-21 13:32 ` [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value forNeon multiply-by-scalar Schildbach, Wolfgang
  2011-01-21 13:43   ` Peter Maydell
@ 2011-01-22 14:36   ` Schildbach, Wolfgang
  1 sibling, 0 replies; 6+ messages in thread
From: Schildbach, Wolfgang @ 2011-01-22 14:36 UTC (permalink / raw)
  To: Schildbach, Wolfgang, Peter Maydell, qemu-devel; +Cc: Christophe Lyon, patches

> From: qemu-devel-bounces+wschi=dolby.com@nongnu.org 
> [mailto:qemu-devel-bounces+wschi=dolby.com@nongnu.org] On 
> Behalf Of Schildbach, Wolfgang
> 
> > -----Original Message-----
> > From: qemu-devel-bounces+wschi=dolby.com@nongnu.org
> > [mailto:qemu-devel-bounces+wschi=dolby.com@nongnu.org] On Behalf Of 
> > Peter Maydell
> > 
> > Fix the register and part of register we get the scalar from in the 
> > various "multiply vector by scalar" ops (VMUL by scalar and 
> friends).
> 
> FWIW, on the two test cases that I have, this patch (together with
> Christophe's) does not improve behaviour (see 
> https://bugs.launchpad.net/bugs/702885).

Duh. I had missed the greater part of Christophe's patch (I am still
having trouble with my mail client; applying patches off the list is
manual for me).

With both patches applied, indeed the bug filed on launchpad seems
fixed. On my second test case, behaviour is also much improved. Thanks
much!

- Wolfgang

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

* Re: [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value for Neon multiply-by-scalar
  2011-01-19 19:29 [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value for Neon multiply-by-scalar Peter Maydell
  2011-01-20 12:32 ` [Qemu-devel] " Christophe Lyon
  2011-01-21 13:32 ` [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value forNeon multiply-by-scalar Schildbach, Wolfgang
@ 2011-01-26 13:34 ` Aurelien Jarno
  2 siblings, 0 replies; 6+ messages in thread
From: Aurelien Jarno @ 2011-01-26 13:34 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Christophe Lyon, qemu-devel, patches

On Wed, Jan 19, 2011 at 07:29:53PM +0000, Peter Maydell wrote:
> Fix the register and part of register we get the scalar from in
> the various "multiply vector by scalar" ops (VMUL by scalar
> and friends).
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  target-arm/translate.c |   12 ++++++------
>  1 files changed, 6 insertions(+), 6 deletions(-)

Thanks, applied.

> diff --git a/target-arm/translate.c b/target-arm/translate.c
> index c60cd18..0c2856a 100644
> --- a/target-arm/translate.c
> +++ b/target-arm/translate.c
> @@ -3608,14 +3608,14 @@ static inline TCGv neon_get_scalar(int size, int reg)
>  {
>      TCGv tmp;
>      if (size == 1) {
> -        tmp = neon_load_reg(reg >> 1, reg & 1);
> -    } else {
> -        tmp = neon_load_reg(reg >> 2, (reg >> 1) & 1);
> -        if (reg & 1) {
> -            gen_neon_dup_low16(tmp);
> -        } else {
> +        tmp = neon_load_reg(reg & 7, reg >> 4);
> +        if (reg & 8) {
>              gen_neon_dup_high16(tmp);
> +        } else {
> +            gen_neon_dup_low16(tmp);
>          }
> +    } else {
> +        tmp = neon_load_reg(reg & 15, reg >> 4);
>      }
>      return tmp;
>  }
> -- 
> 1.6.3.3
> 
> 
> 

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

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

end of thread, other threads:[~2011-01-26 13:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-19 19:29 [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value for Neon multiply-by-scalar Peter Maydell
2011-01-20 12:32 ` [Qemu-devel] " Christophe Lyon
2011-01-21 13:32 ` [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value forNeon multiply-by-scalar Schildbach, Wolfgang
2011-01-21 13:43   ` Peter Maydell
2011-01-22 14:36   ` [Qemu-devel] [PATCH] target-arm: Fix loading of scalar valueforNeon multiply-by-scalar Schildbach, Wolfgang
2011-01-26 13:34 ` [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value for Neon multiply-by-scalar Aurelien Jarno

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.