From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=37386 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGbof-0005T7-Gq for qemu-devel@nongnu.org; Thu, 11 Nov 2010 13:24:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGboa-0000eo-T2 for qemu-devel@nongnu.org; Thu, 11 Nov 2010 13:24:09 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:46372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGboa-0000e7-FW for qemu-devel@nongnu.org; Thu, 11 Nov 2010 13:24:04 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.69) (envelope-from ) id 1PGboZ-0007VU-0K for qemu-devel@nongnu.org; Thu, 11 Nov 2010 18:24:03 +0000 From: Peter Maydell Date: Thu, 11 Nov 2010 18:24:02 +0000 Message-Id: <1289499842-28818-9-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1289499842-28818-1-git-send-email-peter.maydell@linaro.org> References: <1289499842-28818-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH 8/8] ARM: Implement VCVT to 16 bit integer using new softfloat routines List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Use the softfloat conversion routines for conversion to 16 bit integers, because just casting to a 16 bit type truncates the value rather than saturating it at 16-bit MAXINT/MININT. Signed-off-by: Peter Maydell --- target-arm/helper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 66648d8..5fa5f40 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -2569,7 +2569,7 @@ ftype VFP_HELPER(to##name, p)(ftype x, uint32_t shift, CPUState *env) \ return ftype##_zero; \ } \ tmp = ftype##_scalbn(x, shift, &env->vfp.fp_status); \ - return vfp_ito##p((itype)ftype##_to_##sign##int32_round_to_zero(tmp, \ + return vfp_ito##p(ftype##_to_##itype##_round_to_zero(tmp, \ &env->vfp.fp_status)); \ } -- 1.7.1