From patchwork Thu Feb 10 13:59:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 82607 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 289E3B710C for ; Fri, 11 Feb 2011 01:03:26 +1100 (EST) Received: from localhost ([127.0.0.1]:57340 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PnX7F-0000mW-Oy for incoming@patchwork.ozlabs.org; Thu, 10 Feb 2011 09:03:25 -0500 Received: from [140.186.70.92] (port=36130 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PnX3p-0007aI-9P for qemu-devel@nongnu.org; Thu, 10 Feb 2011 08:59:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PnX3g-0007db-H3 for qemu-devel@nongnu.org; Thu, 10 Feb 2011 08:59:47 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:29721) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PnX3g-0007bL-6X for qemu-devel@nongnu.org; Thu, 10 Feb 2011 08:59:44 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.69) (envelope-from ) id 1PnX3X-0002zL-Us; Thu, 10 Feb 2011 13:59:35 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 10 Feb 2011 13:59:35 +0000 Message-Id: <1297346375-11461-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1297346375-11461-1-git-send-email-peter.maydell@linaro.org> References: <1297346375-11461-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: patches@linaro.org Subject: [Qemu-devel] [PATCH 2/2] linux-user/arm: fix compilation failures using softfloat's struct types X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- linux-user/arm/nwfpe/fpa11_cpdt.c | 2 +- linux-user/arm/nwfpe/fpopcode.c | 32 ++++++++++++++++---------------- linux-user/signal.c | 4 ++-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/linux-user/arm/nwfpe/fpa11_cpdt.c b/linux-user/arm/nwfpe/fpa11_cpdt.c index 1346fd6..b12e27d 100644 --- a/linux-user/arm/nwfpe/fpa11_cpdt.c +++ b/linux-user/arm/nwfpe/fpa11_cpdt.c @@ -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 diff --git a/linux-user/arm/nwfpe/fpopcode.c b/linux-user/arm/nwfpe/fpopcode.c index 240061d..82ac92f 100644 --- a/linux-user/arm/nwfpe/fpopcode.c +++ b/linux-user/arm/nwfpe/fpopcode.c @@ -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) diff --git a/linux-user/signal.c b/linux-user/signal.c index b01bd64..ce033e9 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -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);