Added 'X' format to ARM code.
authorDonald Lindsay <dlindsay@redhat.com>
Tue, 16 Nov 1999 03:37:02 +0000 (03:37 +0000)
committerDonald Lindsay <dlindsay@redhat.com>
Tue, 16 Nov 1999 03:37:02 +0000 (03:37 +0000)
opcodes/ChangeLog
opcodes/arm-dis.c
opcodes/arm-opc.h

index 18a5911a6ece9d806c63478c968e24f5d0c2981b..bdaaef3a09a02042097a72914e3bf0ecec526d23 100644 (file)
@@ -1,3 +1,9 @@
+Mon Nov 15 19:34:58 1999  Donald Lindsay  <dlindsay@cygnus.com>
+
+       * arm-dis.c (print_insn_arm): Added general purpose 'X' format.
+       * arm-opc.h (print_insn_arm): Added comment documenting
+       the 'X' format just added to arm-dis.c.
+
 1999-11-15  Gavin Romig-Koch  <gavin@cygnus.com>
 
        * mips-opc.c (la): Create a version that just uses addiu directly.
index 9687134b84aeb73aff7ffd5354e7ec88190ad54e..9c44bf87e9dfbcecdf048def79c28a579345df69 100644 (file)
@@ -491,6 +491,14 @@ print_insn_arm (pc, info, given)
                                    func (stream, "\t; IMBRange");
                                }
                                break;
+                             case 'X':
+                               {
+                                 long reg;
+                                 reg = given >> bitstart;
+                                 reg &= (2 << (bitend - bitstart)) - 1;
+                                 func (stream, "%01x", reg & 0xf);
+                               }
+                               break;
                              case 'f':
                                {
                                  long reg;
index f49298fb0cd8c1d9a7baf89cdd36c98f014246b5..2ea3e13a44bae683b7feecb0a9da34b7a9f31a97 100644 (file)
@@ -33,6 +33,7 @@ struct thumb_opcode
    %%                  %
    %<bitfield>d                print the bitfield in decimal
    %<bitfield>x                print the bitfield in hex
+   %<bitfield>X                print the bitfield as 1 hex digit without leading "0x"
    %<bitfield>r                print as an ARM register
    %<bitfield>f                print a floating point constant if >7 else a
                        floating point register