From nobody Mon Apr 29 13:46:51 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.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 (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1532059503860683.974773561101; Thu, 19 Jul 2018 21:05:03 -0700 (PDT) Received: from localhost ([::1]:46317 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgMez-00082s-30 for importer@patchew.org; Fri, 20 Jul 2018 00:04:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fgMe3-0007Zl-Av for qemu-devel@nongnu.org; Fri, 20 Jul 2018 00:03:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fgMe0-0000jn-IR for qemu-devel@nongnu.org; Fri, 20 Jul 2018 00:03:55 -0400 Received: from mail-pl0-x242.google.com ([2607:f8b0:400e:c01::242]:45967) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fgMe0-0000jc-CH for qemu-devel@nongnu.org; Fri, 20 Jul 2018 00:03:52 -0400 Received: by mail-pl0-x242.google.com with SMTP id 94-v6so4573334ple.12 for ; Thu, 19 Jul 2018 21:03:52 -0700 (PDT) Received: from cloudburst.twiddle.net (97-126-112-211.tukw.qwest.net. [97.126.112.211]) by smtp.gmail.com with ESMTPSA id o72-v6sm817207pfk.76.2018.07.19.21.03.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Jul 2018 21:03:50 -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 :mime-version:content-transfer-encoding; bh=ak6IjW4JoXOeiJGxXFuL3yGrkDDk8uX/xvPt4+jYCfY=; b=Bv1koYjYZkqAvlaCTCTQdgR3A31GHyRPcvg0p5KaBKMHKeH6y53tq8ap6FrmBX5LfY 8qKOig37BLlNC+4/mle2OQ9Yqg0Mu/H6VsR96TIKn8xme/VbHOdpCSu4zZWxAUR17Pl+ 9Hy9+7aQjydZmdecwJweQp7arVjA6CnjVzAhI= 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:mime-version:content-transfer-encoding; bh=ak6IjW4JoXOeiJGxXFuL3yGrkDDk8uX/xvPt4+jYCfY=; b=BP+BKePII5Vswx5tAXWfNnZB/YClNbDNHY+9/LMNo3TKUbKk+ZXB4Or6k5rxZp/eD/ S89V4fHxc71/EjdNkMA43cu1bF+dEX8aXZ9NFD08zLACwD7Sr8auovJzNnn1+W0Qwz3D JShWDVZpLCW5sGy+7Rv5IyrQLboZ523UtXt/59Xa072uMtiJI/XB6D+8uGnNpVTBNTP7 55ZCg64j2tnY1zb9YDUOq4YaHALVwmV4N740OJP+sPnsKxTnhxnC2ov7RF3+gnO6WQGZ yf5efNiUXbKCmbY8ODE9hQyOXejuiEhj3uXJpttSP1LNnYZaUiEYXQc3zjJ+R/YMazVe Cp4g== X-Gm-Message-State: AOUpUlFMxaG/7wOpvsJfJgCmbwlJoUebVZFpl7FoP3dqt5Mynku7RBGq WFrpPPurYMh8Nf+SB9tdF+plMKVa3WI= X-Google-Smtp-Source: AAOMgpcTMYvJMheAQKVanWqwxZqd4gX0qXDZ4UHjJo2bXbY7jun8GkfIzQT4C++Bso3odJIJGkzXNQ== X-Received: by 2002:a17:902:28aa:: with SMTP id f39-v6mr500894plb.150.1532059431140; Thu, 19 Jul 2018 21:03:51 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 19 Jul 2018 21:03:37 -0700 Message-Id: <20180720040337.21426-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180720040337.21426-1-richard.henderson@linaro.org> References: <20180720040337.21426-1-richard.henderson@linaro.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: 2607:f8b0:400e:c01::242 Subject: [Qemu-devel] [PULL for-3.0 1/1] tcg/aarch64: limit mul_vec 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: peter.maydell@linaro.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= 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 From: Alex Benn=C3=A9e In AdvSIMD we can only do 32x32 integer multiples although SVE is capable of larger 64 bit multiples. As a result we can end up generating invalid opcodes. Fix this by only reprting we can emit mul vector ops if the size is small enough. Fixes a crash on: sve-all-short-v8.3+sve@vq3/insn_mul_z_zi___INC.risu.bin When running on AArch64 hardware. Reviewed-by: Richard Henderson Signed-off-by: Alex Benn=C3=A9e Message-Id: <20180719154248.29669-1-alex.bennee@linaro.org> [rth: Removed the tcg_debug_assert -- there are plenty of other cases that we do not diagnose within the insn encoding helpers.] Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.inc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tcg/aarch64/tcg-target.inc.c b/tcg/aarch64/tcg-target.inc.c index 4562d36d1b..083592a4d7 100644 --- a/tcg/aarch64/tcg-target.inc.c +++ b/tcg/aarch64/tcg-target.inc.c @@ -2219,7 +2219,6 @@ int tcg_can_emit_vec_op(TCGOpcode opc, TCGType type, = unsigned vece) switch (opc) { case INDEX_op_add_vec: case INDEX_op_sub_vec: - case INDEX_op_mul_vec: case INDEX_op_and_vec: case INDEX_op_or_vec: case INDEX_op_xor_vec: @@ -2232,6 +2231,8 @@ int tcg_can_emit_vec_op(TCGOpcode opc, TCGType type, = unsigned vece) case INDEX_op_shri_vec: case INDEX_op_sari_vec: return 1; + case INDEX_op_mul_vec: + return vece < MO_64; =20 default: return 0; --=20 2.17.1