]> git.proxmox.com Git - qemu.git/commitdiff
linux-user/arm: fix compilation failures using softfloat's struct types
authorPeter Maydell <peter.maydell@linaro.org>
Thu, 10 Feb 2011 13:59:35 +0000 (13:59 +0000)
committerAurelien Jarno <aurelien@aurel32.net>
Thu, 10 Feb 2011 19:18:36 +0000 (20:18 +0100)
Add uses of the float32/float64 boxing and unboxing macros so that
the ARM linux-user targets will compile with USE_SOFTFLOAT_STRUCT_TYPES
enabled.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
linux-user/arm/nwfpe/fpa11_cpdt.c
linux-user/arm/nwfpe/fpopcode.c
linux-user/signal.c

index 1346fd619d86cf23fb2fd9c8f67a15bb4e311cff..b12e27dcb07608c98b7c6991d49c173612af2d72 100644 (file)
@@ -33,7 +33,7 @@ void loadSingle(const unsigned int Fn, target_ulong addr)
    FPA11 *fpa11 = GET_FPA11();
    fpa11->fType[Fn] = typeSingle;
    /* FIXME - handle failure of get_user() */
-   get_user_u32(fpa11->fpreg[Fn].fSingle, addr);
+   get_user_u32(float32_val(fpa11->fpreg[Fn].fSingle), addr);
 }
 
 static inline
index 240061dd618dcb94c942ccc26ad2b5a957d8d682..82ac92f0ceaedadf190a7367c0e4fd92c11b0d44 100644 (file)
@@ -37,25 +37,25 @@ const floatx80 floatx80Constant[] = {
 };
 
 const float64 float64Constant[] = {
-  0x0000000000000000ULL,               /* double 0.0 */
-  0x3ff0000000000000ULL,               /* double 1.0 */
-  0x4000000000000000ULL,               /* double 2.0 */
-  0x4008000000000000ULL,               /* double 3.0 */
-  0x4010000000000000ULL,               /* double 4.0 */
-  0x4014000000000000ULL,               /* double 5.0 */
-  0x3fe0000000000000ULL,               /* double 0.5 */
-  0x4024000000000000ULL                        /* double 10.0 */
+  const_float64(0x0000000000000000ULL),                /* double 0.0 */
+  const_float64(0x3ff0000000000000ULL),                /* double 1.0 */
+  const_float64(0x4000000000000000ULL),                /* double 2.0 */
+  const_float64(0x4008000000000000ULL),                /* double 3.0 */
+  const_float64(0x4010000000000000ULL),                /* double 4.0 */
+  const_float64(0x4014000000000000ULL),                /* double 5.0 */
+  const_float64(0x3fe0000000000000ULL),                /* double 0.5 */
+  const_float64(0x4024000000000000ULL)                 /* double 10.0 */
 };
 
 const float32 float32Constant[] = {
-  0x00000000,                          /* single 0.0 */
-  0x3f800000,                          /* single 1.0 */
-  0x40000000,                          /* single 2.0 */
-  0x40400000,                          /* single 3.0 */
-  0x40800000,                          /* single 4.0 */
-  0x40a00000,                          /* single 5.0 */
-  0x3f000000,                          /* single 0.5 */
-  0x41200000                           /* single 10.0 */
+  const_float32(0x00000000),                           /* single 0.0 */
+  const_float32(0x3f800000),                           /* single 1.0 */
+  const_float32(0x40000000),                           /* single 2.0 */
+  const_float32(0x40400000),                           /* single 3.0 */
+  const_float32(0x40800000),                           /* single 4.0 */
+  const_float32(0x40a00000),                           /* single 5.0 */
+  const_float32(0x3f000000),                           /* single 0.5 */
+  const_float32(0x41200000)                            /* single 10.0 */
 };
 
 unsigned int getRegisterCount(const unsigned int opcode)
index b01bd6401176392d3d580fde5c893a225b7886c1..ce033e90b4281cba1aa79f05c6cc3eee3579015c 100644 (file)
@@ -1299,7 +1299,7 @@ static abi_ulong *setup_sigframe_v2_vfp(abi_ulong *regspace, CPUState *env)
     __put_user(TARGET_VFP_MAGIC, &vfpframe->magic);
     __put_user(sizeof(*vfpframe), &vfpframe->size);
     for (i = 0; i < 32; i++) {
-        __put_user(env->vfp.regs[i], &vfpframe->ufp.fpregs[i]);
+        __put_user(float64_val(env->vfp.regs[i]), &vfpframe->ufp.fpregs[i]);
     }
     __put_user(vfp_get_fpscr(env), &vfpframe->ufp.fpscr);
     __put_user(env->vfp.xregs[ARM_VFP_FPEXC], &vfpframe->ufp_exc.fpexc);
@@ -1588,7 +1588,7 @@ static abi_ulong *restore_sigframe_v2_vfp(CPUState *env, abi_ulong *regspace)
         return 0;
     }
     for (i = 0; i < 32; i++) {
-        __get_user(env->vfp.regs[i], &vfpframe->ufp.fpregs[i]);
+        __get_user(float64_val(env->vfp.regs[i]), &vfpframe->ufp.fpregs[i]);
     }
     __get_user(fpscr, &vfpframe->ufp.fpscr);
     vfp_set_fpscr(env, fpscr);