target-arm: Fix loading of scalar value for Neon multiply-by-scalar
PATCH 1/1 target-arm: Fix loading of scalar value for Neon 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).
--- target-arm/translate.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
target-arm/translate.c +6 -6
@@ -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; }
Signature · 1 line
1.6.3.3
Quoted 4 lines · 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).
I do confirm that with this patch, I can see many improvements in my tests.
Thanks.
RE: [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value forNeon multiply-by-scalar
In reply to Peter MaydellQuoted 10 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Peter Maydell
Sent: Wednesday, January 19, 2011 11:30 AM
To: [email protected]
Cc: Christophe Lyon; [email protected]
Subject: [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value forNeon multiply-by-scalar
Quoted 3 lines
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
Re: [Qemu-devel] [PATCH] target-arm: Fix loading of scalar value forNeon multiply-by-scalar
Quoted 3 lines · Wolfgang
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
RE: [Qemu-devel] [PATCH] target-arm: Fix loading of scalar valueforNeon multiply-by-scalar
In reply to Schildbach, WolfgangQuoted 9 lines
From: [email protected] [mailto:[email protected]] On Behalf Of Schildbach, Wolfgang
Quoted 5 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Peter Maydell
Quoted 7 lines
Quoted 2 lines
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
Aurelien Jarno
AppliedQuoted 8 lines · 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).
Signed-off-by Peter Maydell <[email protected]>--- target-arm/translate.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
Thanks, applied.
Quoted 30 lines
target-arm/translate.c +6
-6@@ -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; }Signature · 1 line
1.6.3.3
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net