From patchwork Mon Jul 8 13:22:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 168640 Delivered-To: patch@linaro.org Received: by 2002:ac9:6410:0:0:0:0:0 with SMTP id r16csp6545714ock; Mon, 8 Jul 2019 06:23:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5ySANIQRJ06UHu4YLs7x1vrs0lU1FSuszfn69lCgx8to0WrG8dw2a4jnbzxB48T+XVgkG X-Received: by 2002:a50:90c5:: with SMTP id d5mr19069046eda.28.1562592191287; Mon, 08 Jul 2019 06:23:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562592191; cv=none; d=google.com; s=arc-20160816; b=WRcIUpbzHkizX2hF+CGnOCdOPh/x4zAF5tc6JSzRSBXi7LnWH0JLXc0/csQga6l2N7 mCbvMttudlMQqV5MYqJrYRdDyij1MxfwCoejzyWJDvLHx5HwwDbR4m3u0M7jv4+gbJbE EcpmgcVM1KD0pkYB67c6RMGpiCqFtPrUnD+sEFgQwBZtoghIG4PwbGsnb3tUJvaayLDM wZvzMbA3K9E762ldhSKRuYWIhJDOHm8VE/tU6tokDAcgTViHPd0M0lkG3huO8tHTYtuS j9/35yufmRGe5kJyoQk96W8JN4O2ofbpLSeRVGsjKw9SsPSdnzXK8hwXha+X4HjHIxPI SIJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=4k6A6Sehnb0t0NBVSTvBu5NVlmPUHPOJZHFdQpfg10w=; b=meTQw8+qX2QhiaFL7xd6IviiBMKSFS+dYriQU5iPpqw04q7t0nkWEca8vi+5EkJ8yo VqDejV87eMXa9/hoeb4k3J89GePrTLhTk//6ZyGicLBSAKhFCEcix5Wlimxu1GM4PkPr jc41sSBkplO+EYhUEn1pkzjl7u5Ldf+hEC/u5iPvAEIcs+FmRIaa9Bo6dFw/TLESitYD DHYBd/iJiqXbfGiPD4J1sJUqVviZ2pZS3zuQBJfn5T9TovqHtOg17e4x+cior5lI1w9C Tobo72pLEZWQkC+pA8dnonH3sA0ZoMW5f3v6hC/ExC0fjsp0uv3BkZJVyYNg1r3Ua6Cr C0hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eCbpLJMr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jz14si11184384ejb.33.2019.07.08.06.23.11 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 08 Jul 2019 06:23:11 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=eCbpLJMr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkTbp-00061l-9S for patch@linaro.org; Mon, 08 Jul 2019 09:23:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52256) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkTbO-00060v-FR for qemu-devel@nongnu.org; Mon, 08 Jul 2019 09:22:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkTbN-0003wz-HG for qemu-devel@nongnu.org; Mon, 08 Jul 2019 09:22:42 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]:50882) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hkTbN-0003wM-AY for qemu-devel@nongnu.org; Mon, 08 Jul 2019 09:22:41 -0400 Received: by mail-wm1-x334.google.com with SMTP id v15so5418568wml.0 for ; Mon, 08 Jul 2019 06:22:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=4k6A6Sehnb0t0NBVSTvBu5NVlmPUHPOJZHFdQpfg10w=; b=eCbpLJMrhl395Gb/YUzE1PI7Gifv0RbFXq3AhcQsB2Sn8X7qFarnOrpmm66NB5Eixb BWUXqgM15W1qj22w4ffJOa5++uM10+oFJCDhDZEBqg9Eck6TwV5yKgtRcZD/w/pNm0me fVn4jAo/6csDRCHKTha159Ujj+1vGVH7tpyUFdprGZKoG1l13yydUE9CrCmuO4bzaBPV zaLa5cd/k25Hg79EobKZUS8FAdFIKzIP8fJMTGPokVrZKzGIunRJRT/ENrC4hBJPaGhF xTUccdOpIQ2p+w1tMkNW59bg5MohnPxzMgD6LrsNSM0xdi3A6lwxL6BdOw37zJNUlUBn MZRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4k6A6Sehnb0t0NBVSTvBu5NVlmPUHPOJZHFdQpfg10w=; b=e6LFKrR3zv+/zOi1uCalY9Y4mjKcCgag572lUAaNYRnqJuOqVnPjResY3iz15OO0g8 TfAFnPa1T3hIduYq8/7pwKJOgwydoeCNBE4pAOIJtW5iPBJF7fhygPw5iDYByEWE/aQW E0+yRRMfEs+TMdsBqtQivZ4Trs0ZLlnGhIV/5RuZ0qLnmVGNXhwwY99IwQIiua2cQezr S4sFEVxuJHpbBnvraFFw2Zzb1/tL7+j6+FmeIlsfEG+BIRrTGsLAAFOpC3fFMejejmVN xS4QBuZty0zFVouxxTHd34jT0YbrvA/TRNrPT9a8HVcsgrGIdq7kOC4CKPY+f+/oVMzt blgQ== X-Gm-Message-State: APjAAAUl96G5NSj+Im30gApea4XDptPWAckiLhfQGGoLUHjk8b4XfIlI m19JMrAvbD2KW6gTeEh2NLF06HVsqynsQA== X-Received: by 2002:a1c:6504:: with SMTP id z4mr16592151wmb.172.1562592160044; Mon, 08 Jul 2019 06:22:40 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id v15sm13773744wrt.25.2019.07.08.06.22.39 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 08 Jul 2019 06:22:39 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 8 Jul 2019 14:22:34 +0100 Message-Id: <20190708132237.7911-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190708132237.7911-1-peter.maydell@linaro.org> References: <20190708132237.7911-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::334 Subject: [Qemu-devel] [PULL 1/4] target/arm: Fix sve_zcr_len_for_el 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Off by one error in the EL2 and EL3 tests. Remove the test against EL3 entirely, since it must always be true. Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id: 20190702104732.31154-1-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/target/arm/helper.c b/target/arm/helper.c index 2df7152a9cd..20f8728be11 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -5283,10 +5283,10 @@ uint32_t sve_zcr_len_for_el(CPUARMState *env, int el) if (el <= 1) { zcr_len = MIN(zcr_len, 0xf & (uint32_t)env->vfp.zcr_el[1]); } - if (el < 2 && arm_feature(env, ARM_FEATURE_EL2)) { + if (el <= 2 && arm_feature(env, ARM_FEATURE_EL2)) { zcr_len = MIN(zcr_len, 0xf & (uint32_t)env->vfp.zcr_el[2]); } - if (el < 3 && arm_feature(env, ARM_FEATURE_EL3)) { + if (arm_feature(env, ARM_FEATURE_EL3)) { zcr_len = MIN(zcr_len, 0xf & (uint32_t)env->vfp.zcr_el[3]); } return zcr_len;