From patchwork Fri Jul 15 12:33:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 590833 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5817:0:0:0:0 with SMTP id j23csp449417max; Fri, 15 Jul 2022 05:36:01 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ujhfSiUjUH0lWVL+IMBSwISRFsWNBnxxYn4Ndgp8iJ5ARrYxoG19RzoHcm4cZH8w70hspx X-Received: by 2002:ac8:4e83:0:b0:31e:e139:a6a8 with SMTP id 3-20020ac84e83000000b0031ee139a6a8mr357122qtp.337.1657888561046; Fri, 15 Jul 2022 05:36:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657888561; cv=none; d=google.com; s=arc-20160816; b=E3Yv07Cr2IckU/+zMucDCwBDHjZvmJwIae9ECjZ6aM08q9PU4iRip9B+Tyh6//RJyR ZXg/DUY2rkLcF35iSs+sHb4KdEamTyfmz4rkr9HA+QIb6NAXSlQ6BQ6YSeb7CWcOuXQd qOFMpNgTfjRjHPd8jIblMY849jLTsKpcrFBPMsAlPAYsnxucWhMrsmA0vZMucvlFhuVL UO4hQ1r7k6gceQpLtZkoYYMEzXq0raCXt5GR+us4XVSgh9arIhgrYtUSmiyNM1EUHeh0 Wlr93LMmqpyaDtVaEj5I/qwkpiVQwxeGhF/MXa3+9rqfaYVcKKdyFt5I2CauS5/omvon j3lw== 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:message-id:date:subject:to:from:dkim-signature; bh=yuRbk5CWRfM03M5yrd1oq6pfXGgzYo68VWk+Ro2YMl8=; b=ku/1qmXSLuXo6FeVuVNjPi+xODGxWXyJWxUe5Stbttkv6UzYmb4+Bo6RVp0iX61J5j qkVf4YjyTE/NBUrji8fCPXFdy8XO3ZuRQojQJhBsB3iFs8ccFsxwYNgYKkjH31iobD1/ QAxQlz1AuyhzXCsupqID3GBoXN1KQL+7jAqp101LZeCJXNTMm6TocBSAj9b0Se0QhQfd WqmY26Otbq645avkZrhOrjib+zxnUj82/VHSvHlT9qcGrWC/PCd8nx/vRnRtE0+gTWJP xJ1yW6cONsbOTnMg3giUB6Cw2me6cNOA8ynH5yu7YHG+H9/PXHNuszXeHTBFNttwl8gK zGKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r1GWN6Je; 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 jp8-20020ad45f88000000b004733c2889a2si2437166qvb.524.2022.07.15.05.36.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jul 2022 05:36:01 -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=r1GWN6Je; 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]:44396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oCKY4-000462-Ju for patch@linaro.org; Fri, 15 Jul 2022 08:36:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60686) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oCKVv-00044s-Gu for qemu-devel@nongnu.org; Fri, 15 Jul 2022 08:33:47 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:37402) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oCKVf-0002RA-Eo for qemu-devel@nongnu.org; Fri, 15 Jul 2022 08:33:47 -0400 Received: by mail-wr1-x434.google.com with SMTP id j1so2098799wrs.4 for ; Fri, 15 Jul 2022 05:33:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=yuRbk5CWRfM03M5yrd1oq6pfXGgzYo68VWk+Ro2YMl8=; b=r1GWN6JetqLl1ugnzacjTi/aXxegnPXgNMKnmTsS6NljZp4rFkpLypWmoyyzk7z2kD BQlqNY3t1w5zh/fRRJiAlpbttm65j3isAWj6rrGeObXjoWAWOWaoBwOxyg/jW/PMGhw2 nAonSCEQR5Jft5Jaq+oRjmZAdqRs3ZMoYRlTpjlWFI+8K9AGyYxGFz2z9nsDQyC4M42l IqF9EXc3F6lUjJOoNHY46boAHdmzTYpJOzqXaHYPiWdn4lJKPTBS/EHmW4kUUk6Sgqnx oNut83eg+o3Wj1gh2fvyGVop4xJAB9mzkWILHl0l5TBx+2m7IQVQZ+pDwcgEErpBfNPO +P+w== 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:mime-version :content-transfer-encoding; bh=yuRbk5CWRfM03M5yrd1oq6pfXGgzYo68VWk+Ro2YMl8=; b=tCWSPSVCSdQsvkZLH+2Pvq73MEVwhsBOZTpcAicpFsgGS2wWGt/ocuUuMA+32DgYoE Z4G9Yj7KEJ5UaXlFqih16DNIQZMUiLX8No2sU3J6Ye7xufCd+ClgN0+LPiFoPtUVzqiM fPVNvcOePkDJP5/EPmYqZuNxpa8n4x5hkNFB8vXNAsaXfR3/dXwLmd2oj9OmZ9bkS5X9 AQYh9o9c9usyETSH0mVMUx4sX+SeY2p1v1/CaXIM62UcBolbm464g9CFntx4pShUvA4z E4LPdiaYeAct/wuZOcsO2GjBtab0fdCkJ1/s7N6pa2HC/gI4fEwOUitlkpYmS7UvYgvr wzMw== X-Gm-Message-State: AJIora/VIeU6q0oPqaCWuqbY3E3w+OcenjZDFlTDwX+pnbpeKM6ppuEK Zt7hrLODOZxOGrj/wpVqvpybHwD36Y6BMA== X-Received: by 2002:a5d:598e:0:b0:21d:86b2:f35 with SMTP id n14-20020a5d598e000000b0021d86b20f35mr12877646wri.54.1657888409576; Fri, 15 Jul 2022 05:33:29 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id m185-20020a1c26c2000000b003a302fb9df7sm4832616wmm.21.2022.07.15.05.33.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jul 2022 05:33:28 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH] target/arm: Don't set syndrome ISS for loads and stores with writeback Date: Fri, 15 Jul 2022 13:33:23 +0100 Message-Id: <20220715123323.1550983-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x434.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, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=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 --- Tested with RTH's test case attached to the bug report. --- 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); }