From patchwork Wed Sep 7 08:03:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12968611 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EA27FC38145 for ; Wed, 7 Sep 2022 08:26:00 +0000 (UTC) Received: from localhost ([::1]:48776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVqNj-0002L1-Ua for qemu-devel@archiver.kernel.org; Wed, 07 Sep 2022 04:25:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVq3H-0003gw-NS for qemu-devel@nongnu.org; Wed, 07 Sep 2022 04:04:54 -0400 Received: from esa5.hgst.iphmx.com ([216.71.153.144]:1923) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVq3G-0004Ud-0q for qemu-devel@nongnu.org; Wed, 07 Sep 2022 04:04:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1662537889; x=1694073889; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PryBPiQnlxWYDQvS/dlRYya0Kuib35WbEqA4OYMdjEU=; b=obZwm4IL1trXtcqP/VkbeGb7Ii6barKTawu33Y2nrwvWkcZz+tMnPbqG aN6xZrqoCl4NTkDDB/iHhYHCIu2di8wqQao9YnBSSTOe6X3Mu3WaUvnYu JADMyf66kjA+Z60fKLIj6FSMBms7IYFX7eCQFng7K0vn3HvW8UbvA8Ep4 o1tc5jpsN+jtQXDc2gqyydg0T9KGqoVJjYh8QBpFHJm/KlZgx/jUkvifB KpHmos5tDyVvQQJrP13+vwi2kYBGBqPtb+dlFezS7JPJ8dp8CzFy/JLcb E9O7IOUop+VDXVrvsoXCAhcB/x9ppUwwZ8p97Eo5vcwqIKaGSxSAqTLNU A==; X-IronPort-AV: E=Sophos;i="5.93,296,1654531200"; d="scan'208";a="210714988" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 07 Sep 2022 16:04:36 +0800 IronPort-SDR: nmJn8fuwFadloc7tDhrACQvwV1HHpE1tK/Fkgni4JZCrjZ6QJVat74SyYc5DLPGA3/qPGr9GyF 8ZwoIpB6+wObwyZpU8bLXW0HfNzhQ4YId+Fr7deZH2wTHOmEcV/d8CdJVE377sqSgxaDNoFWpB FuerT7umMk1x2Aecyz96YrPomIE5vDMZxLpBy34gxeAjhFgJZ5YzZRG43egLzcrKWjHB7Mo1Bi VBFD2q3f5buVYI30CaXIMNYN8VucsvVWPi7oShpVm3fBG7o0qr8K43ESU/zYCDuBZ1HbWeP25V jYlj71lQZVhoom1DwAPFFtk/ Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 07 Sep 2022 00:19:34 -0700 IronPort-SDR: 8QeGjI6/zpOBdgr2jM4ZjPBzh2EnFjBfiCUt+HFE+fhFDT9L72eqvCqz4JxctdDScH9jR/7KsH U2od/yp78JMNIoNsDFqCtHq+skqBdWFGzLfssUCUpualkBppbX3RkBqvD23M3A0HMUrOcKS8pC fs2Joz3qeTU7mRhlZD34BNkmREemwy6Sxxw/p10WIRag7y1u7XADdjbfJxxXmWC9XVc4hRk9nE cW+7FIFWt7ZKahj4zHcKPjL3xnwQ6IJPpE88nLN41wixvZZBmsSdTUxl41Omt7iwoR+ykQDJ0l rgw= WDCIronportException: Internal Received: from unknown (HELO toolbox.wdc.com) ([10.225.167.94]) by uls-op-cesaip01.wdc.com with ESMTP; 07 Sep 2022 01:04:36 -0700 To: qemu-devel@nongnu.org, peter.maydell@linaro.org Cc: alistair23@gmail.com, Alexey Baturo , Alistair Francis Subject: [PULL 13/44] target/riscv: Fix typo and restore Pointer Masking functionality for RISC-V Date: Wed, 7 Sep 2022 10:03:22 +0200 Message-Id: <20220907080353.111926-14-alistair.francis@wdc.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220907080353.111926-1-alistair.francis@wdc.com> References: <20220907080353.111926-1-alistair.francis@wdc.com> MIME-Version: 1.0 Received-SPF: pass client-ip=216.71.153.144; envelope-from=prvs=242877ce7=alistair.francis@wdc.com; helo=esa5.hgst.iphmx.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, SPF_HELO_PASS=-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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Reply-to: Alistair Francis X-Patchwork-Original-From: Alistair Francis via From: Alistair Francis From: Alexey Baturo Fixes: 4302bef9e178 ("target/riscv: Calculate address according to XLEN") Signed-off-by: Alexey Baturo Reviewed-by: Alistair Francis Message-Id: <20220717101543.478533-2-space.monkey.delivers@gmail.com> Signed-off-by: Alistair Francis --- target/riscv/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/riscv/translate.c b/target/riscv/translate.c index 6eeb728462..76da8db8a7 100644 --- a/target/riscv/translate.c +++ b/target/riscv/translate.c @@ -544,7 +544,7 @@ static TCGv get_address(DisasContext *ctx, int rs1, int imm) tcg_gen_addi_tl(addr, src1, imm); if (ctx->pm_mask_enabled) { - tcg_gen_and_tl(addr, addr, pm_mask); + tcg_gen_andc_tl(addr, addr, pm_mask); } else if (get_xl(ctx) == MXL_RV32) { tcg_gen_ext32u_tl(addr, addr); }