aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-05-10 08:30:55 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2012-05-10 08:30:55 -0500
commit2e1201d09bd28d825bcc962b2cf7a99b9583475e (patch)
treec4a37d23cca83e9b7a0837f9b9a4fd89d9b65f8b
parentb3d6ca770dd916bceaa7a421252734f86dc07e38 (diff)
parentad37ad5b25592d2829989111b8386b8007ea0d83 (diff)
Merge remote-tracking branch 'pmaydell/target-arm.for-upstream' into staging
* pmaydell/target-arm.for-upstream: target-arm/cpu.h: Make cpu_init("nonexistent cpu") return NULL target-arm: When setting FPSCR.QC, don't clear other FPSCR bits
-rw-r--r--target-arm/cpu.h10
-rw-r--r--target-arm/neon_helper.c2
2 files changed, 10 insertions, 2 deletions
diff --git a/target-arm/cpu.h b/target-arm/cpu.h
index 5eac070379..d01285fd57 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
diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c
index 1e02d61bdc..e0b9dbf67e 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 \