From patchwork Mon Jul 18 13:59:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 591470 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5817:0:0:0:0 with SMTP id j23csp3063333max; Mon, 18 Jul 2022 07:31:26 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vi3qIwyEFIJKcXENNWXR+4ScEr/0+YgBomd+wAa99htvfiL9cqQb72I3U0Qxe/NVeoiE/S X-Received: by 2002:a05:620a:254e:b0:6b4:8dd1:e4b6 with SMTP id s14-20020a05620a254e00b006b48dd1e4b6mr18498097qko.39.1658154686359; Mon, 18 Jul 2022 07:31:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658154686; cv=none; d=google.com; s=arc-20160816; b=Uz0Ah11gRdcLMnNOpaarxSOEVE/xBTvs1KDUp38Ti33swLMGBUATLpG6pkSclBA7/M 3da6Nx5UKtUggs8Ik3YBnR8htXl+u56aqs881ktiHssv9JWCN3O/2ITxu8n8IwHjm34O iGbuYNIRk0ZSHal78nBY+UUCG4vkqu/sn6ytx5jt6NeB/RSzShqJMH5CzqbrP9bXD3zX l3HY0yIo/gj/CmVzpvuME7BYgpZ0XoFvwis5LFYmN+XzXhyL7SHClcemD2FJ9luL8pci 0OxkkDRtyl7mEjKgVdLmyCFRCCiEYwwSAv/42vv13vmDd/LcjJwqZENC3mrhkeOVJ866 /1Kw== 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:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=QuX4bqrgJsmwtriilRgKBMrcdhU6Sl9wuLdDCeKIqPA=; b=r1iNmT4+Uicu8oeKkh84xFBFimO4CNOQpwTyaJ5JgCvGU9HFq26bt9/959f8gasCM0 5aV19ww61i0HpqHh6B0r9ebcjXhXdV0c5C+cXcqoXwy435InrO0u7WRDuvxA2lQFyhHa b3KXJfLXYtOp0SFvdgwlqPXxi6PkpqRFiBj7x0wQDQO+WUSjIt+flf6oiItTMgKx7aMC mF6OGXUls6eSbpdrmURsWuzyz+rI1CjURt61BhaIJNdSSj2gXOZz6rgzrw3NyHiH6Xlo ikVqFVWm9NOM83vHBjYBVvxg7YmNCkXgz5WPCgOPGd30gYKLJmTXssB1FvKlemkR/s+h zZHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yeo4kAbg; 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=pass (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 f11-20020a056214076b00b00470b452c8c9si5235449qvz.288.2022.07.18.07.31.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jul 2022 07:31:26 -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=pass header.i=@linaro.org header.s=google header.b=yeo4kAbg; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDRmP-0003vn-Us for patch@linaro.org; Mon, 18 Jul 2022 10:31:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51860) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDRHg-0002Ab-2z for qemu-devel@nongnu.org; Mon, 18 Jul 2022 09:59:40 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:38483) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oDRHc-0003BY-KD for qemu-devel@nongnu.org; Mon, 18 Jul 2022 09:59:39 -0400 Received: by mail-wr1-x42f.google.com with SMTP id e15so11928448wro.5 for ; Mon, 18 Jul 2022 06:59:35 -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=QuX4bqrgJsmwtriilRgKBMrcdhU6Sl9wuLdDCeKIqPA=; b=yeo4kAbgcRFI2xj8qr1qnEm+LX1spGKQOX8EAsgQYXamXrLPOwo5AniMVL4Hf52+DR ZGnHg3y4INJDBWiyL1KJTHasSHhDYuP2ZuAP11M70BzlCjpu9wO5EPqb6SDM4hpwNSgK XBfMlJKtqn+5klVBCX6J/4wxM+VNqTAOL/ZeXa+RW+xXJN27Dup9izN67v2WLQgS9mSv 0brkD8wyZtlFupPBpT7+DuHu+qZ32W/uZeXaIbQ5zeJpQg5Fw9s+HH4eBD3jECI2HZaQ pNakzN1WGCyfIPveZ+TIyj74yRehPRNYNR/flJmpkvyhmchgfoF4Ip10BElg4FQ/mJlU Hm4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QuX4bqrgJsmwtriilRgKBMrcdhU6Sl9wuLdDCeKIqPA=; b=ZkLE0CSFF0drlqqwnGk5jAstgYybkinbJGbY89kxV0+Tld49m1+3rkYgXHmmurhfWh Uj/lP4/K9FpWoiMQhxR+vSel2/9VjKWq4bLxObKgfEQxlbSXv0WvwKR/mM1cxDIAU543 LC+0rH15/vwDHdihxsxcsJVOuWS54MGWjXTaICz5gqunb6h7vN3kub4CvVf/1MKCOv7w naQ2k6p6N/ovHZds4mpu6Pco3UrjrBGlPe7K7vy+aC+0aiZndnrOntulrbBY/mmVzIy2 Sg2Tke0c8ko4zphju7tCHz71Ecutfp2XKqMYBxEGwrY/Ept7YfZhk7dyGoiByRxZD0qd Eftw== X-Gm-Message-State: AJIora+0kVivwwjqw+ODgBIiZ9LpKoouHYLDnUb07OnVCWu1UTT6UDUF jdbyfuuYPTOiG/sNlVqwtfr5vgIeG/Lm/w== X-Received: by 2002:a05:6000:1cc:b0:21d:a352:116b with SMTP id t12-20020a05600001cc00b0021da352116bmr22210409wrx.418.1658152774160; Mon, 18 Jul 2022 06:59:34 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id id15-20020a05600ca18f00b003a31f1edfa7sm1805798wmb.41.2022.07.18.06.59.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 06:59:33 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 14/15] target/arm: Don't set syndrome ISS for loads and stores with writeback Date: Mon, 18 Jul 2022 14:59:19 +0100 Message-Id: <20220718135920.13667-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220718135920.13667-1-peter.maydell@linaro.org> References: <20220718135920.13667-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42f.google.com 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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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" The architecture requires that for faults on loads and stores which do writeback, the syndrome information does not have the ISS instruction syndrome information (i.e. ISV is 0). We got this wrong for the load and store instructions covered by disas_ldst_reg_imm9(). Calculate iss_valid correctly so that if the insn is a writeback one it is false. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1057 Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20220715123323.1550983-1-peter.maydell@linaro.org --- target/arm/translate-a64.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index b7b64f73584..163df8c6157 100644 --- a/target/arm/translate-a64.c +++ b/target/arm/translate-a64.c @@ -3138,7 +3138,7 @@ static void disas_ldst_reg_imm9(DisasContext *s, uint32_t insn, bool is_store = false; bool is_extended = false; bool is_unpriv = (idx == 2); - bool iss_valid = !is_vector; + bool iss_valid; bool post_index; bool writeback; int memidx; @@ -3191,6 +3191,8 @@ static void disas_ldst_reg_imm9(DisasContext *s, uint32_t insn, g_assert_not_reached(); } + iss_valid = !is_vector && !writeback; + if (rn == 31) { gen_check_sp_alignment(s); }