Browse Source
gas/ * config/tc-riscv.c (explicit_csr): New static boolean. Used to indicate CSR are explictly used. (riscv_ip): Set explicit_csr to TRUE if any CSR is used. (riscv_write_out_attrs): If we already have set elf priv attributes, then generate them. Otherwise, don't generate them when no CSR are used. * testsuite/gas/riscv/attribute-01.d: Remove the priv attributes. * testsuite/gas/riscv/attribute-02.d: Likewise. * testsuite/gas/riscv/attribute-03.d: Likewise. * testsuite/gas/riscv/attribute-04.d: Likewise. * testsuite/gas/riscv/attribute-05.d: Likewise. * testsuite/gas/riscv/attribute-06.d: Likewise. * testsuite/gas/riscv/attribute-07.d: Likewise. * testsuite/gas/riscv/attribute-08.d: Likewise. * testsuite/gas/riscv/attribute-09.d: Likewise. * testsuite/gas/riscv/attribute-10.d: Likewise. * testsuite/gas/riscv/attribute-unknown.d: Likewise. * testsuite/gas/riscv/attribute-11.s: New testcase. * testsuite/gas/riscv/attribute-11.d: New testcase. The CSR is used, so we should output the ELF priv attributes. * testsuite/gas/riscv/attribute-12.d: New testcase. The CSR is used, so output the priv attributes according to the -mpriv-spec. * testsuite/gas/riscv/attribute-13.d: New testcase. The CSR isn't used, so ignore the -mpriv-spec setting. ld/ * testsuite/ld-riscv-elf/attr-merge-arch-01.d: Likewise. * testsuite/ld-riscv-elf/attr-merge-arch-02.d: Likewise. * testsuite/ld-riscv-elf/attr-merge-arch-03.d: Likewise. * testsuite/ld-riscv-elf/attr-merge-stack-align.d: Likewise. * testsuite/ld-riscv-elf/attr-merge-strict-align-01.d: Likewise. * testsuite/ld-riscv-elf/attr-merge-strict-align-02.d: Likewise. * testsuite/ld-riscv-elf/attr-merge-strict-align-03.d: Likewise. * testsuite/ld-riscv-elf/attr-merge-strict-align-04.d: Likewise. * testsuite/ld-riscv-elf/attr-merge-strict-align-05.d: Likewise. * testsuite/ld-riscv-elf/call-relax.d: Add -mno-arch-attr.binutils-2_35-branch
27 changed files with 75 additions and 57 deletions
@ -0,0 +1,8 @@ |
|||
#as: -march-attr |
|||
#readelf: -A |
|||
#source: attribute-11.s |
|||
Attribute Section: riscv |
|||
File Attributes |
|||
Tag_RISCV_arch: [a-zA-Z0-9_\"].* |
|||
Tag_RISCV_priv_spec: [0-9_\"].* |
|||
#... |
|||
@ -0,0 +1 @@ |
|||
csrr a0, 0x0 |
|||
@ -0,0 +1,9 @@ |
|||
#as: -march-attr -mpriv-spec=1.9.1 |
|||
#readelf: -A |
|||
#source: attribute-11.s |
|||
Attribute Section: riscv |
|||
File Attributes |
|||
Tag_RISCV_arch: [a-zA-Z0-9_\"].* |
|||
Tag_RISCV_priv_spec: 1 |
|||
Tag_RISCV_priv_spec_minor: 9 |
|||
Tag_RISCV_priv_spec_revision: 1 |
|||
@ -0,0 +1,6 @@ |
|||
#as: -march-attr -mpriv-spec=1.9.1 |
|||
#readelf: -A |
|||
#source: empty.s |
|||
Attribute Section: riscv |
|||
File Attributes |
|||
Tag_RISCV_arch: [a-zA-Z0-9_\"].* |
|||
Loading…
Reference in new issue