qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 1.1 0/2] target-arm queue
@ 2012-05-10 13:00 Peter Maydell
  2012-05-10 13:00 ` [Qemu-devel] [PATCH 1/2] target-arm: When setting FPSCR.QC, don't clear other FPSCR bits Peter Maydell
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Peter Maydell @ 2012-05-10 13:00 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel, Anthony Liguori, Paul Brook

Another pullreq for 1.1 -- this is an update of the previous
one to add the patch fixing the "-cpu foo" segfault. Please
pull in time for 1.1-rc2 :-)

thanks
-- PMM

The following changes since commit 9f34841a812dc622f8de98bc6141925c22f0ee93:

  Update version for 1.1.0-rc0 release (2012-05-09 16:39:57 -0500)

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

Peter Maydell (1):
      target-arm/cpu.h: Make cpu_init("nonexistent cpu") return NULL

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

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

* [Qemu-devel] [PATCH 1/2] target-arm: When setting FPSCR.QC, don't clear other FPSCR bits
  2012-05-10 13:00 [Qemu-devel] [PULL 1.1 0/2] target-arm queue Peter Maydell
@ 2012-05-10 13:00 ` Peter Maydell
  2012-05-10 13:00 ` [Qemu-devel] [PATCH 2/2] target-arm/cpu.h: Make cpu_init("nonexistent cpu") return NULL Peter Maydell
  2012-05-12  9:53 ` [Qemu-devel] [PULL 1.1 0/2] target-arm queue Blue Swirl
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2012-05-10 13:00 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

* [Qemu-devel] [PATCH 2/2] target-arm/cpu.h: Make cpu_init("nonexistent cpu") return NULL
  2012-05-10 13:00 [Qemu-devel] [PULL 1.1 0/2] target-arm queue Peter Maydell
  2012-05-10 13:00 ` [Qemu-devel] [PATCH 1/2] target-arm: When setting FPSCR.QC, don't clear other FPSCR bits Peter Maydell
@ 2012-05-10 13:00 ` Peter Maydell
  2012-05-12  9:53 ` [Qemu-devel] [PULL 1.1 0/2] target-arm queue Blue Swirl
  2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2012-05-10 13:00 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel, Anthony Liguori, Paul Brook

The macro definition of cpu_init meant that if cpu_arm_init()
returned NULL this wouldn't result in cpu_init() itself returning
NULL. This had the effect that "-cpu foo" for some unknown CPU
name 'foo' would cause ARM targets to segfault rather than
generating a useful error message. Fix this by making cpu_init
a simple inline function.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Andreas Färber <afaerber@suse.de>
---
 target-arm/cpu.h |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/target-arm/cpu.h b/target-arm/cpu.h
index 5eac070..d01285f 100644
--- a/target-arm/cpu.h
+++ b/target-arm/cpu.h
@@ -458,7 +458,15 @@ void cpu_arm_set_cp_io(CPUARMState *env, int cpnum,
 #define TARGET_PHYS_ADDR_SPACE_BITS 32
 #define TARGET_VIRT_ADDR_SPACE_BITS 32
 
-#define cpu_init(model) (&cpu_arm_init(model)->env)
+static inline CPUARMState *cpu_init(const char *cpu_model)
+{
+    ARMCPU *cpu = cpu_arm_init(cpu_model);
+    if (cpu) {
+        return &cpu->env;
+    }
+    return NULL;
+}
+
 #define cpu_exec cpu_arm_exec
 #define cpu_gen_code cpu_arm_gen_code
 #define cpu_signal_handler cpu_arm_signal_handler
-- 
1.7.1

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

* Re: [Qemu-devel] [PULL 1.1 0/2] target-arm queue
  2012-05-10 13:00 [Qemu-devel] [PULL 1.1 0/2] target-arm queue Peter Maydell
  2012-05-10 13:00 ` [Qemu-devel] [PATCH 1/2] target-arm: When setting FPSCR.QC, don't clear other FPSCR bits Peter Maydell
  2012-05-10 13:00 ` [Qemu-devel] [PATCH 2/2] target-arm/cpu.h: Make cpu_init("nonexistent cpu") return NULL Peter Maydell
@ 2012-05-12  9:53 ` Blue Swirl
  2 siblings, 0 replies; 4+ messages in thread
From: Blue Swirl @ 2012-05-12  9:53 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, Anthony Liguori, Paul Brook

On Thu, May 10, 2012 at 1:00 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> Another pullreq for 1.1 -- this is an update of the previous
> one to add the patch fixing the "-cpu foo" segfault. Please
> pull in time for 1.1-rc2 :-)

Thanks, pulled.

>
> thanks
> -- PMM
>
> The following changes since commit 9f34841a812dc622f8de98bc6141925c22f0ee93:
>
>  Update version for 1.1.0-rc0 release (2012-05-09 16:39:57 -0500)
>
> 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
>
> Peter Maydell (1):
>      target-arm/cpu.h: Make cpu_init("nonexistent cpu") return NULL
>
>  target-arm/cpu.h         |   10 +++++++++-
>  target-arm/neon_helper.c |    2 +-
>  2 files changed, 10 insertions(+), 2 deletions(-)

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

end of thread, other threads:[~2012-05-12  9:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-10 13:00 [Qemu-devel] [PULL 1.1 0/2] target-arm queue Peter Maydell
2012-05-10 13:00 ` [Qemu-devel] [PATCH 1/2] target-arm: When setting FPSCR.QC, don't clear other FPSCR bits Peter Maydell
2012-05-10 13:00 ` [Qemu-devel] [PATCH 2/2] target-arm/cpu.h: Make cpu_init("nonexistent cpu") return NULL Peter Maydell
2012-05-12  9:53 ` [Qemu-devel] [PULL 1.1 0/2] target-arm queue Blue Swirl

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).