From nobody Mon May 6 13:54:56 2024 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.zoho.com; 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 1486065428300633.6420298557526; Thu, 2 Feb 2017 11:57:08 -0800 (PST) Received: from localhost ([::1]:58677 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZNVA-0005KY-Eu for importer@patchew.org; Thu, 02 Feb 2017 14:57:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cZNUI-0004ie-Gn for qemu-devel@nongnu.org; Thu, 02 Feb 2017 14:56:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cZNUF-00065i-DL for qemu-devel@nongnu.org; Thu, 02 Feb 2017 14:56:10 -0500 Received: from mail.weilnetz.de ([37.120.169.71]:49448 helo=v2201612906741603.powersrv.de) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cZNUF-000645-6T; Thu, 02 Feb 2017 14:56:07 -0500 Received: from localhost (localhost [127.0.0.1]) by v2201612906741603.powersrv.de (Postfix) with ESMTP id A5EE4DA0D55; Thu, 2 Feb 2017 20:56:04 +0100 (CET) Received: from v2201612906741603.powersrv.de ([127.0.0.1]) by localhost (mail.powersrv.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8kSEbfiChEc8; Thu, 2 Feb 2017 20:56:03 +0100 (CET) Received: from qemu.weilnetz.de (qemu.weilnetz.de [188.68.58.204]) by v2201612906741603.powersrv.de (Postfix) with ESMTP id 2C74DDA03B7; Thu, 2 Feb 2017 20:56:03 +0100 (CET) Received: by qemu.weilnetz.de (Postfix, from userid 1000) id 20D81460018; Thu, 2 Feb 2017 20:56:03 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at v2201612906741603.powersrv.de From: Stefan Weil To: Richard Henderson Date: Thu, 2 Feb 2017 20:56:01 +0100 Message-Id: <20170202195601.11286-1-sw@weilnetz.de> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 37.120.169.71 Subject: [Qemu-devel] [PATCH] tci: Remove invalid assertions 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: qemu-trivial@nongnu.org, Peter Maydell , qemu-devel@nongnu.org, Stefan Weil Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" tb_jmp_insn_offset and tb_jmp_reset_offset are pointers and cannot be used with ARRAY_SIZE. Signed-off-by: Stefan Weil Acked-by: Michael S. Tsirkin --- tcg/tci/tcg-target.inc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tcg/tci/tcg-target.inc.c b/tcg/tci/tcg-target.inc.c index 26ee9b1664..b6a15569f8 100644 --- a/tcg/tci/tcg-target.inc.c +++ b/tcg/tci/tcg-target.inc.c @@ -566,7 +566,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, co= nst TCGArg *args, case INDEX_op_goto_tb: if (s->tb_jmp_insn_offset) { /* Direct jump method. */ - tcg_debug_assert(args[0] < ARRAY_SIZE(s->tb_jmp_insn_offset)); /* Align for atomic patching and thread safety */ s->code_ptr =3D QEMU_ALIGN_PTR_UP(s->code_ptr, 4); s->tb_jmp_insn_offset[args[0]] =3D tcg_current_code_size(s); @@ -575,7 +574,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, co= nst TCGArg *args, /* Indirect jump method. */ TODO(); } - tcg_debug_assert(args[0] < ARRAY_SIZE(s->tb_jmp_reset_offset)); s->tb_jmp_reset_offset[args[0]] =3D tcg_current_code_size(s); break; case INDEX_op_br: --=20 2.11.0