From c625f4ed05eb234d6a182201d14b3b1c64232afd Mon Sep 17 00:00:00 2001 From: Nelson Chu Date: Wed, 22 Jun 2022 17:03:16 +0800 Subject: 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. --- 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 - 12 files changed, 361 insertions(+), 309 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 (limited to 'gas') 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]+:[ ]+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]+:[ ]+64359073[ ]+csrw[ ]+0x643,a1 -[ ]+[0-9a-f]+:[ ]+64402573[ ]+csrr[ ]+a0,0x644 -[ ]+[0-9a-f]+:[ ]+64459073[ ]+csrw[ ]+0x644,a1 -[ ]+[0-9a-f]+:[ ]+64502573[ ]+csrr[ ]+a0,0x645 -[ ]+[0-9a-f]+:[ ]+64559073[ ]+csrw[ ]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]+a0,0x241 -[ ]+[0-9a-f]+:[ ]+24159073[ ]+csrw[ ]+0x241,a1 -[ ]+[0-9a-f]+:[ ]+24202573[ ]+csrr[ ]+a0,0x242 -[ ]+[0-9a-f]+:[ ]+24259073[ ]+csrw[ ]+0x242,a1 -[ ]+[0-9a-f]+:[ ]+24302573[ ]+csrr[ ]+a0,0x243 -[ ]+[0-9a-f]+:[ ]+24359073[ ]+csrw[ ]+0x243,a1 -[ ]+[0-9a-f]+:[ ]+24402573[ ]+csrr[ ]+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 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 ]+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]+:[ ]+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]+:[ ]+64359073[ ]+csrw[ ]+0x643,a1 -[ ]+[0-9a-f]+:[ ]+64402573[ ]+csrr[ ]+a0,0x644 -[ ]+[0-9a-f]+:[ ]+64459073[ ]+csrw[ ]+0x644,a1 -[ ]+[0-9a-f]+:[ ]+64502573[ ]+csrr[ ]+a0,0x645 -[ ]+[0-9a-f]+:[ ]+64559073[ ]+csrw[ ]+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+a0,0x241 -[ ]+[0-9a-f]+:[ ]+24159073[ ]+csrw[ ]+0x241,a1 -[ ]+[0-9a-f]+:[ ]+24202573[ ]+csrr[ ]+a0,0x242 -[ ]+[0-9a-f]+:[ ]+24259073[ ]+csrw[ ]+0x242,a1 -[ ]+[0-9a-f]+:[ ]+24302573[ ]+csrr[ ]+a0,0x243 -[ ]+[0-9a-f]+:[ ]+24359073[ ]+csrw[ ]+0x243,a1 -[ ]+[0-9a-f]+:[ ]+24402573[ ]+csrr[ ]+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 +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]+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[ 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 ]+[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,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 -- cgit v1.1