diff options
author | Jose E. Marchesi <jose.marchesi@oracle.com> | 2015-08-25 17:16:34 +0200 |
---|---|---|
committer | Jose E. Marchesi <jose.marchesi@oracle.com> | 2015-08-25 17:16:34 +0200 |
commit | 38074311927d012e4cbd28d825878974c9209f77 (patch) | |
tree | 7ab803b01324f35feb7699f5e81eb259fcaa6fd7 /opcodes/sparc-dis.c | |
parent | dfe7f77c4aae3376c175d8af4d477124c8817427 (diff) | |
download | fsf-binutils-gdb-38074311927d012e4cbd28d825878974c9209f77.zip fsf-binutils-gdb-38074311927d012e4cbd28d825878974c9209f77.tar.gz fsf-binutils-gdb-38074311927d012e4cbd28d825878974c9209f77.tar.bz2 |
Support for the sparc %pmcdper privileged register.
opcodes/ChangeLog:
2015-08-25 Jose E. Marchesi <jose.marchesi@oracle.com>
* sparc-dis.c (print_insn_sparc): Handle the privileged register
%pmcdper.
gas/ChangeLog:
2015-08-25 Jose E. Marchesi <jose.marchesi@oracle.com>
* config/tc-sparc.c (priv_reg_table): New privileged register
%pmcdper.
gas/testsuite/ChangeLog:
2015-08-25 Jose E. Marchesi <jose.marchesi@oracle.com>
* gas/sparc/wrpr.s: Test writing to the privileged %pmcdper
register.
* gas/sparc/wrpr.d: ...and the expected result.
* gas/sparc/rdpr.s: Test reading from the privileged %pmcdper
register.
* gas/sparc/rdpr.d: ...and the expected result.
Diffstat (limited to 'opcodes/sparc-dis.c')
-rw-r--r-- | opcodes/sparc-dis.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/opcodes/sparc-dis.c b/opcodes/sparc-dis.c index 5247526..a2e77f0 100644 --- a/opcodes/sparc-dis.c +++ b/opcodes/sparc-dis.c @@ -86,7 +86,7 @@ static char *v9_priv_reg_names[] = "tpc", "tnpc", "tstate", "tt", "tick", "tba", "pstate", "tl", "pil", "cwp", "cansave", "canrestore", "cleanwin", "otherwin", "wstate", "fq", "gl" - /* "ver" - special cased */ + /* "ver" and "pmcdper" - special cased */ }; /* These are ordered according to there register number in @@ -813,6 +813,8 @@ print_insn_sparc (bfd_vma memaddr, disassemble_info *info) case '?': if (X_RS1 (insn) == 31) (*info->fprintf_func) (stream, "%%ver"); + else if (X_RS1 (insn) == 23) + (*info->fprintf_func) (stream, "%%pmcdper"); else if ((unsigned) X_RS1 (insn) < 17) (*info->fprintf_func) (stream, "%%%s", v9_priv_reg_names[X_RS1 (insn)]); @@ -821,7 +823,9 @@ print_insn_sparc (bfd_vma memaddr, disassemble_info *info) break; case '!': - if ((unsigned) X_RD (insn) < 17) + if (X_RD (insn) == 23) + (*info->fprintf_func) (stream, "%%pmcdper"); + else if ((unsigned) X_RD (insn) < 17) (*info->fprintf_func) (stream, "%%%s", v9_priv_reg_names[X_RD (insn)]); else |