From nobody Thu Oct 30 04:56:45 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; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1525197973320174.80239170468758; Tue, 1 May 2018 11:06:13 -0700 (PDT) Received: from localhost ([::1]:45540 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDZfE-0000OC-3I for importer@patchew.org; Tue, 01 May 2018 14:06:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fDZeC-0008HV-FN for qemu-devel@nongnu.org; Tue, 01 May 2018 14:05:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fDZeA-0000ZQ-15 for qemu-devel@nongnu.org; Tue, 01 May 2018 14:05:04 -0400 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:41032) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fDZe9-0000Yc-RP for qemu-devel@nongnu.org; Tue, 01 May 2018 14:05:01 -0400 Received: by mail-pg0-x243.google.com with SMTP id m21-v6so8776089pgv.8 for ; Tue, 01 May 2018 11:05:01 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-2-170.tukw.qwest.net. [97.113.2.170]) by smtp.gmail.com with ESMTPSA id j5sm23732224pfe.119.2018.05.01.11.04.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 May 2018 11:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1BZd8qt69qVsAYir59uUIsDXmGXzpo1zdM1CqHLvln0=; b=cpsbgN4wCvlh5AiaCipr8uLhp202mZDfEhwjZUhGaoMlAsCPAVWm0YkN7PHewXdNyq FsU51h0yVchr6OmWXuzzjjDE8L5GmRiFgocBWbnPiOEjJJVRtk2VvWnYNt/eQ8scU36c q6Qu2+haPioQQcjwS8BV/vn9TLTURsz4nET3E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1BZd8qt69qVsAYir59uUIsDXmGXzpo1zdM1CqHLvln0=; b=D8xQQ+Ye4HnynmYXUVhAIcLqgsqIwyVH5i77XdpQD1x183+OHzzgO43VBCI84hU1to BHno+ecXo48txBJsc8bIXJ1l7FyxNGgCMm4bAsB7YEmPD+/hqsB5uZEqpcIChddZzS8I gbUJp2dxxM5fdLDNefIB5F20AXFPlORjFRhppU3fhlwXmmFpXnvJCHQwv8f4f9qCYEzv SCczV3s8liWy5XNyfqfqbtqiAo0gNeR0l4WbmBHAN69oukFCXJt5IlNUI5Koxw7FnoQK vJXWslcysZ4IF0QgZgx1XshHa0Vd4HuUxbrdyu3AJWQewjWJminLL8VuMHgI5ZkorUBv 7xLA== X-Gm-Message-State: ALQs6tCg0F9ACPrTim+nQE1gm8/dCAdunLw5h+HQ05Nirik2hq6wVoiR R4wjefpzkBniinRQ/7IHFxwEt8/lj4c= X-Google-Smtp-Source: AB8JxZr3RDvCuB0tT6rFJ87atM5oMt7XGk9//Jp7DOufYtyl9gGxvbV7RE+19ppnz/JpPj5JB/N3qA== X-Received: by 2002:a63:8c0e:: with SMTP id m14-v6mr13896306pgd.320.1525197900555; Tue, 01 May 2018 11:05:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 1 May 2018 11:04:54 -0700 Message-Id: <20180501180455.11214-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180501180455.11214-1-richard.henderson@linaro.org> References: <20180501180455.11214-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::243 Subject: [Qemu-devel] [PATCH 1/2] target/arm: Tidy conditions in handle_vec_simd_shri 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: peter.maydell@linaro.org, qemu-arm@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 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The (size > 3 && !is_q) condition is identical to the preceeding test of bit 3 in immh; eliminate it. For the benefit of Coverity, assert that size is within the bounds we expect. Fixes: Coverity CID1385846 Fixes: Coverity CID1385849 Fixes: Coverity CID1385852 Fixes: Coverity CID1385857 Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e --- target/arm/translate-a64.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index bff4e13bf6..97950dce1a 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -9019,11 +9019,7 @@ static void handle_vec_simd_shri(DisasContext *s, bo= ol is_q, bool is_u, unallocated_encoding(s); return; } - - if (size > 3 && !is_q) { - unallocated_encoding(s); - return; - } + tcg_debug_assert(size <=3D 3); =20 if (!fp_access_check(s)) { return; --=20 2.14.3