From patchwork Fri Feb 19 16:36:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 8362721 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 ECB5F9F372 for ; Fri, 19 Feb 2016 16:37:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 59A6D20524 for ; Fri, 19 Feb 2016 16:37:13 +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 6D914203EC for ; Fri, 19 Feb 2016 16:37:12 +0000 (UTC) Received: from localhost ([::1]:53606 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWo3L-0006aq-Qi for patchwork-qemu-devel@patchwork.kernel.org; Fri, 19 Feb 2016 11:37:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWo3A-0006Z4-3v for qemu-devel@nongnu.org; Fri, 19 Feb 2016 11:37:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWo38-0003dN-VN for qemu-devel@nongnu.org; Fri, 19 Feb 2016 11:37:00 -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-PO 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-00032l-17 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:50 +0000 Message-Id: <1455899815-5648-2-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 1/6] target-mips: Stop using uint_fast*_t types in r4k_tlb_t struct 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 The r4k_tlb_t structure uses the uint_fast*_t types. Most of these uses are in bitfields and are thus pointless, because the bitfield itself specifies the width of the type; just use 'unsigned int' instead. (On glibc uint_fast16_t is defined as either 32 or 64 bits, so we know the code is not reliant on it being exactly 16 bits.) There is also one use of uint_fast8_t, which we replace with uint8_t, because both are exactly 8 bits on glibc and this is the only place outside the softfloat code which uses an int_fast*_t type. Signed-off-by: Peter Maydell Reviewed-by: Aurelien Jarno --- target-mips/cpu.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/target-mips/cpu.h b/target-mips/cpu.h index 17817c3..86b6333 100644 --- a/target-mips/cpu.h +++ b/target-mips/cpu.h @@ -19,19 +19,19 @@ typedef struct r4k_tlb_t r4k_tlb_t; struct r4k_tlb_t { target_ulong VPN; uint32_t PageMask; - uint_fast8_t ASID; - uint_fast16_t G:1; - uint_fast16_t C0:3; - uint_fast16_t C1:3; - uint_fast16_t V0:1; - uint_fast16_t V1:1; - uint_fast16_t D0:1; - uint_fast16_t D1:1; - uint_fast16_t XI0:1; - uint_fast16_t XI1:1; - uint_fast16_t RI0:1; - uint_fast16_t RI1:1; - uint_fast16_t EHINV:1; + uint8_t ASID; + unsigned int G:1; + unsigned int C0:3; + unsigned int C1:3; + unsigned int V0:1; + unsigned int V1:1; + unsigned int D0:1; + unsigned int D1:1; + unsigned int XI0:1; + unsigned int XI1:1; + unsigned int RI0:1; + unsigned int RI1:1; + unsigned int EHINV:1; uint64_t PFN[2]; };