public inbox for binutils-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] RISC-V: Use single h extension to control hypervisor CSRs and instructions.
@ 2022-06-22 10:28 Nelson Chu
  0 siblings, 0 replies; only message in thread
From: Nelson Chu @ 2022-06-22 10:28 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c625f4ed05eb234d6a182201d14b3b1c64232afd

commit c625f4ed05eb234d6a182201d14b3b1c64232afd
Author: Nelson Chu <nelson.chu@sifive.com>
Date:   Wed Jun 22 17:03:16 2022 +0800

    RISC-V: Use single h extension to control hypervisor CSRs and instructions.
    
    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.

Diff:
---
 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(-)

diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c
index ede69682114..ffc18c97d1e 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 a10ae8e237b..6b04dc98b76 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 6e0d1f6c66a..c39cbf3a223 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]+:[ 	]+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[ 	]+csrr[ 	]+a0,0x604
-[ 	]+[0-9a-f]+:[ 	]+60459073[ 	]+csrw[ 	]+0x604,a1
-[ 	]+[0-9a-f]+:[ 	]+60602573[ 	]+csrr[ 	]+a0,0x606
-[ 	]+[0-9a-f]+:[ 	]+60659073[ 	]+csrw[ 	]+0x606,a1
-[ 	]+[0-9a-f]+:[ 	]+60702573[ 	]+csrr[ 	]+a0,0x607
-[ 	]+[0-9a-f]+:[ 	]+60759073[ 	]+csrw[ 	]+0x607,a1
-[ 	]+[0-9a-f]+:[ 	]+64302573[ 	]+csrr[ 	]+a0,0x643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,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 2511feeafc8..d00bce89f8d 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 0c9166555a4..cfcec35ebd8 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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[ 	]+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 570efe25cb7..d4716a29669 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 03d193cd50e..ab291c53eac 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 d0841df5aba..cf9479db654 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[ 	]+csrr[ 	]+a0,0x604
-[ 	]+[0-9a-f]+:[ 	]+60459073[ 	]+csrw[ 	]+0x604,a1
-[ 	]+[0-9a-f]+:[ 	]+60602573[ 	]+csrr[ 	]+a0,0x606
-[ 	]+[0-9a-f]+:[ 	]+60659073[ 	]+csrw[ 	]+0x606,a1
-[ 	]+[0-9a-f]+:[ 	]+60702573[ 	]+csrr[ 	]+a0,0x607
-[ 	]+[0-9a-f]+:[ 	]+60759073[ 	]+csrw[ 	]+0x607,a1
-[ 	]+[0-9a-f]+:[ 	]+64302573[ 	]+csrr[ 	]+a0,0x643
-[ 	]+[0-9a-f]+:[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+:[ 	]+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 340216e5ca7..b43169719d1 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 4328ba7a899..9b1ec6ee6bb 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 eb1444b874c..646a664837f 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 eb101bd7135..00000000000
--- 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 b0b83231aa4..00000000000
--- 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 2e867965e12..207215b79fc 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 f0beceaec44..808f05f3d7a 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 6355f8059f5..d5cedbe176c 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}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-22 10:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22 10:28 [binutils-gdb] RISC-V: Use single h extension to control hypervisor CSRs and instructions Nelson Chu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).