From mboxrd@z Thu Jan 1 00:00:00 1970 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 11034C636CC for ; Mon, 20 Feb 2023 10:56:59 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pU3q1-00075k-MR; Mon, 20 Feb 2023 05:56:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU3py-00075P-Bv; Mon, 20 Feb 2023 05:56:02 -0500 Received: from out30-100.freemail.mail.aliyun.com ([115.124.30.100]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pU3pv-0002qd-Jq; Mon, 20 Feb 2023 05:56:01 -0500 X-Alimail-AntiSpam: AC=PASS; BC=-1|-1; BR=01201311R811e4; CH=green; DM=||false|; DS=||; FP=0|-1|-1|-1|0|-1|-1|-1; HT=ay29a033018046056; MF=zhiwei_liu@linux.alibaba.com; NM=1; PH=DS; RN=12; SR=0; TI=SMTPD_---0Vc5lP.m_1676890485; Received: from 30.221.97.87(mailfrom:zhiwei_liu@linux.alibaba.com fp:SMTPD_---0Vc5lP.m_1676890485) by smtp.aliyun-inc.com; Mon, 20 Feb 2023 18:54:46 +0800 Message-ID: Date: Mon, 20 Feb 2023 18:54:44 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] RISC-V: XTheadMemPair: Remove register restrictions for store-pair Content-Language: en-US To: Christoph Muellner , qemu-riscv@nongnu.org, qemu-devel@nongnu.org, Alistair Francis , Bin Meng , Philipp Tomsich , Manolis Tsamis , Palmer Dabbelt , Richard Henderson , Cooper Qu , Lifang Xia , Yunhai Shang References: <20230220095612.1529031-1-christoph.muellner@vrull.eu> From: LIU Zhiwei In-Reply-To: <20230220095612.1529031-1-christoph.muellner@vrull.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=115.124.30.100; envelope-from=zhiwei_liu@linux.alibaba.com; helo=out30-100.freemail.mail.aliyun.com X-Spam_score_int: -99 X-Spam_score: -10.0 X-Spam_bar: ---------- X-Spam_report: (-10.0 / 5.0 requ) BAYES_00=-1.9, ENV_AND_HDR_SPF_MATCH=-0.5, NICE_REPLY_A=-0.09, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001, USER_IN_DEF_SPF_WL=-7.5 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-bounces+qemu-devel=archiver.kernel.org@nongnu.org On 2023/2/20 17:56, Christoph Muellner wrote: > From: Christoph Müllner > > The XTheadMemPair does not define any restrictions for store-pair > instructions (th.sdd or th.swd). However, the current code enforces > the restrictions that are required for load-pair instructions. > Let's fix this by removing this code. > > Signed-off-by: Christoph Müllner > --- > target/riscv/insn_trans/trans_xthead.c.inc | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/target/riscv/insn_trans/trans_xthead.c.inc b/target/riscv/insn_trans/trans_xthead.c.inc > index be87c34f56..cf1731b08d 100644 > --- a/target/riscv/insn_trans/trans_xthead.c.inc > +++ b/target/riscv/insn_trans/trans_xthead.c.inc > @@ -980,10 +980,6 @@ static bool trans_th_lwud(DisasContext *ctx, arg_th_pair *a) > static bool gen_storepair_tl(DisasContext *ctx, arg_th_pair *a, MemOp memop, > int shamt) > { > - if (a->rs == a->rd1 || a->rs == a->rd2 || a->rd1 == a->rd2) { > - return false; > - } > - Reviewed-by: LIU Zhiwei Zhiwei > TCGv data1 = get_gpr(ctx, a->rd1, EXT_NONE); > TCGv data2 = get_gpr(ctx, a->rd2, EXT_NONE); > TCGv addr1 = tcg_temp_new();