From patchwork Tue Jan 4 19:39:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 77520 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 A1EB7B70FF for ; Wed, 5 Jan 2011 06:42:25 +1100 (EST) Received: from localhost ([127.0.0.1]:54495 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PaCly-0002VN-GQ for incoming@patchwork.ozlabs.org; Tue, 04 Jan 2011 14:42:22 -0500 Received: from [140.186.70.92] (port=59899 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PaCj2-0001Gh-6t for qemu-devel@nongnu.org; Tue, 04 Jan 2011 14:39:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PaCj0-0004nx-Ou for qemu-devel@nongnu.org; Tue, 04 Jan 2011 14:39:20 -0500 Received: from fmmailgate01.web.de ([217.72.192.221]:44837) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PaCiz-0004nm-Pf for qemu-devel@nongnu.org; Tue, 04 Jan 2011 14:39:18 -0500 Received: from smtp01.web.de ( [172.20.0.243]) by fmmailgate01.web.de (Postfix) with ESMTP id 27B26184C925E; Tue, 4 Jan 2011 20:39:17 +0100 (CET) Received: from [84.148.25.93] (helo=af.local) by smtp01.web.de with asmtp (WEB.DE 4.110 #2) id 1PaCiy-0005go-00; Tue, 04 Jan 2011 20:39:16 +0100 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Tue, 4 Jan 2011 20:39:11 +0100 Message-Id: <1294169951-5153-5-git-send-email-andreas.faerber@web.de> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1294169951-5153-4-git-send-email-andreas.faerber@web.de> References: <1294169951-5153-1-git-send-email-andreas.faerber@web.de> <1294169951-5153-2-git-send-email-andreas.faerber@web.de> <1294169951-5153-3-git-send-email-andreas.faerber@web.de> <1294169951-5153-4-git-send-email-andreas.faerber@web.de> MIME-Version: 1.0 X-Sender: Andreas.Faerber@web.de X-Provags-ID: V01U2FsdGVkX1+t3rxrquI+mL+LGlOIamG48Gb0mZ3hOzFul3Y7 cUXJ1kTyPYdqkGK11+PZzMVe5yTEPY8OBXo3rchBYYia1F9QWd U03CK8ByVgICcc94pCqg== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 Cc: Peter Maydell , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Nathan Froyd Subject: [Qemu-devel] [FYI v4 5/5] softfloat: Make float{32, 64}_to_uint16_round_to_zero() use uint_fast16_t 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 v3: * Split off. Use uint_fast16_t rather than uint16_t. v2: * Initial. Cc: Peter Maydell Cc: Nathan Froyd Signed-off-by: Andreas Färber --- Commit message to be improved in v5. fpu/softfloat.c | 8 ++++---- fpu/softfloat.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 192fde3..00c3e9d 100644 --- a/fpu/softfloat.c +++ b/fpu/softfloat.c @@ -5737,10 +5737,10 @@ unsigned int float32_to_uint32_round_to_zero( float32 a STATUS_PARAM ) return res; } -unsigned int float32_to_uint16_round_to_zero( float32 a STATUS_PARAM ) +uint_fast16_t float32_to_uint16_round_to_zero( float32 a STATUS_PARAM ) { int64_t v; - unsigned int res; + uint_fast16_t res; v = float32_to_int64_round_to_zero(a STATUS_VAR); if (v < 0) { @@ -5791,10 +5791,10 @@ unsigned int float64_to_uint32_round_to_zero( float64 a STATUS_PARAM ) return res; } -unsigned int float64_to_uint16_round_to_zero( float64 a STATUS_PARAM ) +uint_fast16_t float64_to_uint16_round_to_zero( float64 a STATUS_PARAM ) { int64_t v; - unsigned int res; + uint_fast16_t res; v = float64_to_int64_round_to_zero(a STATUS_VAR); if (v < 0) { diff --git a/fpu/softfloat.h b/fpu/softfloat.h index 4d5aa39..19785a8 100644 --- a/fpu/softfloat.h +++ b/fpu/softfloat.h @@ -239,7 +239,7 @@ float32 float16_to_float32( uint16_t, flag STATUS_PARAM ); | Software IEC/IEEE single-precision conversion routines. *----------------------------------------------------------------------------*/ int_fast16_t float32_to_int16_round_to_zero( float32 STATUS_PARAM ); -unsigned int float32_to_uint16_round_to_zero( float32 STATUS_PARAM ); +uint_fast16_t float32_to_uint16_round_to_zero( float32 STATUS_PARAM ); int32 float32_to_int32( float32 STATUS_PARAM ); int32 float32_to_int32_round_to_zero( float32 STATUS_PARAM ); uint32 float32_to_uint32( float32 STATUS_PARAM ); @@ -317,7 +317,7 @@ INLINE int float32_is_any_nan(float32 a) | Software IEC/IEEE double-precision conversion routines. *----------------------------------------------------------------------------*/ int_fast16_t float64_to_int16_round_to_zero( float64 STATUS_PARAM ); -unsigned int float64_to_uint16_round_to_zero( float64 STATUS_PARAM ); +uint_fast16_t float64_to_uint16_round_to_zero( float64 STATUS_PARAM ); int32 float64_to_int32( float64 STATUS_PARAM ); int32 float64_to_int32_round_to_zero( float64 STATUS_PARAM ); uint32 float64_to_uint32( float64 STATUS_PARAM );