From nobody Wed Nov 5 18:38:21 2025 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 1536457056600651.5904102555999; Sat, 8 Sep 2018 18:37:36 -0700 (PDT) Received: from localhost ([::1]:45729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyofP-0005aR-HH for importer@patchew.org; Sat, 08 Sep 2018 21:37:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fyod7-0004JH-NG for qemu-devel@nongnu.org; Sat, 08 Sep 2018 21:35:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fyod3-0001Kd-RY for qemu-devel@nongnu.org; Sat, 08 Sep 2018 21:35:13 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:51064) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fyod1-0001HE-Qr for qemu-devel@nongnu.org; Sat, 08 Sep 2018 21:35:09 -0400 Received: by mail-wm0-x242.google.com with SMTP id s12-v6so18069382wmc.0 for ; Sat, 08 Sep 2018 18:35:04 -0700 (PDT) Received: from x1.local (dynggepcrak-114-135-66-105.inwitelecom.net. [105.66.135.114]) by smtp.gmail.com with ESMTPSA id 144-v6sm16060464wma.19.2018.09.08.18.35.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Sep 2018 18:35:03 -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=arjxLYwMYhomcy8jXBRxzUgnu4NwIhprYjKFSN/d2NQ=; b=NE90KAnek/yuD+HYTeWogCxs9FJ2jhl+8kEzkFghc1Ch/WDZ+ve5ZQWJZRZNdSjsZ8 UFYZlj7zNR4VehqYIZ7PPKs6AVnKHOgYuF73mjno4RAZ8QaQBh6GUMmuBlUihfpBv6/A QqZ2mbZPeH9wJoUSth4EgtdvyvmmRs/VMdZG8XVycc1GfRUTQS/oki+LDGoc/JDKoQ2P FcyiyhLJ9BbANXqYCNExfs9502IHs0zwIY3okj0hJZoKEBftqFBM+Iu03cZajEgHdOIf /oebBkKdgavHR0K6+0SVgM9jS9+eXL0Tlw7Y2y+AHuDSYAcWIKCXnJBookKxt5qDS/9N bkOA== 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=arjxLYwMYhomcy8jXBRxzUgnu4NwIhprYjKFSN/d2NQ=; b=h4dWxAFVOplyyzRHLJfO4bwWZs0mCNqH0MYU/FD4oKLOLjokSDZctcKQLgUJ/QCEdf pkrXc73ulgMC+vr8ekXylWe3idUlIwdWhOubBh94mTZ796cB1yhQzgNyBQffR679xz8K NLqvIIvMbFq18aMwBEPmu8Yr2VxR5qJKCeJ9yiF8+3Nluzt7mmVIWSvRYt3vLAZFw58K CPN1CGcWzWOUquMEZdPt5KEHicDVNsZsLSMyMVAec6PPm8eMwJn95LPAbSLfZ7wCVOXP 5YvrOAsqha7mr0dcL1i217eQ8Ku1PoeihwEFsgk+fPwzrg52+gcl7bksf+XCbVCFilZY DuSA== X-Gm-Message-State: APzg51Afw5XTwodgEmBG613jZcXMGOW/qkl13DJdRBs6YRKReDo2UwUl EqCa90qCpFZzV/vgYLToKGdVihPO X-Google-Smtp-Source: ANB0VdbEtdRbQjk8RO4LK9e9nz8sVoo1TnBkn4+HqrRZHjUoHNYWhZyAkIWDIuCN+dXVV2wlGYdYBw== X-Received: by 2002:a7b:c143:: with SMTP id z3-v6mr4497626wmi.105.1536456903661; Sat, 08 Sep 2018 18:35:03 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Fredrik Noring , Aleksandar Markovic , Richard Henderson Date: Sun, 9 Sep 2018 02:34:43 +0100 Message-Id: <20180909013444.18936-2-f4bug@amsat.org> X-Mailer: git-send-email 2.19.0.rc2 In-Reply-To: <20180909013444.18936-1-f4bug@amsat.org> References: <20180909013444.18936-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:400c:c09::242 Subject: [Qemu-devel] [PATCH 1/2] 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?= , Aurelien Jarno , 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 --- target/mips/cpu.h | 2 +- target/mips/internal.h | 2 +- target/mips/translate.c | 4 ++-- 3 files changed, 4 insertions(+), 4 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..3b4e9ebae9 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -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.rc2