From nobody Wed May 1 14:12:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1604933711; cv=none; d=zohomail.com; s=zohoarc; b=gOntG4yUYY72w59B7X4n0MJpoxbgeaWQ4B/yiFshJDV+hWA+yujfnYGazi5wvUu/YVFg3mvFMVT+oJma2S4W/jQ3BvyIyvqZitPqRoqprJzls80ijnXuhU6ObaTsbfaw5W9INg/gs3IzkK7VfBtH/ceAWoqD+1W9Dv2raH20inw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604933711; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=NJhGAXP2h9Fo3Qoy3VCI1hDmptB3uQvjfcrEm2GQu4o=; b=er6A71bzDtr1tuoqSBsMT3H+syFVXRcFDrVf5MoF9hqywfD0Ud3O19qpfWK6jHePe6IfdZzdVJ8Xvaj2nfsKE1eXVH7CFlCl56xlfaNfIMzzOwtNCPBlIQP82F2YAw3IiS3P764FNrwol0AB4rO3MCvp2V2I5qRni2K4t9xwlFw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16049337117551015.0524387040749; Mon, 9 Nov 2020 06:55:11 -0800 (PST) Received: from localhost ([::1]:60842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kc8ZZ-0006Mi-GA for importer@patchew.org; Mon, 09 Nov 2020 09:55:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:50160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kc8Y2-0005Iq-FW for qemu-devel@nongnu.org; Mon, 09 Nov 2020 09:53:34 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:39516) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kc8Y0-0000PQ-29 for qemu-devel@nongnu.org; Mon, 09 Nov 2020 09:53:34 -0500 Received: by mail-wm1-x344.google.com with SMTP id s13so8191669wmh.4 for ; Mon, 09 Nov 2020 06:53:28 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id i5sm6827444wrw.45.2020.11.09.06.53.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 06:53:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NJhGAXP2h9Fo3Qoy3VCI1hDmptB3uQvjfcrEm2GQu4o=; b=XDlih/YvQ9EueJITn32CczHFH4OAP45WdvFAB4JnWAjPpMnt8gRhRPwuSIIxmqE8Nw R8yktxVg8dRs7Vc12DtWr9kIJjmRM6esQzlqzlPxw/S2v64QgVkk7UEF4hDmXRWqbkaf LQj4PAt/EHpu92SzoPYO60TR1h2ZI0n90Np8sU/BfSadCq0ucGcxqNXb8hfNYo4tvUNU Azp4heglPGJy1wBKfrruUAIqUzFec5DYdMF4nK/BokvvTZQ5nZPuDZISWdi5CFaJO22H GzvyWaw6dCY/v6BeVhHpiK+TpkJmxB6witCRTjyS/QbChsdPH9Gy+W/4sTE0gxTMoNUm dRPA== 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:mime-version :content-transfer-encoding; bh=NJhGAXP2h9Fo3Qoy3VCI1hDmptB3uQvjfcrEm2GQu4o=; b=a0O5U3g0FVFHy8KnsUij5f3jUrwhsvesz8EWKFY+YZ+wmL2qxVOHon406p/91hlDIQ optZkN0j8QQ2TX77WL0z/iZ04DCJB1p1GlE0UqrIsog8EIMnfEenJALT8j6j46KrgMaP EuOMnSbt8Ev4gxvRKR+S+iaC1Xth3KzyOfQhfjoBFJsXRyjelEdfAc6qU01nqBQvR1jp ltE/kIluhwc/Na2rXxygTFkVpUlM2dYBHcrityxB5hugdb0e/6vom/s9ghnQF7RD0ceU X/wBDRHSdewzvUCualU/ZIV+dsBCg4Kg6LAkRuDkMhZh6KrIxBoAJZ1J58ap57i535kP gDew== X-Gm-Message-State: AOAM533/3yoh8cSH+vf0ry5rHZ4Js2tOgNZIufs3qpV0Qrxbn6QkP40V GpSXVyuZJ9hMPFRDEg9mA8Fjyw== X-Google-Smtp-Source: ABdhPJxMK/n06p9xkIonJ5j4VU410Sszjl76eofGpRoD3ajCGpiRTgrW3h4GD4SiA3h6gehtHKRVUA== X-Received: by 2002:a1c:6a11:: with SMTP id f17mr14501218wmc.24.1604933606840; Mon, 09 Nov 2020 06:53:26 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH] target/arm/translate-neon.c: Handle VTBL UNDEF case before VFP access check Date: Mon, 9 Nov 2020 14:53:24 +0000 Message-Id: <20201109145324.2859-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x344.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Checks for UNDEF cases should go before the "is VFP enabled?" access check, except in special cases. Move a stray UNDEF check in the VTBL trans function up above the access check. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- Based-on: 20201105171126.88014-1-richard.henderson@linaro.org ("target/arm: Fix neon VTBL/VTBX for len > 1") --- target/arm/translate-neon.c.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/arm/translate-neon.c.inc b/target/arm/translate-neon.c.= inc index 0ae95cb8df8..2403825d15f 100644 --- a/target/arm/translate-neon.c.inc +++ b/target/arm/translate-neon.c.inc @@ -2874,10 +2874,6 @@ static bool trans_VTBL(DisasContext *s, arg_VTBL *a) return false; } =20 - if (!vfp_access_check(s)) { - return true; - } - if ((a->vn + a->len + 1) > 32) { /* * This is UNPREDICTABLE; we choose to UNDEF to avoid the @@ -2886,6 +2882,10 @@ static bool trans_VTBL(DisasContext *s, arg_VTBL *a) return false; } =20 + if (!vfp_access_check(s)) { + return true; + } + desc =3D tcg_const_i32((a->vn << 2) | a->len); def =3D tcg_temp_new_i64(); if (a->op) { --=20 2.20.1