From patchwork Fri Feb 19 16:36:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 8362751 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B8E0E9F372 for ; Fri, 19 Feb 2016 16:38:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D7A2E20524 for ; Fri, 19 Feb 2016 16:38:41 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D25CE203EC for ; Fri, 19 Feb 2016 16:38:40 +0000 (UTC) Received: from localhost ([::1]:53620 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWo4m-00011W-8Q for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Feb 2016 11:38:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWo39-0006Z1-Ry for qemu-devel@nongnu.org; Fri, 19 Feb 2016 11:37:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWo38-0003cl-D4 for qemu-devel@nongnu.org; Fri, 19 Feb 2016 11:36:59 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:38479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWo38-0003bu-4V for qemu-devel@nongnu.org; Fri, 19 Feb 2016 11:36:58 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.84) (envelope-from ) id 1aWo36-00033W-T1 for qemu-devel@nongnu.org; Fri, 19 Feb 2016 16:36:56 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Fri, 19 Feb 2016 16:36:52 +0000 Message-Id: <1455899815-5648-4-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455899815-5648-1-git-send-email-peter.maydell@linaro.org> References: <1455899815-5648-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 3/6] fpu: Use plain 'int' rather than 'int_fast16_t' for shift counts X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use the plain 'int' type rather than 'int_fast16_t' for shift counts in the various shift related functions, since we don't actually care about the size of the integer at all here, and using int16_t would be confusing. This should be a safe change because int_fast16_t semantics permit use of 'int' (and on 32-bit glibc that is what you get). Signed-off-by: Peter Maydell Reviewed-by: Aurelien Jarno Message-id: 1453807806-32698-3-git-send-email-peter.maydell@linaro.org --- fpu/softfloat-macros.h | 16 ++++++++-------- fpu/softfloat.c | 36 ++++++++++++++++++++++++------------ 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/fpu/softfloat-macros.h b/fpu/softfloat-macros.h index e95b445..51947ef 100644 --- a/fpu/softfloat-macros.h +++ b/fpu/softfloat-macros.h @@ -99,7 +99,7 @@ this code that are retained. | The result is stored in the location pointed to by `zPtr'. *----------------------------------------------------------------------------*/ -static inline void shift32RightJamming(uint32_t a, int_fast16_t count, uint32_t *zPtr) +static inline void shift32RightJamming(uint32_t a, int count, uint32_t *zPtr) { uint32_t z; @@ -125,7 +125,7 @@ static inline void shift32RightJamming(uint32_t a, int_fast16_t count, uint32_t | The result is stored in the location pointed to by `zPtr'. *----------------------------------------------------------------------------*/ -static inline void shift64RightJamming(uint64_t a, int_fast16_t count, uint64_t *zPtr) +static inline void shift64RightJamming(uint64_t a, int count, uint64_t *zPtr) { uint64_t z; @@ -161,7 +161,7 @@ static inline void shift64RightJamming(uint64_t a, int_fast16_t count, uint64_t static inline void shift64ExtraRightJamming( - uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr) + uint64_t a0, uint64_t a1, int count, uint64_t *z0Ptr, uint64_t *z1Ptr) { uint64_t z0, z1; int8_t negCount = ( - count ) & 63; @@ -198,7 +198,7 @@ static inline void static inline void shift128Right( - uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr) + uint64_t a0, uint64_t a1, int count, uint64_t *z0Ptr, uint64_t *z1Ptr) { uint64_t z0, z1; int8_t negCount = ( - count ) & 63; @@ -233,7 +233,7 @@ static inline void static inline void shift128RightJamming( - uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr) + uint64_t a0, uint64_t a1, int count, uint64_t *z0Ptr, uint64_t *z1Ptr) { uint64_t z0, z1; int8_t negCount = ( - count ) & 63; @@ -287,7 +287,7 @@ static inline void uint64_t a0, uint64_t a1, uint64_t a2, - int_fast16_t count, + int count, uint64_t *z0Ptr, uint64_t *z1Ptr, uint64_t *z2Ptr @@ -342,7 +342,7 @@ static inline void static inline void shortShift128Left( - uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr) + uint64_t a0, uint64_t a1, int count, uint64_t *z0Ptr, uint64_t *z1Ptr) { *z1Ptr = a1<