From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 9198B3857BA8 for ; Wed, 22 Jun 2022 10:32:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9198B3857BA8 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sifive.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-pl1-x630.google.com with SMTP id jb13so1431782plb.9 for ; Wed, 22 Jun 2022 03:32:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id; bh=TEf3KhZtJXrRZEebLaY7pRLkdushnpky1Y2+y7UF4BQ=; b=JOqUhl8PasaHFYffvuMiHdcu5nZbAXn0EWQw7iioQgzX9OkbXo+xktupb2+UdvG8W1 uWnAClCc1b/D9cMPuKEr7VaZce6mQDWMjxM6KyoJs/0+1AW2AXtMsrisHtPVCEqGEXme i/Narw/6kj6dE6m6ghJjE6Tp6ocBW0AdlTeLk8FCo0mVEUla22tT1f5kbDyfhb1q3yJi ewdSgjEWvAoWWjX8VXy2kqzk6Wx0fYn6D/yqawzHM7Ldh8oxISPm6rVQvg3ViVUAq2t+ 3yX5PHFGZmQFD0++cEsgJcFWF6cXBQBvQ8cNaqLPdHFzMEDtttfFq6lw5s3EzwlWfJLw Npsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TEf3KhZtJXrRZEebLaY7pRLkdushnpky1Y2+y7UF4BQ=; b=n+Lmy+H/EU+HqYOF32zEWDh3fybJyVnnoogeBSx+Xeu6L7TxhZgFIUTFL1ERH8jJJR hmR+jI/+59dHobHULV7Anabr9m8vvY0zuzaY7Wv/IIVJzqTmhM+jjfZ3uWDS19G9vWCo ejHfavLNAo8teKx7Ov13OBmbFszUi8SNdH7X+D3NKlu2LOFo7uHaYQBqHYBC0ZDaPoeb Rc+UdLI99j6CdBqteDGvwIl0pfE48k0/rnHs8VzBLS3wdJp6wdU1c/jRZVHOXdmGis6Z Jt2fU17/no7WBD4rjmkInJS/cN5IvMv077TSeVF1kQkfsrPTYCKOgMO7YwgQcQ6tiSlJ zjfA== X-Gm-Message-State: AJIora+WOA9luw2//AwZ1FPH3Ih3/3r9WA8QNf1cylPtmlybq/4JDNEl mJYBdR8KOJecXE7EOJv63xtuYKnUhGTFDSRl X-Google-Smtp-Source: AGRyM1tDH52Izz9uyNCOaEqIl1acNTlG9Xn+oP55sI49PGriOSuhfeXVRRtOj3mC0j/+VsVlaWVAMQ== X-Received: by 2002:a17:902:ea95:b0:16a:3084:2925 with SMTP id x21-20020a170902ea9500b0016a30842925mr11051123plb.166.1655893966368; Wed, 22 Jun 2022 03:32:46 -0700 (PDT) Received: from gamma00.internal.sifive.com ([64.62.193.194]) by smtp.gmail.com with ESMTPSA id h1-20020a62de01000000b0052531985e3esm4433972pfg.22.2022.06.22.03.32.43 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 22 Jun 2022 03:32:46 -0700 (PDT) From: Nelson Chu To: binutils@sourceware.org, jim.wilson.gcc@gmail.com, palmer@rivosinc.com, andrew@sifive.com Subject: [committed] RISC-V: Use single h extension to control hypervisor CSRs and instructions. Date: Wed, 22 Jun 2022 03:32:41 -0700 Message-Id: <1655893961-10660-1-git-send-email-nelson.chu@sifive.com> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2022 10:32:54 -0000 According to the picture 28.1 in the current ISA spec, h is no larger the multi-letter extension, it is a single extension after v. Therefore, this patch fix the implementation, and use the single h to control hypervisor CSRs and instructions, which we promised to do before. bfd/ * elfxx-riscv.c (riscv_supported_std_ext): Added h with version 1.0 after v. (riscv_supported_std_h_ext): Removed. (riscv_all_supported_ext): Updated since riscv_supported_std_h_ext is removed. (riscv_prefix_ext_class): Removed RV_ISA_CLASS_H. (parse_config): Updated since riscv_prefix_ext_class is removed. (riscv_recognized_prefixed_ext): Likewise. (riscv_get_default_ext_version): Likewise. (riscv_multi_subset_supports): Handle INSN_CLASS_H for hypervisor instructions. (riscv_multi_subset_supports_ext): Likewise. gas/ * config/tc-riscv.c (riscv_csr_class): Added CSR_CLASS_H and CSR_CLASS_H_32 for hypervisor CSRs. (riscv_csr_address): Likewise. * testsuite/gas/riscv/csr-version-1p10.d: Updated since hypervisor CSRs are controlled by single h extension for now. * testsuite/gas/riscv/csr-version-1p10.l: Likewise. * testsuite/gas/riscv/csr-version-1p11.d: Likewise. * testsuite/gas/riscv/csr-version-1p11.l: Likewise. * testsuite/gas/riscv/csr-version-1p12.d: Likewise. * testsuite/gas/riscv/csr-version-1p12.l: Likewise. * testsuite/gas/riscv/csr-version-1p9p1.d: Likewise. * testsuite/gas/riscv/csr-version-1p9p1.l: Likewise. * testsuite/gas/riscv/h-ext-32.d: Added h to architecture string. * testsuite/gas/riscv/h-ext-64.d: Likewise. * testsuite/gas/riscv/march-fail-single-prefix-h: Removed since h is no longer multi-letter extension. * testsuite/gas/riscv/march-fail-unknown-h.d: Likewise. include/ * opcode/riscv-opc.h: Control hypervisor CSRs by h extension, rather than the privileged spec verisons. * opcode/riscv.h (riscv_insn_class): Added INSN_CLASS_H. opcodes/ * riscv-opc.c (riscv_opcodes): Control hypervisor instructions by h extension. --- bfd/elfxx-riscv.c | 16 ++-- gas/config/tc-riscv.c | 10 ++- gas/testsuite/gas/riscv/csr-version-1p10.d | 100 ++++++++++----------- gas/testsuite/gas/riscv/csr-version-1p10.l | 100 ++++++++++----------- gas/testsuite/gas/riscv/csr-version-1p11.d | 100 ++++++++++----------- gas/testsuite/gas/riscv/csr-version-1p11.l | 100 ++++++++++----------- gas/testsuite/gas/riscv/csr-version-1p12.l | 50 +++++++++++ gas/testsuite/gas/riscv/csr-version-1p9p1.d | 100 ++++++++++----------- gas/testsuite/gas/riscv/csr-version-1p9p1.l | 100 ++++++++++----------- gas/testsuite/gas/riscv/h-ext-32.d | 2 +- gas/testsuite/gas/riscv/h-ext-64.d | 2 +- .../gas/riscv/march-fail-single-prefix-h.d | 3 - gas/testsuite/gas/riscv/march-fail-unknown-h.d | 3 - include/opcode/riscv-opc.h | 50 +++++------ include/opcode/riscv.h | 1 + opcodes/riscv-opc.c | 38 ++++---- 16 files changed, 411 insertions(+), 364 deletions(-) delete mode 100644 gas/testsuite/gas/riscv/march-fail-single-prefix-h.d delete mode 100644 gas/testsuite/gas/riscv/march-fail-unknown-h.d diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c index ede6968..ffc18c9 100644 --- a/bfd/elfxx-riscv.c +++ b/bfd/elfxx-riscv.c @@ -1172,6 +1172,7 @@ static struct riscv_supported_ext riscv_supported_std_ext[] = {"c", ISA_SPEC_CLASS_20190608, 2, 0, 0 }, {"c", ISA_SPEC_CLASS_2P2, 2, 0, 0 }, {"v", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, + {"h", ISA_SPEC_CLASS_DRAFT, 1, 0, 0 }, {NULL, 0, 0, 0, 0} }; @@ -1234,11 +1235,6 @@ static struct riscv_supported_ext riscv_supported_std_s_ext[] = {NULL, 0, 0, 0, 0} }; -static struct riscv_supported_ext riscv_supported_std_h_ext[] = -{ - {NULL, 0, 0, 0, 0} -}; - static struct riscv_supported_ext riscv_supported_std_zxm_ext[] = { {NULL, 0, 0, 0, 0} @@ -1249,7 +1245,6 @@ const struct riscv_supported_ext *riscv_all_supported_ext[] = riscv_supported_std_ext, riscv_supported_std_z_ext, riscv_supported_std_s_ext, - riscv_supported_std_h_ext, riscv_supported_std_zxm_ext, NULL }; @@ -1259,7 +1254,6 @@ enum riscv_prefix_ext_class { RV_ISA_CLASS_Z = 1, RV_ISA_CLASS_S, - RV_ISA_CLASS_H, RV_ISA_CLASS_ZXM, RV_ISA_CLASS_X, RV_ISA_CLASS_UNKNOWN @@ -1282,7 +1276,6 @@ static const struct riscv_parse_prefix_config parse_config[] = {RV_ISA_CLASS_ZXM, "zxm"}, {RV_ISA_CLASS_Z, "z"}, {RV_ISA_CLASS_S, "s"}, - {RV_ISA_CLASS_H, "h"}, {RV_ISA_CLASS_X, "x"}, {RV_ISA_CLASS_UNKNOWN, NULL} }; @@ -1332,8 +1325,6 @@ riscv_recognized_prefixed_ext (const char *ext) return riscv_known_prefixed_ext (ext, riscv_supported_std_zxm_ext); case RV_ISA_CLASS_S: return riscv_known_prefixed_ext (ext, riscv_supported_std_s_ext); - case RV_ISA_CLASS_H: - return riscv_known_prefixed_ext (ext, riscv_supported_std_h_ext); case RV_ISA_CLASS_X: /* Only the single x is unrecognized. */ if (strcmp (ext, "x") != 0) @@ -1510,7 +1501,6 @@ riscv_get_default_ext_version (enum riscv_spec_class *default_isa_spec, case RV_ISA_CLASS_ZXM: table = riscv_supported_std_zxm_ext; break; case RV_ISA_CLASS_Z: table = riscv_supported_std_z_ext; break; case RV_ISA_CLASS_S: table = riscv_supported_std_s_ext; break; - case RV_ISA_CLASS_H: table = riscv_supported_std_h_ext; break; case RV_ISA_CLASS_X: break; default: @@ -2423,6 +2413,8 @@ riscv_multi_subset_supports (riscv_parse_subset_t *rps, || riscv_subset_supports (rps, "zve32f")); case INSN_CLASS_SVINVAL: return riscv_subset_supports (rps, "svinval"); + case INSN_CLASS_H: + return riscv_subset_supports (rps, "h"); default: rps->error_handler (_("internal: unreachable INSN_CLASS_*")); @@ -2526,6 +2518,8 @@ riscv_multi_subset_supports_ext (riscv_parse_subset_t *rps, return _("('d' and 'zfh') or 'zhinx"); case INSN_CLASS_Q_AND_ZFH_INX: return _("('q' and 'zfh') or 'zhinx"); + case INSN_CLASS_H: + return _("h"); default: rps->error_handler (_("internal: unreachable INSN_CLASS_*")); diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index a10ae8e..6b04dc9 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -65,7 +65,9 @@ enum riscv_csr_class CSR_CLASS_F, /* f-ext only */ CSR_CLASS_ZKR, /* zkr only */ CSR_CLASS_V, /* rvv only */ - CSR_CLASS_DEBUG /* debug CSR */ + CSR_CLASS_DEBUG, /* debug CSR */ + CSR_CLASS_H, /* hypervisor */ + CSR_CLASS_H_32, /* hypervisor, rv32 only */ }; /* This structure holds all restricted conditions for a CSR. */ @@ -909,6 +911,12 @@ riscv_csr_address (const char *csr_name, need_check_version = true; extension = "i"; break; + case CSR_CLASS_H_32: + rv32_only = (xlen == 32); + /* Fall through. */ + case CSR_CLASS_H: + extension = "h"; + break; case CSR_CLASS_F: extension = "f"; break; diff --git a/gas/testsuite/gas/riscv/csr-version-1p10.d b/gas/testsuite/gas/riscv/csr-version-1p10.d index 6e0d1f6..c39cbf3 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p10.d +++ b/gas/testsuite/gas/riscv/csr-version-1p10.d @@ -551,56 +551,56 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+33e59073[ ]+csrw[ ]+mhpmevent30,a1 [ ]+[0-9a-f]+:[ ]+33f02573[ ]+csrr[ ]+a0,mhpmevent31 [ ]+[0-9a-f]+:[ ]+33f59073[ ]+csrw[ ]+mhpmevent31,a1 -[ ]+[0-9a-f]+:[ ]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r[ ]+a0,0x244 -[ ]+[0-9a-f]+:[ ]+24459073[ ]+csrw[ ]+0x244,a1 -[ ]+[0-9a-f]+:[ ]+28002573[ ]+csrr[ ]+a0,0x280 -[ ]+[0-9a-f]+:[ ]+28059073[ ]+csrw[ ]+0x280,a1 +[ ]+[0-9a-f]+:[ ]+60002573[ ]+csrr[ ]+a0,hstatus +[ ]+[0-9a-f]+:[ ]+60059073[ ]+csrw[ ]+hstatus,a1 +[ ]+[0-9a-f]+:[ ]+60202573[ ]+csrr[ ]+a0,hedeleg +[ ]+[0-9a-f]+:[ ]+60259073[ ]+csrw[ ]+hedeleg,a1 +[ ]+[0-9a-f]+:[ ]+60302573[ ]+csrr[ ]+a0,hideleg +[ ]+[0-9a-f]+:[ ]+60359073[ ]+csrw[ ]+hideleg,a1 +[ ]+[0-9a-f]+:[ ]+60402573[ ]+csrr[ ]+a0,hie +[ ]+[0-9a-f]+:[ ]+60459073[ ]+csrw[ ]+hie,a1 +[ ]+[0-9a-f]+:[ ]+60602573[ ]+csrr[ ]+a0,hcounteren +[ ]+[0-9a-f]+:[ ]+60659073[ ]+csrw[ ]+hcounteren,a1 +[ ]+[0-9a-f]+:[ ]+60702573[ ]+csrr[ ]+a0,hgeie +[ ]+[0-9a-f]+:[ ]+60759073[ ]+csrw[ ]+hgeie,a1 +[ ]+[0-9a-f]+:[ ]+64302573[ ]+csrr[ ]+a0,htval +[ ]+[0-9a-f]+:[ ]+64359073[ ]+csrw[ ]+htval,a1 +[ ]+[0-9a-f]+:[ ]+64402573[ ]+csrr[ ]+a0,hip +[ ]+[0-9a-f]+:[ ]+64459073[ ]+csrw[ ]+hip,a1 +[ ]+[0-9a-f]+:[ ]+64502573[ ]+csrr[ ]+a0,hvip +[ ]+[0-9a-f]+:[ ]+64559073[ ]+csrw[ ]+hvip,a1 +[ ]+[0-9a-f]+:[ ]+64a02573[ ]+csrr[ ]+a0,htinst +[ ]+[0-9a-f]+:[ ]+64a59073[ ]+csrw[ ]+htinst,a1 +[ ]+[0-9a-f]+:[ ]+e1202573[ ]+csrr[ ]+a0,hgeip +[ ]+[0-9a-f]+:[ ]+e1259073[ ]+csrw[ ]+hgeip,a1 +[ ]+[0-9a-f]+:[ ]+60a02573[ ]+csrr[ ]+a0,henvcfg +[ ]+[0-9a-f]+:[ ]+60a59073[ ]+csrw[ ]+henvcfg,a1 +[ ]+[0-9a-f]+:[ ]+61a02573[ ]+csrr[ ]+a0,henvcfgh +[ ]+[0-9a-f]+:[ ]+61a59073[ ]+csrw[ ]+henvcfgh,a1 +[ ]+[0-9a-f]+:[ ]+68002573[ ]+csrr[ ]+a0,hgatp +[ ]+[0-9a-f]+:[ ]+68059073[ ]+csrw[ ]+hgatp,a1 +[ ]+[0-9a-f]+:[ ]+60502573[ ]+csrr[ ]+a0,htimedelta +[ ]+[0-9a-f]+:[ ]+60559073[ ]+csrw[ ]+htimedelta,a1 +[ ]+[0-9a-f]+:[ ]+61502573[ ]+csrr[ ]+a0,htimedeltah +[ ]+[0-9a-f]+:[ ]+61559073[ ]+csrw[ ]+htimedeltah,a1 +[ ]+[0-9a-f]+:[ ]+20002573[ ]+csrr[ ]+a0,vsstatus +[ ]+[0-9a-f]+:[ ]+20059073[ ]+csrw[ ]+vsstatus,a1 +[ ]+[0-9a-f]+:[ ]+20402573[ ]+csrr[ ]+a0,vsie +[ ]+[0-9a-f]+:[ ]+20459073[ ]+csrw[ ]+vsie,a1 +[ ]+[0-9a-f]+:[ ]+20502573[ ]+csrr[ ]+a0,vstvec +[ ]+[0-9a-f]+:[ ]+20559073[ ]+csrw[ ]+vstvec,a1 +[ ]+[0-9a-f]+:[ ]+24002573[ ]+csrr[ ]+a0,vsscratch +[ ]+[0-9a-f]+:[ ]+24059073[ ]+csrw[ ]+vsscratch,a1 +[ ]+[0-9a-f]+:[ ]+24102573[ ]+csrr[ ]+a0,vsepc +[ ]+[0-9a-f]+:[ ]+24159073[ ]+csrw[ ]+vsepc,a1 +[ ]+[0-9a-f]+:[ ]+24202573[ ]+csrr[ ]+a0,vscause +[ ]+[0-9a-f]+:[ ]+24259073[ ]+csrw[ ]+vscause,a1 +[ ]+[0-9a-f]+:[ ]+24302573[ ]+csrr[ ]+a0,vstval +[ ]+[0-9a-f]+:[ ]+24359073[ ]+csrw[ ]+vstval,a1 +[ ]+[0-9a-f]+:[ ]+24402573[ ]+csrr[ ]+a0,vsip +[ ]+[0-9a-f]+:[ ]+24459073[ ]+csrw[ ]+vsip,a1 +[ ]+[0-9a-f]+:[ ]+28002573[ ]+csrr[ ]+a0,vsatp +[ ]+[0-9a-f]+:[ ]+28059073[ ]+csrw[ ]+vsatp,a1 [ ]+[0-9a-f]+:[ ]+04302573[ ]+csrr[ ]+a0,utval [ ]+[0-9a-f]+:[ ]+04359073[ ]+csrw[ ]+utval,a1 [ ]+[0-9a-f]+:[ ]+14302573[ ]+csrr[ ]+a0,stval diff --git a/gas/testsuite/gas/riscv/csr-version-1p10.l b/gas/testsuite/gas/riscv/csr-version-1p10.l index 2511fee..d00bce8 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p10.l +++ b/gas/testsuite/gas/riscv/csr-version-1p10.l @@ -356,61 +356,61 @@ .*Warning: invalid CSR `mhpmcounter31h', needs rv32i extension .*Warning: invalid CSR `mcountinhibit' for the privileged spec `1.10' .*Warning: invalid CSR `mcountinhibit' for the privileged spec `1.10' -.*Warning: invalid CSR `hstatus' for the privileged spec `1.10' -.*Warning: invalid CSR `hstatus' for the privileged spec `1.10' -.*Warning: invalid CSR `hedeleg' for the privileged spec `1.10' -.*Warning: invalid CSR `hedeleg' for the privileged spec `1.10' -.*Warning: invalid CSR `hideleg' for the privileged spec `1.10' -.*Warning: invalid CSR `hideleg' for the privileged spec `1.10' -.*Warning: invalid CSR `hie' for the privileged spec `1.10' -.*Warning: invalid CSR `hie' for the privileged spec `1.10' -.*Warning: invalid CSR `hcounteren' for the privileged spec `1.10' -.*Warning: invalid CSR `hcounteren' for the privileged spec `1.10' -.*Warning: invalid CSR `hgeie' for the privileged spec `1.10' -.*Warning: invalid CSR `hgeie' for the privileged spec `1.10' -.*Warning: invalid CSR `htval' for the privileged spec `1.10' -.*Warning: invalid CSR `htval' for the privileged spec `1.10' -.*Warning: invalid CSR `hip' for the privileged spec `1.10' -.*Warning: invalid CSR `hip' for the privileged spec `1.10' -.*Warning: invalid CSR `hvip' for the privileged spec `1.10' -.*Warning: invalid CSR `hvip' for the privileged spec `1.10' -.*Warning: invalid CSR `htinst' for the privileged spec `1.10' -.*Warning: invalid CSR `htinst' for the privileged spec `1.10' -.*Warning: invalid CSR `hgeip' for the privileged spec `1.10' -.*Warning: invalid CSR `hgeip' for the privileged spec `1.10' +.*Warning: invalid CSR `hstatus', needs `h' extension +.*Warning: invalid CSR `hstatus', needs `h' extension +.*Warning: invalid CSR `hedeleg', needs `h' extension +.*Warning: invalid CSR `hedeleg', needs `h' extension +.*Warning: invalid CSR `hideleg', needs `h' extension +.*Warning: invalid CSR `hideleg', needs `h' extension +.*Warning: invalid CSR `hie', needs `h' extension +.*Warning: invalid CSR `hie', needs `h' extension +.*Warning: invalid CSR `hcounteren', needs `h' extension +.*Warning: invalid CSR `hcounteren', needs `h' extension +.*Warning: invalid CSR `hgeie', needs `h' extension +.*Warning: invalid CSR `hgeie', needs `h' extension +.*Warning: invalid CSR `htval', needs `h' extension +.*Warning: invalid CSR `htval', needs `h' extension +.*Warning: invalid CSR `hip', needs `h' extension +.*Warning: invalid CSR `hip', needs `h' extension +.*Warning: invalid CSR `hvip', needs `h' extension +.*Warning: invalid CSR `hvip', needs `h' extension +.*Warning: invalid CSR `htinst', needs `h' extension +.*Warning: invalid CSR `htinst', needs `h' extension +.*Warning: invalid CSR `hgeip', needs `h' extension +.*Warning: invalid CSR `hgeip', needs `h' extension .*Warning: read-only CSR is written `csrw hgeip,a1' -.*Warning: invalid CSR `henvcfg' for the privileged spec `1.10' -.*Warning: invalid CSR `henvcfg' for the privileged spec `1.10' +.*Warning: invalid CSR `henvcfg', needs `h' extension +.*Warning: invalid CSR `henvcfg', needs `h' extension .*Warning: invalid CSR `henvcfgh', needs rv32i extension -.*Warning: invalid CSR `henvcfgh' for the privileged spec `1.10' +.*Warning: invalid CSR `henvcfgh', needs `h' extension .*Warning: invalid CSR `henvcfgh', needs rv32i extension -.*Warning: invalid CSR `henvcfgh' for the privileged spec `1.10' -.*Warning: invalid CSR `hgatp' for the privileged spec `1.10' -.*Warning: invalid CSR `hgatp' for the privileged spec `1.10' -.*Warning: invalid CSR `htimedelta' for the privileged spec `1.10' -.*Warning: invalid CSR `htimedelta' for the privileged spec `1.10' +.*Warning: invalid CSR `henvcfgh', needs `h' extension +.*Warning: invalid CSR `hgatp', needs `h' extension +.*Warning: invalid CSR `hgatp', needs `h' extension +.*Warning: invalid CSR `htimedelta', needs `h' extension +.*Warning: invalid CSR `htimedelta', needs `h' extension .*Warning: invalid CSR `htimedeltah', needs rv32i extension -.*Warning: invalid CSR `htimedeltah' for the privileged spec `1.10' +.*Warning: invalid CSR `htimedeltah', needs `h' extension .*Warning: invalid CSR `htimedeltah', needs rv32i extension -.*Warning: invalid CSR `htimedeltah' for the privileged spec `1.10' -.*Warning: invalid CSR `vsstatus' for the privileged spec `1.10' -.*Warning: invalid CSR `vsstatus' for the privileged spec `1.10' -.*Warning: invalid CSR `vsie' for the privileged spec `1.10' -.*Warning: invalid CSR `vsie' for the privileged spec `1.10' -.*Warning: invalid CSR `vstvec' for the privileged spec `1.10' -.*Warning: invalid CSR `vstvec' for the privileged spec `1.10' -.*Warning: invalid CSR `vsscratch' for the privileged spec `1.10' -.*Warning: invalid CSR `vsscratch' for the privileged spec `1.10' -.*Warning: invalid CSR `vsepc' for the privileged spec `1.10' -.*Warning: invalid CSR `vsepc' for the privileged spec `1.10' -.*Warning: invalid CSR `vscause' for the privileged spec `1.10' -.*Warning: invalid CSR `vscause' for the privileged spec `1.10' -.*Warning: invalid CSR `vstval' for the privileged spec `1.10' -.*Warning: invalid CSR `vstval' for the privileged spec `1.10' -.*Warning: invalid CSR `vsip' for the privileged spec `1.10' -.*Warning: invalid CSR `vsip' for the privileged spec `1.10' -.*Warning: invalid CSR `vsatp' for the privileged spec `1.10' -.*Warning: invalid CSR `vsatp' for the privileged spec `1.10' +.*Warning: invalid CSR `htimedeltah', needs `h' extension +.*Warning: invalid CSR `vsstatus', needs `h' extension +.*Warning: invalid CSR `vsstatus', needs `h' extension +.*Warning: invalid CSR `vsie', needs `h' extension +.*Warning: invalid CSR `vsie', needs `h' extension +.*Warning: invalid CSR `vstvec', needs `h' extension +.*Warning: invalid CSR `vstvec', needs `h' extension +.*Warning: invalid CSR `vsscratch', needs `h' extension +.*Warning: invalid CSR `vsscratch', needs `h' extension +.*Warning: invalid CSR `vsepc', needs `h' extension +.*Warning: invalid CSR `vsepc', needs `h' extension +.*Warning: invalid CSR `vscause', needs `h' extension +.*Warning: invalid CSR `vscause', needs `h' extension +.*Warning: invalid CSR `vstval', needs `h' extension +.*Warning: invalid CSR `vstval', needs `h' extension +.*Warning: invalid CSR `vsip', needs `h' extension +.*Warning: invalid CSR `vsip', needs `h' extension +.*Warning: invalid CSR `vsatp', needs `h' extension +.*Warning: invalid CSR `vsatp', needs `h' extension .*Warning: invalid CSR `ubadaddr' for the privileged spec `1.10' .*Warning: invalid CSR `ubadaddr' for the privileged spec `1.10' .*Warning: invalid CSR `sbadaddr' for the privileged spec `1.10' diff --git a/gas/testsuite/gas/riscv/csr-version-1p11.d b/gas/testsuite/gas/riscv/csr-version-1p11.d index 0c91665..cfcec35 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p11.d +++ b/gas/testsuite/gas/riscv/csr-version-1p11.d @@ -551,56 +551,56 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+33e59073[ ]+csrw[ ]+mhpmevent30,a1 [ ]+[0-9a-f]+:[ ]+33f02573[ ]+csrr[ ]+a0,mhpmevent31 [ ]+[0-9a-f]+:[ ]+33f59073[ ]+csrw[ ]+mhpmevent31,a1 -[ ]+[0-9a-f]+:[ ]+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[ ]+a0,0x244 -[ ]+[0-9a-f]+:[ ]+24459073[ ]+csrw[ ]+0x244,a1 -[ ]+[0-9a-f]+:[ ]+28002573[ ]+csrr[ ]+a0,0x280 -[ ]+[0-9a-f]+:[ ]+28059073[ ]+csrw[ ]+0x280,a1 +[ ]+[0-9a-f]+:[ ]+60002573[ ]+csrr[ ]+a0,hstatus +[ ]+[0-9a-f]+:[ ]+60059073[ ]+csrw[ ]+hstatus,a1 +[ ]+[0-9a-f]+:[ ]+60202573[ ]+csrr[ ]+a0,hedeleg +[ ]+[0-9a-f]+:[ ]+60259073[ ]+csrw[ ]+hedeleg,a1 +[ ]+[0-9a-f]+:[ ]+60302573[ ]+csrr[ ]+a0,hideleg +[ ]+[0-9a-f]+:[ ]+60359073[ ]+csrw[ ]+hideleg,a1 +[ ]+[0-9a-f]+:[ ]+60402573[ ]+csrr[ ]+a0,hie +[ ]+[0-9a-f]+:[ ]+60459073[ ]+csrw[ ]+hie,a1 +[ ]+[0-9a-f]+:[ ]+60602573[ ]+csrr[ ]+a0,hcounteren +[ ]+[0-9a-f]+:[ ]+60659073[ ]+csrw[ ]+hcounteren,a1 +[ ]+[0-9a-f]+:[ ]+60702573[ ]+csrr[ ]+a0,hgeie +[ ]+[0-9a-f]+:[ ]+60759073[ ]+csrw[ ]+hgeie,a1 +[ ]+[0-9a-f]+:[ ]+64302573[ ]+csrr[ ]+a0,htval +[ ]+[0-9a-f]+:[ ]+64359073[ ]+csrw[ ]+htval,a1 +[ ]+[0-9a-f]+:[ ]+64402573[ ]+csrr[ ]+a0,hip +[ ]+[0-9a-f]+:[ ]+64459073[ ]+csrw[ ]+hip,a1 +[ ]+[0-9a-f]+:[ ]+64502573[ ]+csrr[ ]+a0,hvip +[ ]+[0-9a-f]+:[ ]+64559073[ ]+csrw[ ]+hvip,a1 +[ ]+[0-9a-f]+:[ ]+64a02573[ ]+csrr[ ]+a0,htinst +[ ]+[0-9a-f]+:[ ]+64a59073[ ]+csrw[ ]+htinst,a1 +[ ]+[0-9a-f]+:[ ]+e1202573[ ]+csrr[ ]+a0,hgeip +[ ]+[0-9a-f]+:[ ]+e1259073[ ]+csrw[ ]+hgeip,a1 +[ ]+[0-9a-f]+:[ ]+60a02573[ ]+csrr[ ]+a0,henvcfg +[ ]+[0-9a-f]+:[ ]+60a59073[ ]+csrw[ ]+henvcfg,a1 +[ ]+[0-9a-f]+:[ ]+61a02573[ ]+csrr[ ]+a0,henvcfgh +[ ]+[0-9a-f]+:[ ]+61a59073[ ]+csrw[ ]+henvcfgh,a1 +[ ]+[0-9a-f]+:[ ]+68002573[ ]+csrr[ ]+a0,hgatp +[ ]+[0-9a-f]+:[ ]+68059073[ ]+csrw[ ]+hgatp,a1 +[ ]+[0-9a-f]+:[ ]+60502573[ ]+csrr[ ]+a0,htimedelta +[ ]+[0-9a-f]+:[ ]+60559073[ ]+csrw[ ]+htimedelta,a1 +[ ]+[0-9a-f]+:[ ]+61502573[ ]+csrr[ ]+a0,htimedeltah +[ ]+[0-9a-f]+:[ ]+61559073[ ]+csrw[ ]+htimedeltah,a1 +[ ]+[0-9a-f]+:[ ]+20002573[ ]+csrr[ ]+a0,vsstatus +[ ]+[0-9a-f]+:[ ]+20059073[ ]+csrw[ ]+vsstatus,a1 +[ ]+[0-9a-f]+:[ ]+20402573[ ]+csrr[ ]+a0,vsie +[ ]+[0-9a-f]+:[ ]+20459073[ ]+csrw[ ]+vsie,a1 +[ ]+[0-9a-f]+:[ ]+20502573[ ]+csrr[ ]+a0,vstvec +[ ]+[0-9a-f]+:[ ]+20559073[ ]+csrw[ ]+vstvec,a1 +[ ]+[0-9a-f]+:[ ]+24002573[ ]+csrr[ ]+a0,vsscratch +[ ]+[0-9a-f]+:[ ]+24059073[ ]+csrw[ ]+vsscratch,a1 +[ ]+[0-9a-f]+:[ ]+24102573[ ]+csrr[ ]+a0,vsepc +[ ]+[0-9a-f]+:[ ]+24159073[ ]+csrw[ ]+vsepc,a1 +[ ]+[0-9a-f]+:[ ]+24202573[ ]+csrr[ ]+a0,vscause +[ ]+[0-9a-f]+:[ ]+24259073[ ]+csrw[ ]+vscause,a1 +[ ]+[0-9a-f]+:[ ]+24302573[ ]+csrr[ ]+a0,vstval +[ ]+[0-9a-f]+:[ ]+24359073[ ]+csrw[ ]+vstval,a1 +[ ]+[0-9a-f]+:[ ]+24402573[ ]+csrr[ ]+a0,vsip +[ ]+[0-9a-f]+:[ ]+24459073[ ]+csrw[ ]+vsip,a1 +[ ]+[0-9a-f]+:[ ]+28002573[ ]+csrr[ ]+a0,vsatp +[ ]+[0-9a-f]+:[ ]+28059073[ ]+csrw[ ]+vsatp,a1 [ ]+[0-9a-f]+:[ ]+04302573[ ]+csrr[ ]+a0,utval [ ]+[0-9a-f]+:[ ]+04359073[ ]+csrw[ ]+utval,a1 [ ]+[0-9a-f]+:[ ]+14302573[ ]+csrr[ ]+a0,stval diff --git a/gas/testsuite/gas/riscv/csr-version-1p11.l b/gas/testsuite/gas/riscv/csr-version-1p11.l index 570efe2..d4716a2 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p11.l +++ b/gas/testsuite/gas/riscv/csr-version-1p11.l @@ -354,61 +354,61 @@ .*Warning: invalid CSR `mhpmcounter30h', needs rv32i extension .*Warning: invalid CSR `mhpmcounter31h', needs rv32i extension .*Warning: invalid CSR `mhpmcounter31h', needs rv32i extension -.*Warning: invalid CSR `hstatus' for the privileged spec `1.11' -.*Warning: invalid CSR `hstatus' for the privileged spec `1.11' -.*Warning: invalid CSR `hedeleg' for the privileged spec `1.11' -.*Warning: invalid CSR `hedeleg' for the privileged spec `1.11' -.*Warning: invalid CSR `hideleg' for the privileged spec `1.11' -.*Warning: invalid CSR `hideleg' for the privileged spec `1.11' -.*Warning: invalid CSR `hie' for the privileged spec `1.11' -.*Warning: invalid CSR `hie' for the privileged spec `1.11' -.*Warning: invalid CSR `hcounteren' for the privileged spec `1.11' -.*Warning: invalid CSR `hcounteren' for the privileged spec `1.11' -.*Warning: invalid CSR `hgeie' for the privileged spec `1.11' -.*Warning: invalid CSR `hgeie' for the privileged spec `1.11' -.*Warning: invalid CSR `htval' for the privileged spec `1.11' -.*Warning: invalid CSR `htval' for the privileged spec `1.11' -.*Warning: invalid CSR `hip' for the privileged spec `1.11' -.*Warning: invalid CSR `hip' for the privileged spec `1.11' -.*Warning: invalid CSR `hvip' for the privileged spec `1.11' -.*Warning: invalid CSR `hvip' for the privileged spec `1.11' -.*Warning: invalid CSR `htinst' for the privileged spec `1.11' -.*Warning: invalid CSR `htinst' for the privileged spec `1.11' -.*Warning: invalid CSR `hgeip' for the privileged spec `1.11' -.*Warning: invalid CSR `hgeip' for the privileged spec `1.11' +.*Warning: invalid CSR `hstatus', needs `h' extension +.*Warning: invalid CSR `hstatus', needs `h' extension +.*Warning: invalid CSR `hedeleg', needs `h' extension +.*Warning: invalid CSR `hedeleg', needs `h' extension +.*Warning: invalid CSR `hideleg', needs `h' extension +.*Warning: invalid CSR `hideleg', needs `h' extension +.*Warning: invalid CSR `hie', needs `h' extension +.*Warning: invalid CSR `hie', needs `h' extension +.*Warning: invalid CSR `hcounteren', needs `h' extension +.*Warning: invalid CSR `hcounteren', needs `h' extension +.*Warning: invalid CSR `hgeie', needs `h' extension +.*Warning: invalid CSR `hgeie', needs `h' extension +.*Warning: invalid CSR `htval', needs `h' extension +.*Warning: invalid CSR `htval', needs `h' extension +.*Warning: invalid CSR `hip', needs `h' extension +.*Warning: invalid CSR `hip', needs `h' extension +.*Warning: invalid CSR `hvip', needs `h' extension +.*Warning: invalid CSR `hvip', needs `h' extension +.*Warning: invalid CSR `htinst', needs `h' extension +.*Warning: invalid CSR `htinst', needs `h' extension +.*Warning: invalid CSR `hgeip', needs `h' extension +.*Warning: invalid CSR `hgeip', needs `h' extension .*Warning: read-only CSR is written `csrw hgeip,a1' -.*Warning: invalid CSR `henvcfg' for the privileged spec `1.11' -.*Warning: invalid CSR `henvcfg' for the privileged spec `1.11' +.*Warning: invalid CSR `henvcfg', needs `h' extension +.*Warning: invalid CSR `henvcfg', needs `h' extension .*Warning: invalid CSR `henvcfgh', needs rv32i extension -.*Warning: invalid CSR `henvcfgh' for the privileged spec `1.11' +.*Warning: invalid CSR `henvcfgh', needs `h' extension .*Warning: invalid CSR `henvcfgh', needs rv32i extension -.*Warning: invalid CSR `henvcfgh' for the privileged spec `1.11' -.*Warning: invalid CSR `hgatp' for the privileged spec `1.11' -.*Warning: invalid CSR `hgatp' for the privileged spec `1.11' -.*Warning: invalid CSR `htimedelta' for the privileged spec `1.11' -.*Warning: invalid CSR `htimedelta' for the privileged spec `1.11' +.*Warning: invalid CSR `henvcfgh', needs `h' extension +.*Warning: invalid CSR `hgatp', needs `h' extension +.*Warning: invalid CSR `hgatp', needs `h' extension +.*Warning: invalid CSR `htimedelta', needs `h' extension +.*Warning: invalid CSR `htimedelta', needs `h' extension .*Warning: invalid CSR `htimedeltah', needs rv32i extension -.*Warning: invalid CSR `htimedeltah' for the privileged spec `1.11' +.*Warning: invalid CSR `htimedeltah', needs `h' extension .*Warning: invalid CSR `htimedeltah', needs rv32i extension -.*Warning: invalid CSR `htimedeltah' for the privileged spec `1.11' -.*Warning: invalid CSR `vsstatus' for the privileged spec `1.11' -.*Warning: invalid CSR `vsstatus' for the privileged spec `1.11' -.*Warning: invalid CSR `vsie' for the privileged spec `1.11' -.*Warning: invalid CSR `vsie' for the privileged spec `1.11' -.*Warning: invalid CSR `vstvec' for the privileged spec `1.11' -.*Warning: invalid CSR `vstvec' for the privileged spec `1.11' -.*Warning: invalid CSR `vsscratch' for the privileged spec `1.11' -.*Warning: invalid CSR `vsscratch' for the privileged spec `1.11' -.*Warning: invalid CSR `vsepc' for the privileged spec `1.11' -.*Warning: invalid CSR `vsepc' for the privileged spec `1.11' -.*Warning: invalid CSR `vscause' for the privileged spec `1.11' -.*Warning: invalid CSR `vscause' for the privileged spec `1.11' -.*Warning: invalid CSR `vstval' for the privileged spec `1.11' -.*Warning: invalid CSR `vstval' for the privileged spec `1.11' -.*Warning: invalid CSR `vsip' for the privileged spec `1.11' -.*Warning: invalid CSR `vsip' for the privileged spec `1.11' -.*Warning: invalid CSR `vsatp' for the privileged spec `1.11' -.*Warning: invalid CSR `vsatp' for the privileged spec `1.11' +.*Warning: invalid CSR `htimedeltah', needs `h' extension +.*Warning: invalid CSR `vsstatus', needs `h' extension +.*Warning: invalid CSR `vsstatus', needs `h' extension +.*Warning: invalid CSR `vsie', needs `h' extension +.*Warning: invalid CSR `vsie', needs `h' extension +.*Warning: invalid CSR `vstvec', needs `h' extension +.*Warning: invalid CSR `vstvec', needs `h' extension +.*Warning: invalid CSR `vsscratch', needs `h' extension +.*Warning: invalid CSR `vsscratch', needs `h' extension +.*Warning: invalid CSR `vsepc', needs `h' extension +.*Warning: invalid CSR `vsepc', needs `h' extension +.*Warning: invalid CSR `vscause', needs `h' extension +.*Warning: invalid CSR `vscause', needs `h' extension +.*Warning: invalid CSR `vstval', needs `h' extension +.*Warning: invalid CSR `vstval', needs `h' extension +.*Warning: invalid CSR `vsip', needs `h' extension +.*Warning: invalid CSR `vsip', needs `h' extension +.*Warning: invalid CSR `vsatp', needs `h' extension +.*Warning: invalid CSR `vsatp', needs `h' extension .*Warning: invalid CSR `ubadaddr' for the privileged spec `1.11' .*Warning: invalid CSR `ubadaddr' for the privileged spec `1.11' .*Warning: invalid CSR `sbadaddr' for the privileged spec `1.11' diff --git a/gas/testsuite/gas/riscv/csr-version-1p12.l b/gas/testsuite/gas/riscv/csr-version-1p12.l index 03d193c..ab291c5 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p12.l +++ b/gas/testsuite/gas/riscv/csr-version-1p12.l @@ -216,11 +216,61 @@ .*Warning: invalid CSR `mhpmcounter30h', needs rv32i extension .*Warning: invalid CSR `mhpmcounter31h', needs rv32i extension .*Warning: invalid CSR `mhpmcounter31h', needs rv32i extension +.*Warning: invalid CSR `hstatus', needs `h' extension +.*Warning: invalid CSR `hstatus', needs `h' extension +.*Warning: invalid CSR `hedeleg', needs `h' extension +.*Warning: invalid CSR `hedeleg', needs `h' extension +.*Warning: invalid CSR `hideleg', needs `h' extension +.*Warning: invalid CSR `hideleg', needs `h' extension +.*Warning: invalid CSR `hie', needs `h' extension +.*Warning: invalid CSR `hie', needs `h' extension +.*Warning: invalid CSR `hcounteren', needs `h' extension +.*Warning: invalid CSR `hcounteren', needs `h' extension +.*Warning: invalid CSR `hgeie', needs `h' extension +.*Warning: invalid CSR `hgeie', needs `h' extension +.*Warning: invalid CSR `htval', needs `h' extension +.*Warning: invalid CSR `htval', needs `h' extension +.*Warning: invalid CSR `hip', needs `h' extension +.*Warning: invalid CSR `hip', needs `h' extension +.*Warning: invalid CSR `hvip', needs `h' extension +.*Warning: invalid CSR `hvip', needs `h' extension +.*Warning: invalid CSR `htinst', needs `h' extension +.*Warning: invalid CSR `htinst', needs `h' extension +.*Warning: invalid CSR `hgeip', needs `h' extension +.*Warning: invalid CSR `hgeip', needs `h' extension .*Warning: read-only CSR is written `csrw hgeip,a1' +.*Warning: invalid CSR `henvcfg', needs `h' extension +.*Warning: invalid CSR `henvcfg', needs `h' extension .*Warning: invalid CSR `henvcfgh', needs rv32i extension +.*Warning: invalid CSR `henvcfgh', needs `h' extension .*Warning: invalid CSR `henvcfgh', needs rv32i extension +.*Warning: invalid CSR `henvcfgh', needs `h' extension +.*Warning: invalid CSR `hgatp', needs `h' extension +.*Warning: invalid CSR `hgatp', needs `h' extension +.*Warning: invalid CSR `htimedelta', needs `h' extension +.*Warning: invalid CSR `htimedelta', needs `h' extension .*Warning: invalid CSR `htimedeltah', needs rv32i extension +.*Warning: invalid CSR `htimedeltah', needs `h' extension .*Warning: invalid CSR `htimedeltah', needs rv32i extension +.*Warning: invalid CSR `htimedeltah', needs `h' extension +.*Warning: invalid CSR `vsstatus', needs `h' extension +.*Warning: invalid CSR `vsstatus', needs `h' extension +.*Warning: invalid CSR `vsie', needs `h' extension +.*Warning: invalid CSR `vsie', needs `h' extension +.*Warning: invalid CSR `vstvec', needs `h' extension +.*Warning: invalid CSR `vstvec', needs `h' extension +.*Warning: invalid CSR `vsscratch', needs `h' extension +.*Warning: invalid CSR `vsscratch', needs `h' extension +.*Warning: invalid CSR `vsepc', needs `h' extension +.*Warning: invalid CSR `vsepc', needs `h' extension +.*Warning: invalid CSR `vscause', needs `h' extension +.*Warning: invalid CSR `vscause', needs `h' extension +.*Warning: invalid CSR `vstval', needs `h' extension +.*Warning: invalid CSR `vstval', needs `h' extension +.*Warning: invalid CSR `vsip', needs `h' extension +.*Warning: invalid CSR `vsip', needs `h' extension +.*Warning: invalid CSR `vsatp', needs `h' extension +.*Warning: invalid CSR `vsatp', needs `h' extension .*Warning: invalid CSR `ubadaddr' for the privileged spec `1.12' .*Warning: invalid CSR `ubadaddr' for the privileged spec `1.12' .*Warning: invalid CSR `sbadaddr' for the privileged spec `1.12' diff --git a/gas/testsuite/gas/riscv/csr-version-1p9p1.d b/gas/testsuite/gas/riscv/csr-version-1p9p1.d index d0841df..cf9479d 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p9p1.d +++ b/gas/testsuite/gas/riscv/csr-version-1p9p1.d @@ -551,56 +551,56 @@ Disassembly of section .text: [ ]+[0-9a-f]+:[ ]+33e59073[ ]+csrw[ ]+mhpmevent30,a1 [ ]+[0-9a-f]+:[ ]+33f02573[ ]+csrr[ ]+a0,mhpmevent31 [ ]+[0-9a-f]+:[ ]+33f59073[ ]+csrw[ ]+mhpmevent31,a1 -[ ]+[0-9a-f]+:[ ]+60002573[ ]+csrr[ ]+a0,0x600 -[ ]+[0-9a-f]+:[ ]+60059073[ ]+csrw[ ]+0x600,a1 -[ ]+[0-9a-f]+:[ ]+60202573[ ]+csrr[ ]+a0,0x602 -[ ]+[0-9a-f]+:[ ]+60259073[ ]+csrw[ ]+0x602,a1 -[ ]+[0-9a-f]+:[ ]+60302573[ ]+csrr[ ]+a0,0x603 -[ ]+[0-9a-f]+:[ ]+60359073[ ]+csrw[ ]+0x603,a1 -[ ]+[0-9a-f]+:[ ]+60402573[ ]+csr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h,a1 +[ ]+[0-9a-f]+:[ ]+68002573[ ]+csrr[ ]+a0,hgatp +[ ]+[0-9a-f]+:[ ]+68059073[ ]+csrw[ ]+hgatp,a1 +[ ]+[0-9a-f]+:[ ]+60502573[ ]+csrr[ ]+a0,htimedelta +[ ]+[0-9a-f]+:[ ]+60559073[ ]+csrw[ ]+htimedelta,a1 +[ ]+[0-9a-f]+:[ ]+61502573[ ]+csrr[ ]+a0,htimedeltah +[ ]+[0-9a-f]+:[ ]+61559073[ ]+csrw[ ]+htimedeltah,a1 +[ ]+[0-9a-f]+:[ ]+20002573[ ]+csrr[ ]+a0,vsstatus +[ ]+[0-9a-f]+:[ ]+20059073[ ]+csrw[ ]+vsstatus,a1 +[ ]+[0-9a-f]+:[ ]+20402573[ ]+csrr[ ]+a0,vsie +[ ]+[0-9a-f]+:[ ]+20459073[ ]+csrw[ ]+vsie,a1 +[ ]+[0-9a-f]+:[ ]+20502573[ ]+csrr[ ]+a0,vstvec +[ ]+[0-9a-f]+:[ ]+20559073[ ]+csrw[ ]+vstvec,a1 +[ ]+[0-9a-f]+:[ ]+24002573[ ]+csrr[ ]+a0,vsscratch +[ ]+[0-9a-f]+:[ ]+24059073[ ]+csrw[ ]+vsscratch,a1 +[ ]+[0-9a-f]+:[ ]+24102573[ ]+csrr[ ]+a0,vsepc +[ ]+[0-9a-f]+:[ ]+24159073[ ]+csrw[ ]+vsepc,a1 +[ ]+[0-9a-f]+:[ ]+24202573[ ]+csrr[ ]+a0,vscause +[ ]+[0-9a-f]+:[ ]+24259073[ ]+csrw[ ]+vscause,a1 +[ ]+[0-9a-f]+:[ ]+24302573[ ]+csrr[ ]+a0,vstval +[ ]+[0-9a-f]+:[ ]+24359073[ ]+csrw[ ]+vstval,a1 +[ ]+[0-9a-f]+:[ ]+24402573[ ]+csrr[ ]+a0,vsip +[ ]+[0-9a-f]+:[ ]+24459073[ ]+csrw[ ]+vsip,a1 +[ ]+[0-9a-f]+:[ ]+28002573[ ]+csrr[ ]+a0,vsatp +[ ]+[0-9a-f]+:[ ]+28059073[ ]+csrw[ ]+vsatp,a1 [ ]+[0-9a-f]+:[ ]+04302573[ ]+csrr[ ]+a0,ubadaddr [ ]+[0-9a-f]+:[ ]+04359073[ ]+csrw[ ]+ubadaddr,a1 [ ]+[0-9a-f]+:[ ]+14302573[ ]+csrr[ ]+a0,sbadaddr diff --git a/gas/testsuite/gas/riscv/csr-version-1p9p1.l b/gas/testsuite/gas/riscv/csr-version-1p9p1.l index 340216e..b431697 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p9p1.l +++ b/gas/testsuite/gas/riscv/csr-version-1p9p1.l @@ -406,61 +406,61 @@ .*Warning: invalid CSR `mhpmcounter31h', needs rv32i extension .*Warning: invalid CSR `mcountinhibit' for the privileged spec `1.9.1' .*Warning: invalid CSR `mcountinhibit' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hstatus' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hstatus' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hedeleg' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hedeleg' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hideleg' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hideleg' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hie' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hie' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hcounteren' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hcounteren' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hgeie' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hgeie' for the privileged spec `1.9.1' -.*Warning: invalid CSR `htval' for the privileged spec `1.9.1' -.*Warning: invalid CSR `htval' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hip' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hip' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hvip' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hvip' for the privileged spec `1.9.1' -.*Warning: invalid CSR `htinst' for the privileged spec `1.9.1' -.*Warning: invalid CSR `htinst' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hgeip' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hgeip' for the privileged spec `1.9.1' +.*Warning: invalid CSR `hstatus', needs `h' extension +.*Warning: invalid CSR `hstatus', needs `h' extension +.*Warning: invalid CSR `hedeleg', needs `h' extension +.*Warning: invalid CSR `hedeleg', needs `h' extension +.*Warning: invalid CSR `hideleg', needs `h' extension +.*Warning: invalid CSR `hideleg', needs `h' extension +.*Warning: invalid CSR `hie', needs `h' extension +.*Warning: invalid CSR `hie', needs `h' extension +.*Warning: invalid CSR `hcounteren', needs `h' extension +.*Warning: invalid CSR `hcounteren', needs `h' extension +.*Warning: invalid CSR `hgeie', needs `h' extension +.*Warning: invalid CSR `hgeie', needs `h' extension +.*Warning: invalid CSR `htval', needs `h' extension +.*Warning: invalid CSR `htval', needs `h' extension +.*Warning: invalid CSR `hip', needs `h' extension +.*Warning: invalid CSR `hip', needs `h' extension +.*Warning: invalid CSR `hvip', needs `h' extension +.*Warning: invalid CSR `hvip', needs `h' extension +.*Warning: invalid CSR `htinst', needs `h' extension +.*Warning: invalid CSR `htinst', needs `h' extension +.*Warning: invalid CSR `hgeip', needs `h' extension +.*Warning: invalid CSR `hgeip', needs `h' extension .*Warning: read-only CSR is written `csrw hgeip,a1' -.*Warning: invalid CSR `henvcfg' for the privileged spec `1.9.1' -.*Warning: invalid CSR `henvcfg' for the privileged spec `1.9.1' +.*Warning: invalid CSR `henvcfg', needs `h' extension +.*Warning: invalid CSR `henvcfg', needs `h' extension .*Warning: invalid CSR `henvcfgh', needs rv32i extension -.*Warning: invalid CSR `henvcfgh' for the privileged spec `1.9.1' +.*Warning: invalid CSR `henvcfgh', needs `h' extension .*Warning: invalid CSR `henvcfgh', needs rv32i extension -.*Warning: invalid CSR `henvcfgh' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hgatp' for the privileged spec `1.9.1' -.*Warning: invalid CSR `hgatp' for the privileged spec `1.9.1' -.*Warning: invalid CSR `htimedelta' for the privileged spec `1.9.1' -.*Warning: invalid CSR `htimedelta' for the privileged spec `1.9.1' +.*Warning: invalid CSR `henvcfgh', needs `h' extension +.*Warning: invalid CSR `hgatp', needs `h' extension +.*Warning: invalid CSR `hgatp', needs `h' extension +.*Warning: invalid CSR `htimedelta', needs `h' extension +.*Warning: invalid CSR `htimedelta', needs `h' extension .*Warning: invalid CSR `htimedeltah', needs rv32i extension -.*Warning: invalid CSR `htimedeltah' for the privileged spec `1.9.1' +.*Warning: invalid CSR `htimedeltah', needs `h' extension .*Warning: invalid CSR `htimedeltah', needs rv32i extension -.*Warning: invalid CSR `htimedeltah' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vsstatus' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vsstatus' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vsie' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vsie' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vstvec' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vstvec' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vsscratch' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vsscratch' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vsepc' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vsepc' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vscause' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vscause' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vstval' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vstval' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vsip' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vsip' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vsatp' for the privileged spec `1.9.1' -.*Warning: invalid CSR `vsatp' for the privileged spec `1.9.1' +.*Warning: invalid CSR `htimedeltah', needs `h' extension +.*Warning: invalid CSR `vsstatus', needs `h' extension +.*Warning: invalid CSR `vsstatus', needs `h' extension +.*Warning: invalid CSR `vsie', needs `h' extension +.*Warning: invalid CSR `vsie', needs `h' extension +.*Warning: invalid CSR `vstvec', needs `h' extension +.*Warning: invalid CSR `vstvec', needs `h' extension +.*Warning: invalid CSR `vsscratch', needs `h' extension +.*Warning: invalid CSR `vsscratch', needs `h' extension +.*Warning: invalid CSR `vsepc', needs `h' extension +.*Warning: invalid CSR `vsepc', needs `h' extension +.*Warning: invalid CSR `vscause', needs `h' extension +.*Warning: invalid CSR `vscause', needs `h' extension +.*Warning: invalid CSR `vstval', needs `h' extension +.*Warning: invalid CSR `vstval', needs `h' extension +.*Warning: invalid CSR `vsip', needs `h' extension +.*Warning: invalid CSR `vsip', needs `h' extension +.*Warning: invalid CSR `vsatp', needs `h' extension +.*Warning: invalid CSR `vsatp', needs `h' extension .*Warning: invalid CSR `utval' for the privileged spec `1.9.1' .*Warning: invalid CSR `utval' for the privileged spec `1.9.1' .*Warning: invalid CSR `fflags', needs `f' extension diff --git a/gas/testsuite/gas/riscv/h-ext-32.d b/gas/testsuite/gas/riscv/h-ext-32.d index 4328ba7..9b1ec6e 100644 --- a/gas/testsuite/gas/riscv/h-ext-32.d +++ b/gas/testsuite/gas/riscv/h-ext-32.d @@ -1,4 +1,4 @@ -#as: -march=rv32i +#as: -march=rv32ih #source: h-ext-32.s #objdump: -d diff --git a/gas/testsuite/gas/riscv/h-ext-64.d b/gas/testsuite/gas/riscv/h-ext-64.d index eb1444b..646a664 100644 --- a/gas/testsuite/gas/riscv/h-ext-64.d +++ b/gas/testsuite/gas/riscv/h-ext-64.d @@ -1,4 +1,4 @@ -#as: -march=rv64i +#as: -march=rv64ih #source: h-ext-64.s #objdump: -d diff --git a/gas/testsuite/gas/riscv/march-fail-single-prefix-h.d b/gas/testsuite/gas/riscv/march-fail-single-prefix-h.d deleted file mode 100644 index eb101bd..0000000 --- a/gas/testsuite/gas/riscv/march-fail-single-prefix-h.d +++ /dev/null @@ -1,3 +0,0 @@ -#as: -march=rv32ih -#source: empty.s -#error_output: march-fail-single-prefix.l diff --git a/gas/testsuite/gas/riscv/march-fail-unknown-h.d b/gas/testsuite/gas/riscv/march-fail-unknown-h.d deleted file mode 100644 index b0b8323..0000000 --- a/gas/testsuite/gas/riscv/march-fail-unknown-h.d +++ /dev/null @@ -1,3 +0,0 @@ -#as: -march=rv32ihfoo2p0 -#source: empty.s -#error_output: march-fail-unknown.l diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h index 2e86796..207215b 100644 --- a/include/opcode/riscv-opc.h +++ b/include/opcode/riscv-opc.h @@ -3072,31 +3072,31 @@ DECLARE_CSR(mhpmevent29, CSR_MHPMEVENT29, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PR DECLARE_CSR(mhpmevent30, CSR_MHPMEVENT30, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_DRAFT) DECLARE_CSR(mhpmevent31, CSR_MHPMEVENT31, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_DRAFT) /* Privileged Hypervisor CSRs. */ -DECLARE_CSR(hstatus, CSR_HSTATUS, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(hedeleg, CSR_HEDELEG, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(hideleg, CSR_HIDELEG, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(hie, CSR_HIE, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(hcounteren, CSR_HCOUNTEREN, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(hgeie, CSR_HGEIE, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(htval, CSR_HTVAL, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(hip, CSR_HIP, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(hvip, CSR_HVIP, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(htinst, CSR_HTINST, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(hgeip, CSR_HGEIP, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(henvcfg, CSR_HENVCFG, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(henvcfgh, CSR_HENVCFGH, CSR_CLASS_I_32, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(hgatp, CSR_HGATP, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(htimedelta, CSR_HTIMEDELTA, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(htimedeltah, CSR_HTIMEDELTAH, CSR_CLASS_I_32, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(vsstatus, CSR_VSSTATUS, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(vsie, CSR_VSIE, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(vstvec, CSR_VSTVEC, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(vsscratch, CSR_VSSCRATCH, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(vsepc, CSR_VSEPC, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(vscause, CSR_VSCAUSE, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(vstval, CSR_VSTVAL, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(vsip, CSR_VSIP, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) -DECLARE_CSR(vsatp, CSR_VSATP, CSR_CLASS_I, PRIV_SPEC_CLASS_1P12, PRIV_SPEC_CLASS_DRAFT) +DECLARE_CSR(hstatus, CSR_HSTATUS, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(hedeleg, CSR_HEDELEG, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(hideleg, CSR_HIDELEG, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(hie, CSR_HIE, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(hcounteren, CSR_HCOUNTEREN, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(hgeie, CSR_HGEIE, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(htval, CSR_HTVAL, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(hip, CSR_HIP, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(hvip, CSR_HVIP, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(htinst, CSR_HTINST, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(hgeip, CSR_HGEIP, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(henvcfg, CSR_HENVCFG, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(henvcfgh, CSR_HENVCFGH, CSR_CLASS_H_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(hgatp, CSR_HGATP, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(htimedelta, CSR_HTIMEDELTA, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(htimedeltah, CSR_HTIMEDELTAH, CSR_CLASS_H_32, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(vsstatus, CSR_VSSTATUS, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(vsie, CSR_VSIE, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(vstvec, CSR_VSTVEC, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(vsscratch, CSR_VSSCRATCH, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(vsepc, CSR_VSEPC, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(vscause, CSR_VSCAUSE, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(vstval, CSR_VSTVAL, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(vsip, CSR_VSIP, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) +DECLARE_CSR(vsatp, CSR_VSATP, CSR_CLASS_H, PRIV_SPEC_CLASS_NONE, PRIV_SPEC_CLASS_NONE) /* Dropped CSRs. */ DECLARE_CSR(mbase, CSR_MBASE, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P10) DECLARE_CSR(mbound, CSR_MBOUND, CSR_CLASS_I, PRIV_SPEC_CLASS_1P9P1, PRIV_SPEC_CLASS_1P10) diff --git a/include/opcode/riscv.h b/include/opcode/riscv.h index f0becea..808f05f 100644 --- a/include/opcode/riscv.h +++ b/include/opcode/riscv.h @@ -395,6 +395,7 @@ enum riscv_insn_class INSN_CLASS_ZICBOM, INSN_CLASS_ZICBOP, INSN_CLASS_ZICBOZ, + INSN_CLASS_H, }; /* This structure holds information for a particular instruction. */ diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c index 6355f80..d5cedbe 100644 --- a/opcodes/riscv-opc.c +++ b/opcodes/riscv-opc.c @@ -1805,25 +1805,25 @@ const struct riscv_opcode riscv_opcodes[] = {"hinval.gvma", 0, INSN_CLASS_SVINVAL, "s,t", MATCH_HINVAL_GVMA, MASK_HINVAL_GVMA, match_opcode, 0 }, /* Hypervisor instructions. */ -{"hfence.vvma", 0, INSN_CLASS_I, "", MATCH_HFENCE_VVMA, MASK_HFENCE_VVMA|MASK_RS1|MASK_RS2, match_opcode, INSN_ALIAS }, -{"hfence.vvma", 0, INSN_CLASS_I, "s", MATCH_HFENCE_VVMA, MASK_HFENCE_VVMA|MASK_RS2, match_opcode, INSN_ALIAS }, -{"hfence.vvma", 0, INSN_CLASS_I, "s,t", MATCH_HFENCE_VVMA, MASK_HFENCE_VVMA, match_opcode, 0 }, -{"hfence.gvma", 0, INSN_CLASS_I, "", MATCH_HFENCE_GVMA, MASK_HFENCE_GVMA|MASK_RS1|MASK_RS2, match_opcode, INSN_ALIAS }, -{"hfence.gvma", 0, INSN_CLASS_I, "s", MATCH_HFENCE_GVMA, MASK_HFENCE_GVMA|MASK_RS2, match_opcode, INSN_ALIAS }, -{"hfence.gvma", 0, INSN_CLASS_I, "s,t", MATCH_HFENCE_GVMA, MASK_HFENCE_GVMA, match_opcode, 0 }, -{"hlv.b", 0, INSN_CLASS_I, "d,0(s)", MATCH_HLV_B, MASK_HLV_B, match_opcode, INSN_DREF|INSN_1_BYTE }, -{"hlv.bu", 0, INSN_CLASS_I, "d,0(s)", MATCH_HLV_BU, MASK_HLV_BU, match_opcode, INSN_DREF|INSN_1_BYTE }, -{"hlv.h", 0, INSN_CLASS_I, "d,0(s)", MATCH_HLV_H, MASK_HLV_H, match_opcode, INSN_DREF|INSN_2_BYTE }, -{"hlv.hu", 0, INSN_CLASS_I, "d,0(s)", MATCH_HLV_HU, MASK_HLV_HU, match_opcode, INSN_DREF|INSN_2_BYTE }, -{"hlvx.hu", 0, INSN_CLASS_I, "d,0(s)", MATCH_HLVX_HU, MASK_HLVX_HU, match_opcode, INSN_DREF|INSN_2_BYTE }, -{"hlv.w", 0, INSN_CLASS_I, "d,0(s)", MATCH_HLV_W, MASK_HLV_W, match_opcode, INSN_DREF|INSN_4_BYTE }, -{"hlv.wu", 64, INSN_CLASS_I, "d,0(s)", MATCH_HLV_WU, MASK_HLV_WU, match_opcode, INSN_DREF|INSN_4_BYTE }, -{"hlvx.wu", 0, INSN_CLASS_I, "d,0(s)", MATCH_HLVX_WU, MASK_HLVX_WU, match_opcode, INSN_DREF|INSN_4_BYTE }, -{"hlv.d", 64, INSN_CLASS_I, "d,0(s)", MATCH_HLV_D, MASK_HLV_D, match_opcode, INSN_DREF|INSN_8_BYTE }, -{"hsv.b", 0, INSN_CLASS_I, "t,0(s)", MATCH_HSV_B, MASK_HSV_B, match_opcode, INSN_DREF|INSN_1_BYTE }, -{"hsv.h", 0, INSN_CLASS_I, "t,0(s)", MATCH_HSV_H, MASK_HSV_H, match_opcode, INSN_DREF|INSN_2_BYTE }, -{"hsv.w", 0, INSN_CLASS_I, "t,0(s)", MATCH_HSV_W, MASK_HSV_W, match_opcode, INSN_DREF|INSN_4_BYTE }, -{"hsv.d", 64, INSN_CLASS_I, "t,0(s)", MATCH_HSV_D, MASK_HSV_D, match_opcode, INSN_DREF|INSN_8_BYTE }, +{"hfence.vvma", 0, INSN_CLASS_H, "", MATCH_HFENCE_VVMA, MASK_HFENCE_VVMA|MASK_RS1|MASK_RS2, match_opcode, INSN_ALIAS }, +{"hfence.vvma", 0, INSN_CLASS_H, "s", MATCH_HFENCE_VVMA, MASK_HFENCE_VVMA|MASK_RS2, match_opcode, INSN_ALIAS }, +{"hfence.vvma", 0, INSN_CLASS_H, "s,t", MATCH_HFENCE_VVMA, MASK_HFENCE_VVMA, match_opcode, 0 }, +{"hfence.gvma", 0, INSN_CLASS_H, "", MATCH_HFENCE_GVMA, MASK_HFENCE_GVMA|MASK_RS1|MASK_RS2, match_opcode, INSN_ALIAS }, +{"hfence.gvma", 0, INSN_CLASS_H, "s", MATCH_HFENCE_GVMA, MASK_HFENCE_GVMA|MASK_RS2, match_opcode, INSN_ALIAS }, +{"hfence.gvma", 0, INSN_CLASS_H, "s,t", MATCH_HFENCE_GVMA, MASK_HFENCE_GVMA, match_opcode, 0 }, +{"hlv.b", 0, INSN_CLASS_H, "d,0(s)", MATCH_HLV_B, MASK_HLV_B, match_opcode, INSN_DREF|INSN_1_BYTE }, +{"hlv.bu", 0, INSN_CLASS_H, "d,0(s)", MATCH_HLV_BU, MASK_HLV_BU, match_opcode, INSN_DREF|INSN_1_BYTE }, +{"hlv.h", 0, INSN_CLASS_H, "d,0(s)", MATCH_HLV_H, MASK_HLV_H, match_opcode, INSN_DREF|INSN_2_BYTE }, +{"hlv.hu", 0, INSN_CLASS_H, "d,0(s)", MATCH_HLV_HU, MASK_HLV_HU, match_opcode, INSN_DREF|INSN_2_BYTE }, +{"hlvx.hu", 0, INSN_CLASS_H, "d,0(s)", MATCH_HLVX_HU, MASK_HLVX_HU, match_opcode, INSN_DREF|INSN_2_BYTE }, +{"hlv.w", 0, INSN_CLASS_H, "d,0(s)", MATCH_HLV_W, MASK_HLV_W, match_opcode, INSN_DREF|INSN_4_BYTE }, +{"hlv.wu", 64, INSN_CLASS_H, "d,0(s)", MATCH_HLV_WU, MASK_HLV_WU, match_opcode, INSN_DREF|INSN_4_BYTE }, +{"hlvx.wu", 0, INSN_CLASS_H, "d,0(s)", MATCH_HLVX_WU, MASK_HLVX_WU, match_opcode, INSN_DREF|INSN_4_BYTE }, +{"hlv.d", 64, INSN_CLASS_H, "d,0(s)", MATCH_HLV_D, MASK_HLV_D, match_opcode, INSN_DREF|INSN_8_BYTE }, +{"hsv.b", 0, INSN_CLASS_H, "t,0(s)", MATCH_HSV_B, MASK_HSV_B, match_opcode, INSN_DREF|INSN_1_BYTE }, +{"hsv.h", 0, INSN_CLASS_H, "t,0(s)", MATCH_HSV_H, MASK_HSV_H, match_opcode, INSN_DREF|INSN_2_BYTE }, +{"hsv.w", 0, INSN_CLASS_H, "t,0(s)", MATCH_HSV_W, MASK_HSV_W, match_opcode, INSN_DREF|INSN_4_BYTE }, +{"hsv.d", 64, INSN_CLASS_H, "t,0(s)", MATCH_HSV_D, MASK_HSV_D, match_opcode, INSN_DREF|INSN_8_BYTE }, /* Terminate the list. */ {0, 0, INSN_CLASS_NONE, 0, 0, 0, 0, 0} -- 2.7.4