qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-arm: When setting FPSCR.QC, don't clear other FPSCR bits
@ 2012-05-07  2:45 Matt Craighead
  2012-05-08 15:01 ` Peter Maydell
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Craighead @ 2012-05-07  2:45 UTC (permalink / raw)
  To: qemu-devel

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

This patch fixes a bug affecting a variety of Neon instructions, such as
VQADD.


Signed-off-by: Matt Craighead <mjcraighead@gmail.com>
---
 target-arm/neon_helper.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c
index 1e02d61..e0b9dbf 100644
--- a/target-arm/neon_helper.c
+++ b/target-arm/neon_helper.c
@@ -16,7 +16,7 @@
 #define SIGNBIT (uint32_t)0x80000000
 #define SIGNBIT64 ((uint64_t)1 << 63)

-#define SET_QC() env->vfp.xregs[ARM_VFP_FPSCR] = CPSR_Q
+#define SET_QC() env->vfp.xregs[ARM_VFP_FPSCR] |= CPSR_Q

 #define NEON_TYPE1(name, type) \
 typedef struct \
-- 
1.7.9.5

[-- Attachment #2: Type: text/html, Size: 852 bytes --]

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

* Re: [Qemu-devel] [PATCH] target-arm: When setting FPSCR.QC, don't clear other FPSCR bits
  2012-05-07  2:45 Matt Craighead
@ 2012-05-08 15:01 ` Peter Maydell
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2012-05-08 15:01 UTC (permalink / raw)
  To: Matt Craighead; +Cc: qemu-devel

On 7 May 2012 03:45, Matt Craighead <mjcraighead@gmail.com> wrote:
> diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c
> -#define SET_QC() env->vfp.xregs[ARM_VFP_FPSCR] = CPSR_Q
> +#define SET_QC() env->vfp.xregs[ARM_VFP_FPSCR] |= CPSR_Q

Bug reproduced, fix confirmed,
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

This bug has actually been in the code since 2008...
As a trivial and obvious patch I think I'll put it into a pullreq
for 1.1.

-- PMM

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

* [Qemu-devel] [PULL for-1.1] target-arm queue
@ 2012-05-08 15:08 Peter Maydell
  2012-05-08 15:08 ` [Qemu-devel] [PATCH] target-arm: When setting FPSCR.QC, don't clear other FPSCR bits Peter Maydell
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2012-05-08 15:08 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel, Anthony Liguori, Paul Brook

This is a pullreq for a single target-arm patch which I think worth
putting into 1.1. The bug has been in qemu for some time but it is
a trivial and obvious one-line fix. Please pull.

thanks
-- PMM

The following changes since commit 847c25d01cbe8e4fe457a7426f82daaaf3287aae:

  hw/ac97: Mask out the EAPD bit on Powerdown Ctrl/Stat writes (2012-05-07 16:31:40 +0400)

are available in the git repository at:
  git://git.linaro.org/people/pmaydell/qemu-arm.git target-arm.for-upstream

Matt Craighead (1):
      target-arm: When setting FPSCR.QC, don't clear other FPSCR bits

 target-arm/neon_helper.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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

* [Qemu-devel] [PATCH] target-arm: When setting FPSCR.QC, don't clear other FPSCR bits
  2012-05-08 15:08 [Qemu-devel] [PULL for-1.1] target-arm queue Peter Maydell
@ 2012-05-08 15:08 ` Peter Maydell
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2012-05-08 15:08 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel, Anthony Liguori, Paul Brook

From: Matt Craighead <mjcraighead@gmail.com>

This patch fixes a bug affecting a variety of Neon instructions, such as
VQADD.

Signed-off-by: Matt Craighead <mjcraighead@gmail.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 target-arm/neon_helper.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c
index 1e02d61..e0b9dbf 100644
--- a/target-arm/neon_helper.c
+++ b/target-arm/neon_helper.c
@@ -16,7 +16,7 @@
 #define SIGNBIT (uint32_t)0x80000000
 #define SIGNBIT64 ((uint64_t)1 << 63)
 
-#define SET_QC() env->vfp.xregs[ARM_VFP_FPSCR] = CPSR_Q
+#define SET_QC() env->vfp.xregs[ARM_VFP_FPSCR] |= CPSR_Q
 
 #define NEON_TYPE1(name, type) \
 typedef struct \
-- 
1.7.1

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

end of thread, other threads:[~2012-05-08 15:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-08 15:08 [Qemu-devel] [PULL for-1.1] target-arm queue Peter Maydell
2012-05-08 15:08 ` [Qemu-devel] [PATCH] target-arm: When setting FPSCR.QC, don't clear other FPSCR bits Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2012-05-07  2:45 Matt Craighead
2012-05-08 15:01 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).