Support for the sparc %pmcdper privileged register.
authorJose E. Marchesi <jose.marchesi@oracle.com>
Tue, 25 Aug 2015 15:16:34 +0000 (17:16 +0200)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Tue, 25 Aug 2015 15:16:34 +0000 (17:16 +0200)
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.

gas/ChangeLog
gas/config/tc-sparc.c
gas/testsuite/ChangeLog
gas/testsuite/gas/sparc/rdpr.d
gas/testsuite/gas/sparc/rdpr.s
gas/testsuite/gas/sparc/wrpr.d
gas/testsuite/gas/sparc/wrpr.s
opcodes/ChangeLog
opcodes/sparc-dis.c

index 3bcd8e6d5279c38a2c005c0a638907abbf432c17..02d94ade14c249cabf489cd1805ad8269522f780 100644 (file)
@@ -1,3 +1,8 @@
+2015-08-25  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+       * config/tc-sparc.c (priv_reg_table): New privileged register
+       %pmcdper.
+
 2015-08-21  Nick Clifton  <nickc@redhat.com>
 
        PR gas/18581
index 6e7a3ef14f6e578c434ba3be0a9482fa512064a7..28e6ec8f6533a8a5016d7a8f19e6dab603731bc7 100644 (file)
@@ -805,6 +805,7 @@ struct priv_reg_entry priv_reg_table[] =
   {"wstate", 14},
   {"fq", 15},
   {"gl", 16},
+  {"pmcdper", 23},
   {"ver", 31},
   {"", -1},                    /* End marker.  */
 };
index 6b85249695835a8395642ac6228d3c497e6d878b..4d4dcbc07506179484cb355603fd85d3efa17489 100644 (file)
@@ -1,3 +1,12 @@
+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.
+
 2015-08-24  Jan Stancek  <jstancek@redhat.com>
 
        * gas/i386/intel.s: Add test of disassembly of a potential
index 6ddc24a4469c9b7ebc617e2b3db870434de35939..58ec2efbcbde59d0c3747f43e5b4a5983f477fe8 100644 (file)
@@ -25,3 +25,4 @@ Disassembly of section .text:
   3c:  a1 53 c0 00     rdpr  %fq, %l0
   40:  a3 54 00 00     rdpr  %gl, %l1
   44:  a5 57 c0 00     rdpr  %ver, %l2
+  48:  a7 55 c0 00     rdpr  %pmcdper, %l3
index 15660359c7a15369b2d4358f5b7d2e9af947dc98..0bf3db8561876aefb2ff41e0f26d7c3048c4a06e 100644 (file)
@@ -18,3 +18,4 @@
        rdpr %fq,%l0
        rdpr %gl,%l1
        rdpr %ver,%l2
+       rdpr %pmcdper,%l3
index d0c1b35a9887f04d1a06c75786a88562c73db66d..5a9b6f9cdc56f0be846d997b8b03f547ac520e6d 100644 (file)
@@ -23,3 +23,4 @@ Disassembly of section .text:
   34:  9b 93 80 00     wrpr  %sp, %otherwin
   38:  9d 93 c0 00     wrpr  %o7, %wstate
   3c:  a1 94 00 00     wrpr  %l0, %gl
+  40:  af 94 c0 00     wrpr  %l3, %pmcdper
index e32b149c9bf899d28c747ecf7f82e79abeaa26b8..a17182e40d78dbb1e7851c4bbbfefe06755c9eca 100644 (file)
@@ -16,3 +16,4 @@
        wrpr %o6,%otherwin
        wrpr %o7,%wstate
        wrpr %l0,%gl
+       wrpr %l3,%pmcdper
index 3529dbc66a12638666a8471c015bbfc5ef81bf45..2a9795eaf4ed987596e0045b4c0b22c501ec7f6a 100644 (file)
@@ -1,3 +1,8 @@
+2015-08-25  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+       * sparc-dis.c (print_insn_sparc): Handle the privileged register
+       %pmcdper.
+
 2015-08-24  Jan Stancek  <jstancek@redhat.com>
 
        * i386-dis.c (print_insn): Fix decoding of three byte operands.
index 5247526e69a87afdce6f127e77b73f6650aba0ad..a2e77f032c671492189b0be7fe448a26267a8308 100644 (file)
@@ -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
This page took 0.030731 seconds and 4 git commands to generate.