diff options
author | Tsukasa OI <research_trasio@irq.a4lg.com> | 2022-09-05 07:54:51 +0000 |
---|---|---|
committer | Tsukasa OI <research_trasio@irq.a4lg.com> | 2022-09-09 10:12:13 +0000 |
commit | 1daabcc746e7d2f04ab190b49aec9abb020f29aa (patch) | |
tree | 30c0cd81c436cd6363b27cf0540e80fb9576ba1a | |
parent | 58448ad29c213deb605908096833b191e09745eb (diff) | |
download | fsf-binutils-gdb-1daabcc746e7d2f04ab190b49aec9abb020f29aa.zip fsf-binutils-gdb-1daabcc746e7d2f04ab190b49aec9abb020f29aa.tar.gz fsf-binutils-gdb-1daabcc746e7d2f04ab190b49aec9abb020f29aa.tar.bz2 |
RISC-V: Fix vector CSR requirements
Vector CSRs are also required on smaller vector subsets.
Not only that the most of vector CSRs are general purpose (and must be
accessible for every vector subsets), current minimum vector subset 'Zve32x'
requires fixed point arithmetic, making remaining non-general purpose
(fixed point arithmetic only) CSRs mandatory for such subsets.
So, those CSRs must be accessible from 'Zve32x', not just from 'V'.
This commit fixes this issue which caused CSR accessibility warnings.
gas/ChangeLog:
* config/tc-riscv.c (riscv_csr_address): Change vector CSR
requirement from 'V' to 'Zve32x'.
* testsuite/gas/riscv/csr-version-1p9p1.l: Change vector CSR
requirement from 'V' to 'Zve32x'.
* testsuite/gas/riscv/csr-version-1p10.l: Likewise.
* testsuite/gas/riscv/csr-version-1p11.l: Likewise.
* testsuite/gas/riscv/csr-version-1p12.l: Likewise.
-rw-r--r-- | gas/config/tc-riscv.c | 2 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/csr-version-1p10.l | 28 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/csr-version-1p11.l | 28 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/csr-version-1p12.l | 28 | ||||
-rw-r--r-- | gas/testsuite/gas/riscv/csr-version-1p9p1.l | 28 |
5 files changed, 57 insertions, 57 deletions
diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c index 34ce68e..df2e201 100644 --- a/gas/config/tc-riscv.c +++ b/gas/config/tc-riscv.c @@ -935,7 +935,7 @@ riscv_csr_address (const char *csr_name, extension = "zkr"; break; case CSR_CLASS_V: - extension = "v"; + extension = "zve32x"; break; case CSR_CLASS_SMSTATEEN: case CSR_CLASS_SMSTATEEN_AND_H: diff --git a/gas/testsuite/gas/riscv/csr-version-1p10.l b/gas/testsuite/gas/riscv/csr-version-1p10.l index b778453..999e9af 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p10.l +++ b/gas/testsuite/gas/riscv/csr-version-1p10.l @@ -652,20 +652,20 @@ .*Warning: invalid CSR `fcsr', needs `f' extension .*Warning: invalid CSR `seed', needs `zkr' extension .*Warning: invalid CSR `seed', needs `zkr' extension -.*Warning: invalid CSR `vstart', needs `v' extension -.*Warning: invalid CSR `vstart', needs `v' extension -.*Warning: invalid CSR `vxsat', needs `v' extension -.*Warning: invalid CSR `vxsat', needs `v' extension -.*Warning: invalid CSR `vxrm', needs `v' extension -.*Warning: invalid CSR `vxrm', needs `v' extension -.*Warning: invalid CSR `vcsr', needs `v' extension -.*Warning: invalid CSR `vcsr', needs `v' extension -.*Warning: invalid CSR `vl', needs `v' extension -.*Warning: invalid CSR `vl', needs `v' extension +.*Warning: invalid CSR `vstart', needs `zve32x' extension +.*Warning: invalid CSR `vstart', needs `zve32x' extension +.*Warning: invalid CSR `vxsat', needs `zve32x' extension +.*Warning: invalid CSR `vxsat', needs `zve32x' extension +.*Warning: invalid CSR `vxrm', needs `zve32x' extension +.*Warning: invalid CSR `vxrm', needs `zve32x' extension +.*Warning: invalid CSR `vcsr', needs `zve32x' extension +.*Warning: invalid CSR `vcsr', needs `zve32x' extension +.*Warning: invalid CSR `vl', needs `zve32x' extension +.*Warning: invalid CSR `vl', needs `zve32x' extension .*Warning: read-only CSR is written `csrw vl,a1' -.*Warning: invalid CSR `vtype', needs `v' extension -.*Warning: invalid CSR `vtype', needs `v' extension +.*Warning: invalid CSR `vtype', needs `zve32x' extension +.*Warning: invalid CSR `vtype', needs `zve32x' extension .*Warning: read-only CSR is written `csrw vtype,a1' -.*Warning: invalid CSR `vlenb', needs `v' extension -.*Warning: invalid CSR `vlenb', needs `v' extension +.*Warning: invalid CSR `vlenb', needs `zve32x' extension +.*Warning: invalid CSR `vlenb', needs `zve32x' extension .*Warning: read-only CSR is written `csrw vlenb,a1' diff --git a/gas/testsuite/gas/riscv/csr-version-1p11.l b/gas/testsuite/gas/riscv/csr-version-1p11.l index 78bae81..a099e4e 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p11.l +++ b/gas/testsuite/gas/riscv/csr-version-1p11.l @@ -650,20 +650,20 @@ .*Warning: invalid CSR `fcsr', needs `f' extension .*Warning: invalid CSR `seed', needs `zkr' extension .*Warning: invalid CSR `seed', needs `zkr' extension -.*Warning: invalid CSR `vstart', needs `v' extension -.*Warning: invalid CSR `vstart', needs `v' extension -.*Warning: invalid CSR `vxsat', needs `v' extension -.*Warning: invalid CSR `vxsat', needs `v' extension -.*Warning: invalid CSR `vxrm', needs `v' extension -.*Warning: invalid CSR `vxrm', needs `v' extension -.*Warning: invalid CSR `vcsr', needs `v' extension -.*Warning: invalid CSR `vcsr', needs `v' extension -.*Warning: invalid CSR `vl', needs `v' extension -.*Warning: invalid CSR `vl', needs `v' extension +.*Warning: invalid CSR `vstart', needs `zve32x' extension +.*Warning: invalid CSR `vstart', needs `zve32x' extension +.*Warning: invalid CSR `vxsat', needs `zve32x' extension +.*Warning: invalid CSR `vxsat', needs `zve32x' extension +.*Warning: invalid CSR `vxrm', needs `zve32x' extension +.*Warning: invalid CSR `vxrm', needs `zve32x' extension +.*Warning: invalid CSR `vcsr', needs `zve32x' extension +.*Warning: invalid CSR `vcsr', needs `zve32x' extension +.*Warning: invalid CSR `vl', needs `zve32x' extension +.*Warning: invalid CSR `vl', needs `zve32x' extension .*Warning: read-only CSR is written `csrw vl,a1' -.*Warning: invalid CSR `vtype', needs `v' extension -.*Warning: invalid CSR `vtype', needs `v' extension +.*Warning: invalid CSR `vtype', needs `zve32x' extension +.*Warning: invalid CSR `vtype', needs `zve32x' extension .*Warning: read-only CSR is written `csrw vtype,a1' -.*Warning: invalid CSR `vlenb', needs `v' extension -.*Warning: invalid CSR `vlenb', needs `v' extension +.*Warning: invalid CSR `vlenb', needs `zve32x' extension +.*Warning: invalid CSR `vlenb', needs `zve32x' extension .*Warning: read-only CSR is written `csrw vlenb,a1' diff --git a/gas/testsuite/gas/riscv/csr-version-1p12.l b/gas/testsuite/gas/riscv/csr-version-1p12.l index cb026bb..cf8f2e2 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p12.l +++ b/gas/testsuite/gas/riscv/csr-version-1p12.l @@ -532,20 +532,20 @@ .*Warning: invalid CSR `fcsr', needs `f' extension .*Warning: invalid CSR `seed', needs `zkr' extension .*Warning: invalid CSR `seed', needs `zkr' extension -.*Warning: invalid CSR `vstart', needs `v' extension -.*Warning: invalid CSR `vstart', needs `v' extension -.*Warning: invalid CSR `vxsat', needs `v' extension -.*Warning: invalid CSR `vxsat', needs `v' extension -.*Warning: invalid CSR `vxrm', needs `v' extension -.*Warning: invalid CSR `vxrm', needs `v' extension -.*Warning: invalid CSR `vcsr', needs `v' extension -.*Warning: invalid CSR `vcsr', needs `v' extension -.*Warning: invalid CSR `vl', needs `v' extension -.*Warning: invalid CSR `vl', needs `v' extension +.*Warning: invalid CSR `vstart', needs `zve32x' extension +.*Warning: invalid CSR `vstart', needs `zve32x' extension +.*Warning: invalid CSR `vxsat', needs `zve32x' extension +.*Warning: invalid CSR `vxsat', needs `zve32x' extension +.*Warning: invalid CSR `vxrm', needs `zve32x' extension +.*Warning: invalid CSR `vxrm', needs `zve32x' extension +.*Warning: invalid CSR `vcsr', needs `zve32x' extension +.*Warning: invalid CSR `vcsr', needs `zve32x' extension +.*Warning: invalid CSR `vl', needs `zve32x' extension +.*Warning: invalid CSR `vl', needs `zve32x' extension .*Warning: read-only CSR is written `csrw vl,a1' -.*Warning: invalid CSR `vtype', needs `v' extension -.*Warning: invalid CSR `vtype', needs `v' extension +.*Warning: invalid CSR `vtype', needs `zve32x' extension +.*Warning: invalid CSR `vtype', needs `zve32x' extension .*Warning: read-only CSR is written `csrw vtype,a1' -.*Warning: invalid CSR `vlenb', needs `v' extension -.*Warning: invalid CSR `vlenb', needs `v' extension +.*Warning: invalid CSR `vlenb', needs `zve32x' extension +.*Warning: invalid CSR `vlenb', needs `zve32x' extension .*Warning: read-only CSR is written `csrw vlenb,a1' diff --git a/gas/testsuite/gas/riscv/csr-version-1p9p1.l b/gas/testsuite/gas/riscv/csr-version-1p9p1.l index 4fac40f..5f298c1 100644 --- a/gas/testsuite/gas/riscv/csr-version-1p9p1.l +++ b/gas/testsuite/gas/riscv/csr-version-1p9p1.l @@ -678,20 +678,20 @@ .*Warning: invalid CSR `fcsr', needs `f' extension .*Warning: invalid CSR `seed', needs `zkr' extension .*Warning: invalid CSR `seed', needs `zkr' extension -.*Warning: invalid CSR `vstart', needs `v' extension -.*Warning: invalid CSR `vstart', needs `v' extension -.*Warning: invalid CSR `vxsat', needs `v' extension -.*Warning: invalid CSR `vxsat', needs `v' extension -.*Warning: invalid CSR `vxrm', needs `v' extension -.*Warning: invalid CSR `vxrm', needs `v' extension -.*Warning: invalid CSR `vcsr', needs `v' extension -.*Warning: invalid CSR `vcsr', needs `v' extension -.*Warning: invalid CSR `vl', needs `v' extension -.*Warning: invalid CSR `vl', needs `v' extension +.*Warning: invalid CSR `vstart', needs `zve32x' extension +.*Warning: invalid CSR `vstart', needs `zve32x' extension +.*Warning: invalid CSR `vxsat', needs `zve32x' extension +.*Warning: invalid CSR `vxsat', needs `zve32x' extension +.*Warning: invalid CSR `vxrm', needs `zve32x' extension +.*Warning: invalid CSR `vxrm', needs `zve32x' extension +.*Warning: invalid CSR `vcsr', needs `zve32x' extension +.*Warning: invalid CSR `vcsr', needs `zve32x' extension +.*Warning: invalid CSR `vl', needs `zve32x' extension +.*Warning: invalid CSR `vl', needs `zve32x' extension .*Warning: read-only CSR is written `csrw vl,a1' -.*Warning: invalid CSR `vtype', needs `v' extension -.*Warning: invalid CSR `vtype', needs `v' extension +.*Warning: invalid CSR `vtype', needs `zve32x' extension +.*Warning: invalid CSR `vtype', needs `zve32x' extension .*Warning: read-only CSR is written `csrw vtype,a1' -.*Warning: invalid CSR `vlenb', needs `v' extension -.*Warning: invalid CSR `vlenb', needs `v' extension +.*Warning: invalid CSR `vlenb', needs `zve32x' extension +.*Warning: invalid CSR `vlenb', needs `zve32x' extension .*Warning: read-only CSR is written `csrw vlenb,a1' |