From nobody Sun Feb 8 18:52:23 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1538344409475944.8303207198477; Sun, 30 Sep 2018 14:53:29 -0700 (PDT) Received: from localhost ([::1]:57795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6jea-0001Oe-8Y for importer@patchew.org; Sun, 30 Sep 2018 17:53:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g6jaa-0006lZ-7q for qemu-devel@nongnu.org; Sun, 30 Sep 2018 17:49:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g6jZ9-0007aH-FD for qemu-devel@nongnu.org; Sun, 30 Sep 2018 17:47:52 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:44954) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g6jZ9-0007Wa-7c for qemu-devel@nongnu.org; Sun, 30 Sep 2018 17:47:51 -0400 Received: by mail-wr1-x442.google.com with SMTP id 63-v6so4403514wra.11 for ; Sun, 30 Sep 2018 14:47:51 -0700 (PDT) Received: from x1.local ([80.31.72.241]) by smtp.gmail.com with ESMTPSA id w5-v6sm6492838wmf.31.2018.09.30.14.47.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 30 Sep 2018 14:47:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hKr2UuZ4LcVOke5V9TFSKhJEYXoEWAxq47MKFj5InOo=; b=aqLbcrE0RJkHeLhs0Srwn2uJ0NLrPScr+h0HzSURxw8F2h6rEc34PvZDI3icf2+rwL do0NURV3wG6tn11mOeXHJJWbN1k3tvOO2RLgjlok7x2sRmqz9j+hszgvaB3xGqEsQN7c 5FVdSfS+Kc/b+SR6TNSQ6TP2+k6s2XSuniJgN2btY+veZenTjl8yP01cIJ/boPL1qKXi 9D92P65muW7w199JE8T/3rd0HGEjddpBVc1xOeCGItwqMfSo9K1xweH8ByoQ8lkTxYgZ 5rHu7+Vo7WnDfPdHDEzwKAKgYlCHhr9cM0kPTFvlMP63QI2dwc2NHRMe6rEDAaEadY77 jB6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=hKr2UuZ4LcVOke5V9TFSKhJEYXoEWAxq47MKFj5InOo=; b=Hsf9zk223OWUHH9hin6+pFp6Rm7jPhyOu/hhgr+S05O0ajWydN2B/BbncSE4oZhLXX a3s+2MLuT1v/xmjgUfMUyB2aexWkcSGi7vUgCgd8BUCuxKZLrBjrcoWQ7W8MxnmOk7u5 MXT9f04iyEmIAeWpGjoNWqyXVsx0WWoIY9SYnHe0jKWdUsZxpMTBjTW4ZKHQswHhfFzU zcj6nPJTpMftAXI0+Un7taSiDG2UHad/CZ2aWQldcinbUL7qp2FmZQY4220Nj7JSOdTT rEMXDT4A7igUnIaHjWCqX12U0ddwyxW+ecC6AkBZ6XXAYnv6Q/1fUtqMsgmixCF6I4Cu b74Q== X-Gm-Message-State: ABuFfoh1wChpAzPbP1MabQk3YmWD7NKID/iHNyzUK9V1SfnRBNQrkYxv YRx4HfIb+sZmh26+J6K5x+8= X-Google-Smtp-Source: ACcGV60ds3eVndXvzmD+yJbh4vZlgPwFpnH/NsSfT2PP61XL+X3iQVYO8QBh+icDgWiDO+JU3Qjvdg== X-Received: by 2002:adf:91a4:: with SMTP id 33-v6mr5063614wri.37.1538344070157; Sun, 30 Sep 2018 14:47:50 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Aurelien Jarno , Aleksandar Markovic Date: Sun, 30 Sep 2018 23:47:41 +0200 Message-Id: <20180930214744.27580-2-f4bug@amsat.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180930214744.27580-1-f4bug@amsat.org> References: <20180930214744.27580-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH v3 1/4] target/mips: Increase the 'supported instructions' flags holder size X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Currently this holder is limited to at most 32 flags on a 32-bit architecture, which lets an unique bit available for another 'chip specific instructions' flag. Relax this limit using a 64-bit integer. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Aleksandar Markovic --- target/mips/cpu.h | 2 +- target/mips/internal.h | 2 +- target/mips/translate.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 28af4d191c..f2a5031fd2 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -614,7 +614,7 @@ struct CPUMIPSState { int CCRes; /* Cycle count resolution/divisor */ uint32_t CP0_Status_rw_bitmask; /* Read/write bits in CP0_Status */ uint32_t CP0_TCStatus_rw_bitmask; /* Read/write bits in CP0_TCStatus */ - int insn_flags; /* Supported instruction set */ + uint64_t insn_flags; /* Supported instruction set */ =20 /* Fields up to this point are cleared by a CPU reset */ struct {} end_reset_fields; diff --git a/target/mips/internal.h b/target/mips/internal.h index e41051f8e6..bfe83ee613 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -59,7 +59,7 @@ struct mips_def_t { int32_t CP0_PageGrain_rw_bitmask; int32_t CP0_PageGrain; target_ulong CP0_EBaseWG_rw_bitmask; - int insn_flags; + uint64_t insn_flags; enum mips_mmu_types mmu_type; }; =20 diff --git a/target/mips/translate.c b/target/mips/translate.c index ab16cdb911..b19d91bc1f 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -1447,7 +1447,7 @@ typedef struct DisasContext { target_ulong saved_pc; target_ulong page_start; uint32_t opcode; - int insn_flags; + uint64_t insn_flags; int32_t CP0_Config1; int32_t CP0_Config3; int32_t CP0_Config5; @@ -1870,7 +1870,7 @@ static inline void check_dspr2(DisasContext *ctx) =20 /* This code generates a "reserved instruction" exception if the CPU does not support the instruction set corresponding to flags. */ -static inline void check_insn(DisasContext *ctx, int flags) +static inline void check_insn(DisasContext *ctx, uint64_t flags) { if (unlikely(!(ctx->insn_flags & flags))) { generate_exception_end(ctx, EXCP_RI); @@ -1880,7 +1880,7 @@ static inline void check_insn(DisasContext *ctx, int = flags) /* This code generates a "reserved instruction" exception if the CPU has corresponding flag set which indicates that the instruction has been removed. */ -static inline void check_insn_opc_removed(DisasContext *ctx, int flags) +static inline void check_insn_opc_removed(DisasContext *ctx, uint64_t flag= s) { if (unlikely(ctx->insn_flags & flags)) { generate_exception_end(ctx, EXCP_RI); --=20 2.19.0