From nobody Tue Nov 26 18:23:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1705335977; cv=none; d=zohomail.com; s=zohoarc; b=A8sBpFmVuJ9wGXEgTaX7ckZkdsP4GRHgMpNPtyOgNyiyCSCplGsx/1FVIn0hZCL/gq0B037J8o32HB+jzKYBH0dbinPq8tFjOC6FBdecsrA3/ooaEhdGzOPl1lXo1d3+xDXN+jIyitXb/pCOTl0hNtgzqUqd6AxvLkO/fI7881E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705335977; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=QiPxYFkInWxtf4MkjHWSRFqjjhgLITYki68L5zfyr6Q=; b=G18jzbhlwtLF6bMQIwvkAMKxDfS36UXKaYMa/+DL55J4/VOekWpKNjJEgtbySocLIqs5j8UwfVuHVALKNgoi+WNm7izR06s7vkKrkqyS/zjGW5fMrPWLci5uPmuG8HsZevaW6aXGUlwXmXFeRK5ubD3y+ugxPPtvJAqKkZJRIZU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1705335977045953.9477552646787; Mon, 15 Jan 2024 08:26:17 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rPPmJ-0005nK-Sx; Mon, 15 Jan 2024 11:25:36 -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 1rPPmI-0005mJ-7M for qemu-devel@nongnu.org; Mon, 15 Jan 2024 11:25:34 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rPPmF-000513-6g for qemu-devel@nongnu.org; Mon, 15 Jan 2024 11:25:33 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40e7a9c527dso8673125e9.1 for ; Mon, 15 Jan 2024 08:25:30 -0800 (PST) Received: from rockhopper.ba.rivosinc.com (214.11.169.217.in-addr.arpa. [217.169.11.214]) by smtp.gmail.com with ESMTPSA id n16-20020a05600c4f9000b0040d62f97e3csm20274444wmq.10.2024.01.15.08.25.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 08:25:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1705335929; x=1705940729; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QiPxYFkInWxtf4MkjHWSRFqjjhgLITYki68L5zfyr6Q=; b=XC8CKU5KVSr2UTsTOYGtDbcZoKpf2TzpZKOxj+TJ5vPI1b94Ym1fcad7iIJkFpRgAs fgubsglWmsK2chcFPkrSt2OUotSGLZfl9W+EG2RFIO8y2DDvVvZaix87E05/wj35801I gmHCdJCIcakObibENELYxvWg7nx+5Ab0Lwl4rJx3sps1GMKIDjTH90gS3miZrx7y58gR 72jp5WYSme/gERS2yFeKZpv3hid4+X758l595y1YmpCc7EN1M1WKSYA3YAgkabOeUmJO Kfj7jWwN/xvVLV4FurLl2a35lJc4n82E3zSBNZw1mJmu5jJs+0CUMbp6Pa9DI/V2jtdC o/XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705335929; x=1705940729; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QiPxYFkInWxtf4MkjHWSRFqjjhgLITYki68L5zfyr6Q=; b=JWXn0C9REKoZUljmzPcAJ3jSt4DpJePAOevWDSfUu+6y4/AY9LrzVJAZ8t0Z+cb+iX ZuY+9HkabHJSJicRH66Euy/bBw1ADDvE84Df9LXK8ljnw1Cc6HDzrG0YjjKRL1nGwlwP i4QE80TwVYuGgySho7LfLY0SMIGyEbWotcBGZ6UO6ScH9EsSIc91PwCxdDHdJxazkad9 ejSzuzSNVe0LG1foOK0GtVe4iS7d/3JbfQW5ud/aF8gc8NUWg/4G8KTGtaiwnajTPJ2f Y5xpPj8S+1eqPoJNVnjjkFL3vmnXy9F0N34y8mcF6D0t6TrnRsP9IKtEGpnFSYA0Ec4E 6OAA== X-Gm-Message-State: AOJu0Yz34aG8lYmYtMKJLGU5FZk84LHBdTxYLP8W+4Obe2wGNV6nZR/Z qbUMKEm5lUTnWf8/tHvsdVCUvzy3fFqJ4cmpJYwihpWyT9R7qA== X-Google-Smtp-Source: AGHT+IH4s4zTh1jpv4kWnAfDdd6b7c978O/MNUhzfbvKiec4xUw33RwqrI22cCz2nQCSUdlcvmc/DQ== X-Received: by 2002:a05:600c:4708:b0:40e:3a6f:9b3e with SMTP id v8-20020a05600c470800b0040e3a6f9b3emr1674534wmo.6.1705335928740; Mon, 15 Jan 2024 08:25:28 -0800 (PST) From: Rob Bradford To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, atishp@rivosinc.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, liwei1518@gmail.com, dbarboza@ventanamicro.com, zhiwei_liu@linux.alibaba.com, Rob Bradford Subject: [PATCH 1/2] target/riscv: Add Zaamo and Zalrsc extensions Date: Mon, 15 Jan 2024 16:25:24 +0000 Message-ID: <20240115162525.63535-2-rbradford@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240115162525.63535-1-rbradford@rivosinc.com> References: <20240115162525.63535-1-rbradford@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=rbradford@rivosinc.com; helo=mail-wm1-x333.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @rivosinc-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1705335978770100001 Content-Type: text/plain; charset="utf-8" These extensions represent the atomic operations from A (Zaamo) and the Load-Reserved/Store-Conditional operations from A (Zalrsc) Signed-off-by: Rob Bradford Reviewed-by: Daniel Henrique Barboza --- target/riscv/cpu.c | 5 +++++ target/riscv/cpu_cfg.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 8d3ec74a1c..604baf53c8 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -103,7 +103,9 @@ const RISCVIsaExtData isa_edata_arr[] =3D { ISA_EXT_DATA_ENTRY(zihintpause, PRIV_VERSION_1_10_0, ext_zihintpause), ISA_EXT_DATA_ENTRY(zihpm, PRIV_VERSION_1_12_0, ext_zihpm), ISA_EXT_DATA_ENTRY(zmmul, PRIV_VERSION_1_12_0, ext_zmmul), + ISA_EXT_DATA_ENTRY(zaamo, PRIV_VERSION_1_12_0, ext_zaamo), ISA_EXT_DATA_ENTRY(zacas, PRIV_VERSION_1_12_0, ext_zacas), + ISA_EXT_DATA_ENTRY(zalrsc, PRIV_VERSION_1_12_0, ext_zalrsc), ISA_EXT_DATA_ENTRY(zawrs, PRIV_VERSION_1_12_0, ext_zawrs), ISA_EXT_DATA_ENTRY(zfa, PRIV_VERSION_1_12_0, ext_zfa), ISA_EXT_DATA_ENTRY(zfbfmin, PRIV_VERSION_1_12_0, ext_zfbfmin), @@ -1491,6 +1493,9 @@ const RISCVCPUMultiExtConfig riscv_cpu_experimental_e= xts[] =3D { MULTI_EXT_CFG_BOOL("x-smaia", ext_smaia, false), MULTI_EXT_CFG_BOOL("x-ssaia", ext_ssaia, false), =20 + MULTI_EXT_CFG_BOOL("x-zaamo", ext_zaamo, false), + MULTI_EXT_CFG_BOOL("x-zalrsc", ext_zalrsc, false), + MULTI_EXT_CFG_BOOL("x-zvfh", ext_zvfh, false), MULTI_EXT_CFG_BOOL("x-zvfhmin", ext_zvfhmin, false), =20 diff --git a/target/riscv/cpu_cfg.h b/target/riscv/cpu_cfg.h index fea14c275f..cc4c30244c 100644 --- a/target/riscv/cpu_cfg.h +++ b/target/riscv/cpu_cfg.h @@ -78,7 +78,9 @@ struct RISCVCPUConfig { bool ext_svnapot; bool ext_svpbmt; bool ext_zdinx; + bool ext_zaamo; bool ext_zacas; + bool ext_zalrsc; bool ext_zawrs; bool ext_zfa; bool ext_zfbfmin; --=20 2.43.0 From nobody Tue Nov 26 18:23:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1705335968; cv=none; d=zohomail.com; s=zohoarc; b=GKywsbkV7NIPIzNqyQ6+f18a7FEDfRk0u5323SBhIJYR34kVxYMdRJx97MPXgeP9gjDm/Zo/h2p2iwfa16l7OF+LvIna1Nlqi8WEBTSbmDM8PQnr30Ih7CZzCnbSXlCb/qpKGz81oHkpTvfPURt/IOoWY1ex7N1SzNNk2E8+4F4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705335968; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=pe4WTlbA+w/w320h1lZbso82Ro9E7uK8lDq42mAnp/Y=; b=CpfJtb1C4Lakm8/gfkWIFcqwi2jHHRCt1LePMkWRkAnJhwW+efYSUQ8IDZzAhUl+A2RUp5MV/HK+3cUSmuD3sihRgdhMt9j+S2Ais0V2Oe63g5GOaQfUSD9IT1VNRWNSDfpiuINOu02xAj//F5zzgsyVEWV68f1sZWRYlX/7paQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1705335968439830.7792445893933; Mon, 15 Jan 2024 08:26:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rPPmN-0005oJ-Sk; Mon, 15 Jan 2024 11:25:39 -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 1rPPmK-0005nd-8K for qemu-devel@nongnu.org; Mon, 15 Jan 2024 11:25:36 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rPPmG-00051A-C4 for qemu-devel@nongnu.org; Mon, 15 Jan 2024 11:25:35 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40e69b31366so27192235e9.1 for ; Mon, 15 Jan 2024 08:25:31 -0800 (PST) Received: from rockhopper.ba.rivosinc.com (214.11.169.217.in-addr.arpa. [217.169.11.214]) by smtp.gmail.com with ESMTPSA id n16-20020a05600c4f9000b0040d62f97e3csm20274444wmq.10.2024.01.15.08.25.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 08:25:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1705335930; x=1705940730; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pe4WTlbA+w/w320h1lZbso82Ro9E7uK8lDq42mAnp/Y=; b=GpvEgoWTio8AfX/RsdJi/cw0aj2DCuF08elkASguSzGxRoYYaCY7E/3X58ZOAGXOf2 1Zkz88lITGbg07cTHS6kZ2ifNzqU1y4d5PKHnsbsK6NdzB5dmCBC5gzeRFPvAEfmBRZ8 kwgwE4uuLt4jeDrmuIbwrElPr0fzrXiOvW9330PcoPL4TZUs54agAVMWlViWO6vogrsc zeFGu43UtflyMWstcE+/WEyWsKr9WviEnGxe7zYZ70v17WW2j4yA4gTS9ADZJwGgMrMf Op5evIA5ANLYwwGP8N86AdAe+ld00WvnAHnejI3X5Gy4WQvmv70BoBt8/hDgIRPASCpb XoHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705335930; x=1705940730; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pe4WTlbA+w/w320h1lZbso82Ro9E7uK8lDq42mAnp/Y=; b=GsRNsqwwdggkyigwCQ+HTxW8T2WESZrQ4c1mmpZ63feggpWDxVQMWGYXEe52DMDrio A1nc6q5n7z7FNLMHRFjy4nKxwVTeuTnBBOq7eYRFjEshtrDUO6rB1FSTzkyqjg+ZusXB QQchkBOxWJ20p6sHep5hlzyAtkRYRJmiSax15Y9+OWS0hwAwX0CZ9qnfZprBAo67RcgR SVIxVfiLuN9yBEcZjj64RVTv1GHxw0uah/8q+48qhkiNxCk4G5NlOwMrLwXOar4Nf7NF glfqB3kt3GJEnWqna3zfSmjpOqUom8oejtM83CDvrbpSceVAI1detNb/+Ea5WOalsDPW hNrA== X-Gm-Message-State: AOJu0Yx4QaUpQJbvJ0XaY4VGAGlsuAir7xe+YHmUjBlPxfWPPmGHkz7x 57wh1pK24Hf2HyRXzgJNTBqCA4vF8LDYvU5VuzFsTsQXERjZCw== X-Google-Smtp-Source: AGHT+IGfhqkfikoMHHt/tuDPrNFi7LLDmZUMGDkTnuUmyuuR5iucRo2Pr9OzkJ3ezgeAo4AkhFkfMw== X-Received: by 2002:a7b:c455:0:b0:40e:4af9:6a19 with SMTP id l21-20020a7bc455000000b0040e4af96a19mr2859702wmi.155.1705335930274; Mon, 15 Jan 2024 08:25:30 -0800 (PST) From: Rob Bradford To: qemu-devel@nongnu.org Cc: qemu-riscv@nongnu.org, atishp@rivosinc.com, palmer@dabbelt.com, alistair.francis@wdc.com, bin.meng@windriver.com, liwei1518@gmail.com, dbarboza@ventanamicro.com, zhiwei_liu@linux.alibaba.com, Rob Bradford Subject: [PATCH 2/2] target/riscv: Check 'A' and split extensions for atomic instructions Date: Mon, 15 Jan 2024 16:25:25 +0000 Message-ID: <20240115162525.63535-3-rbradford@rivosinc.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240115162525.63535-1-rbradford@rivosinc.com> References: <20240115162525.63535-1-rbradford@rivosinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=rbradford@rivosinc.com; helo=mail-wm1-x331.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-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=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @rivosinc-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1705335970883100001 Content-Type: text/plain; charset="utf-8" Following the pattern for 'M' and Zmmul check if either the 'A' extension is enabled or the appropriate split extension for the instruction. Also remove the assumption that only checking for 64-bit systems is required for the double word variants. Signed-off-by: Rob Bradford --- target/riscv/insn_trans/trans_rva.c.inc | 56 +++++++++++++++---------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/target/riscv/insn_trans/trans_rva.c.inc b/target/riscv/insn_tr= ans/trans_rva.c.inc index f0368de3e4..267930e5bc 100644 --- a/target/riscv/insn_trans/trans_rva.c.inc +++ b/target/riscv/insn_trans/trans_rva.c.inc @@ -18,6 +18,18 @@ * this program. If not, see . */ =20 +#define REQUIRE_A_OR_ZAAMO(ctx) do { \ + if (!ctx->cfg_ptr->ext_zaamo && !has_ext(ctx, RVA)) { \ + return false; \ + } \ +} while (0) + +#define REQUIRE_A_OR_ZALRSC(ctx) do { \ + if (!ctx->cfg_ptr->ext_zalrsc && !has_ext(ctx, RVA)) { \ + return false; \ + } \ +} while (0) + static bool gen_lr(DisasContext *ctx, arg_atomic *a, MemOp mop) { TCGv src1; @@ -96,143 +108,143 @@ static bool gen_amo(DisasContext *ctx, arg_atomic *a, =20 static bool trans_lr_w(DisasContext *ctx, arg_lr_w *a) { - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZALRSC(ctx); return gen_lr(ctx, a, (MO_ALIGN | MO_TESL)); } =20 static bool trans_sc_w(DisasContext *ctx, arg_sc_w *a) { - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZALRSC(ctx); return gen_sc(ctx, a, (MO_ALIGN | MO_TESL)); } =20 static bool trans_amoswap_w(DisasContext *ctx, arg_amoswap_w *a) { - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_xchg_tl, (MO_ALIGN | MO_TESL)); } =20 static bool trans_amoadd_w(DisasContext *ctx, arg_amoadd_w *a) { - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_fetch_add_tl, (MO_ALIGN | MO_TE= SL)); } =20 static bool trans_amoxor_w(DisasContext *ctx, arg_amoxor_w *a) { - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_fetch_xor_tl, (MO_ALIGN | MO_TE= SL)); } =20 static bool trans_amoand_w(DisasContext *ctx, arg_amoand_w *a) { - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_fetch_and_tl, (MO_ALIGN | MO_TE= SL)); } =20 static bool trans_amoor_w(DisasContext *ctx, arg_amoor_w *a) { - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_fetch_or_tl, (MO_ALIGN | MO_TES= L)); } =20 static bool trans_amomin_w(DisasContext *ctx, arg_amomin_w *a) { - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_fetch_smin_tl, (MO_ALIGN | MO_T= ESL)); } =20 static bool trans_amomax_w(DisasContext *ctx, arg_amomax_w *a) { - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_fetch_smax_tl, (MO_ALIGN | MO_T= ESL)); } =20 static bool trans_amominu_w(DisasContext *ctx, arg_amominu_w *a) { - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_fetch_umin_tl, (MO_ALIGN | MO_T= ESL)); } =20 static bool trans_amomaxu_w(DisasContext *ctx, arg_amomaxu_w *a) { - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_fetch_umax_tl, (MO_ALIGN | MO_T= ESL)); } =20 static bool trans_lr_d(DisasContext *ctx, arg_lr_d *a) { REQUIRE_64BIT(ctx); - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZALRSC(ctx); return gen_lr(ctx, a, MO_ALIGN | MO_TEUQ); } =20 static bool trans_sc_d(DisasContext *ctx, arg_sc_d *a) { REQUIRE_64BIT(ctx); - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZALRSC(ctx); return gen_sc(ctx, a, (MO_ALIGN | MO_TEUQ)); } =20 static bool trans_amoswap_d(DisasContext *ctx, arg_amoswap_d *a) { REQUIRE_64BIT(ctx); - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_xchg_tl, (MO_ALIGN | MO_TEUQ)); } =20 static bool trans_amoadd_d(DisasContext *ctx, arg_amoadd_d *a) { REQUIRE_64BIT(ctx); - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_fetch_add_tl, (MO_ALIGN | MO_TE= UQ)); } =20 static bool trans_amoxor_d(DisasContext *ctx, arg_amoxor_d *a) { REQUIRE_64BIT(ctx); - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_fetch_xor_tl, (MO_ALIGN | MO_TE= UQ)); } =20 static bool trans_amoand_d(DisasContext *ctx, arg_amoand_d *a) { REQUIRE_64BIT(ctx); - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_fetch_and_tl, (MO_ALIGN | MO_TE= UQ)); } =20 static bool trans_amoor_d(DisasContext *ctx, arg_amoor_d *a) { REQUIRE_64BIT(ctx); - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_fetch_or_tl, (MO_ALIGN | MO_TEU= Q)); } =20 static bool trans_amomin_d(DisasContext *ctx, arg_amomin_d *a) { REQUIRE_64BIT(ctx); - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_fetch_smin_tl, (MO_ALIGN | MO_T= EUQ)); } =20 static bool trans_amomax_d(DisasContext *ctx, arg_amomax_d *a) { REQUIRE_64BIT(ctx); - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_fetch_smax_tl, (MO_ALIGN | MO_T= EUQ)); } =20 static bool trans_amominu_d(DisasContext *ctx, arg_amominu_d *a) { REQUIRE_64BIT(ctx); - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_fetch_umin_tl, (MO_ALIGN | MO_T= EUQ)); } =20 static bool trans_amomaxu_d(DisasContext *ctx, arg_amomaxu_d *a) { REQUIRE_64BIT(ctx); - REQUIRE_EXT(ctx, RVA); + REQUIRE_A_OR_ZAAMO(ctx); return gen_amo(ctx, a, &tcg_gen_atomic_fetch_umax_tl, (MO_ALIGN | MO_T= EUQ)); } --=20 2.43.0