[committed] Fix inconsistent register names in hppa disassembly

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[committed] Fix inconsistent register names in hppa disassembly

John David Anglin-4
Grant Grundler noticed that we used "%r2" in the disassembly of "b,l"
instructions as the link register name but "rp" everywhere else.  We
also don't print '%' before registers names.  So, I've fixed a few
special cases where this was done.

Tested on hppa2.0w-hp-hpux11.11 and hppa64-hp-hpux11.11.

Dave
--
J. David Anglin                                  [hidden email]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2005-08-13  John David Anglin  <[hidden email]>

        * hppa-dis.c (print_insn_hppa): Don't print '%' before register names.
        Use "rp" instead of "%r2" in "b,l" insns.

Index: hppa-dis.c
===================================================================
RCS file: /cvs/src/src/opcodes/hppa-dis.c,v
retrieving revision 1.47
diff -u -3 -p -r1.47 hppa-dis.c
--- hppa-dis.c 5 Aug 2005 17:52:06 -0000 1.47
+++ hppa-dis.c 14 Aug 2005 00:45:14 -0000
@@ -952,12 +952,12 @@ print_insn_hppa (bfd_vma memaddr, disass
 
  case 'Z':
   /* addil %r1 implicit output.  */
-  (*info->fprintf_func) (info->stream, "%%r1");
+  fputs_filtered ("r1", info);
   break;
 
  case 'Y':
   /* be,l %sr0,%r31 implicit output.  */
-  (*info->fprintf_func) (info->stream, "%%sr0,%%r31");
+  fputs_filtered ("sr0,r31", info);
   break;
 
  case '@':
@@ -973,7 +973,7 @@ print_insn_hppa (bfd_vma memaddr, disass
  GET_FIELD (insn, 22, 25));
   break;
  case '!':
-  (*info->fprintf_func) (info->stream, "%%sar");
+  fputs_filtered ("sar", info);
   break;
  case 'p':
   (*info->fprintf_func) (info->stream, "%d",
@@ -1219,7 +1219,7 @@ print_insn_hppa (bfd_vma memaddr, disass
     (memaddr + 8 + extract_22 (insn), info);
   break;
  case 'L':
-  fputs_filtered (",%r2", info);
+  fputs_filtered (",rp", info);
   break;
  default:
   (*info->fprintf_func) (info->stream, "%c", *s);