opcodes,gas: sparc: fix rdasr,wrasr,rdpr,wrpr,rdhpr,wrhpr insns.
authorJose E. Marchesi <jose.marchesi@oracle.com>
Fri, 17 Jun 2016 09:15:43 +0000 (02:15 -0700)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Fri, 17 Jun 2016 09:15:43 +0000 (02:15 -0700)
commit96074adc6a780c7984645e3e42434be368974737
tree92cdfac6666b5231fee8118f3cd85fac36ea4747
parent7a10c22feb4dfb7e56855033d579338a6258722d
opcodes,gas: sparc: fix rdasr,wrasr,rdpr,wrpr,rdhpr,wrhpr insns.

This patch fixes and expands the definition of the read/write
instructions for ancillary-state, privileged and hyperprivileged
registers in opcodes.

It also adds support for three new v9m hyperprivileged registers:
%hmcdper, %hmcddfr and %hva_mask_nz.

Finally, the patch expands existing tests (and adds several new ones) in
order to cover all the read/write instructions in all its variants.

opcodes/ChangeLog:

2016-06-17  Jose E. Marchesi  <jose.marchesi@oracle.com>

* sparc-opc.c (rdasr): New macro.
(wrasr): Likewise.
(rdpr): Likewise.
(wrpr): Likewise.
(rdhpr): Likewise.
(wrhpr): Likewise.
(sparc_opcodes): Use the macros above to fix and expand the
definition of read/write instructions from/to
asr/privileged/hyperprivileged instructions.
* sparc-dis.c (v9_hpriv_reg_names): Add %hmcdper, %hmcddfr and
%hva_mask_nz.  Prefer softint_set and softint_clear over
set_softint and clear_softint.
(print_insn_sparc): Support %ver in Rd.

gas/ChangeLog:

2016-06-17  Jose E. Marchesi  <jose.marchesi@oracle.com>

* config/tc-sparc.c (hpriv_reg_table): Add registers %hmcdper,
%hmcddfr and %hva_mask_nz.
(sparc_ip): New handling of asr/privileged/hyperprivileged
registers, adapted to the new form of the sparc opcodes table.
* testsuite/gas/sparc/rdasr.s: New file.
* testsuite/gas/sparc/rdasr.d: Likewise.
* testsuite/gas/sparc/wrasr.s: Likewise.
* testsuite/gas/sparc/wrasr.d: Likewise.
* testsuite/gas/sparc/sparc.exp (sparc_elf_setup): Add rdasr and
wrasr tests.
* testsuite/gas/sparc/rdpr.d: Use -Av9m, as some privileged
registers require it.
* testsuite/gas/sparc/wrpr.s: Complete to cover all privileged
registers and write instruction modalities.
* testsuite/gas/sparc/wrpr.d: Likewise.
* testsuite/gas/sparc/rdhpr.s: Likewise for hyperprivileged
registers.
* testsuite/gas/sparc/rdhpr.d: Likewise.
* testsuite/gas/sparc/wrhpr.s: Likewise.
* testsuite/gas/sparc/wrhpr.d: Likewise.
17 files changed:
gas/ChangeLog
gas/config/tc-sparc.c
gas/testsuite/gas/sparc/rdasr.d [new file with mode: 0644]
gas/testsuite/gas/sparc/rdasr.s [new file with mode: 0644]
gas/testsuite/gas/sparc/rdhpr.d
gas/testsuite/gas/sparc/rdhpr.s
gas/testsuite/gas/sparc/rdpr.d
gas/testsuite/gas/sparc/sparc.exp
gas/testsuite/gas/sparc/wrasr.d [new file with mode: 0644]
gas/testsuite/gas/sparc/wrasr.s [new file with mode: 0644]
gas/testsuite/gas/sparc/wrhpr.d
gas/testsuite/gas/sparc/wrhpr.s
gas/testsuite/gas/sparc/wrpr.d
gas/testsuite/gas/sparc/wrpr.s
opcodes/ChangeLog
opcodes/sparc-dis.c
opcodes/sparc-opc.c
This page took 0.025994 seconds and 4 git commands to generate.