Fix hxtool eating backslash sequences
[qemu] / m68k-dis.c
index dd19558..9978caa 100644 (file)
@@ -7,7 +7,7 @@
 
 #include "dis-asm.h"
 
-/* **** foatformat.h from sourceware.org CVS 2005-08-14.  */
+/* **** floatformat.h from sourceware.org CVS 2005-08-14.  */
 /* IEEE floating point support declarations, for GDB, the GNU Debugger.
    Copyright 1991, 1994, 1995, 1997, 2000, 2003 Free Software Foundation, Inc.
 
@@ -546,13 +546,13 @@ extern const int m68k_numopcodes, m68k_numaliases;
 
 /* Local function prototypes.  */
 
-const char * const fpcr_names[] =
+static const char * const fpcr_names[] =
 {
   "", "%fpiar", "%fpsr", "%fpiar/%fpsr", "%fpcr",
   "%fpiar/%fpcr", "%fpsr/%fpcr", "%fpiar/%fpsr/%fpcr"
 };
 
-static char *const reg_names[] =
+static const char *const reg_names[] =
 {
   "%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",
   "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%fp", "%sp",
@@ -560,8 +560,8 @@ static char *const reg_names[] =
 };
 
 /* Name of register halves for MAC/EMAC.
-   Seperate from reg_names since 'spu', 'fpl' look weird.  */
-static char *const reg_half_names[] =
+   Separate from reg_names since 'spu', 'fpl' look weird.  */
+static const char *const reg_half_names[] =
 {
   "%d0", "%d1", "%d2", "%d3", "%d4", "%d5", "%d6", "%d7",
   "%a0", "%a1", "%a2", "%a3", "%a4", "%a5", "%a6", "%a7",
@@ -991,7 +991,7 @@ print_indexed (int basereg,
               disassemble_info *info)
 {
   int word;
-  static char *const scales[] = { "", ":2", ":4", ":8" };
+  static const char *const scales[] = { "", ":2", ":4", ":8" };
   bfd_vma base_disp;
   bfd_vma outer_disp;
   char buf[40];
@@ -1106,7 +1106,7 @@ print_insn_arg (const char *d,
     {
     case 'c':          /* Cache identifier.  */
       {
-        static char *const cacheFieldName[] = { "nc", "dc", "ic", "bc" };
+        static const char *const cacheFieldName[] = { "nc", "dc", "ic", "bc" };
         val = fetch_arg (buffer, place, 2, info);
         (*info->fprintf_func) (info->stream, cacheFieldName[val]);
         break;
@@ -1157,7 +1157,7 @@ print_insn_arg (const char *d,
        /* FIXME: There's a problem here, different m68k processors call the
           same address different names. This table can't get it right
           because it doesn't know which processor it's disassembling for.  */
-       static const struct { char *name; int value; } names[]
+       static const struct { const char *name; int value; } names[]
          = {{"%sfc", 0x000}, {"%dfc", 0x001}, {"%cacr", 0x002},
             {"%tc",  0x003}, {"%itt0",0x004}, {"%itt1", 0x005},
              {"%dtt0",0x006}, {"%dtt1",0x007}, {"%buscr",0x008},
@@ -1201,7 +1201,7 @@ print_insn_arg (const char *d,
     case 'M':
       if (place == 'h')
        {
-         static char *const scalefactor_name[] = { "<<", ">>" };
+         static const char *const scalefactor_name[] = { "<<", ">>" };
          val = fetch_arg (buffer, place, 1, info);
          (*info->fprintf_func) (info->stream, scalefactor_name[val]);
        }
@@ -1633,7 +1633,7 @@ print_insn_arg (const char *d,
     case '3':
       {
        int val = fetch_arg (buffer, place, 5, info);
-       char *name = 0;
+        const char *name = 0;
 
        switch (val)
          {
@@ -2378,7 +2378,7 @@ const struct m68k_opcode m68k_opcodes[] =
 {"eor", 4,     one(0005174),   one(0177777), "#wSs", m68000up },
 {"eor", 4,     one(0005100),   one(0177700), "#w$s", m68000up },
 {"eor", 2,     one(0130500),   one(0170700), "Dd$s", m68000up },
-               
+
 {"exg", 2,     one(0140500),   one(0170770), "DdDs", m68000up },
 {"exg", 2,     one(0140510),   one(0170770), "AdAs", m68000up },
 {"exg", 2,     one(0140610),   one(0170770), "DdAs", m68000up },
@@ -4011,13 +4011,13 @@ const struct m68k_opcode m68k_opcodes[] =
 {"roxrl", 2,   one(0160260),           one(0170770), "DdDs", m68000up },
 
 {"rtd", 4,     one(0047164),           one(0177777), "#w", m68010up },
-               
+
 {"rte", 2,     one(0047163),           one(0177777), "",   m68000up | mcfisa_a },
-               
+
 {"rtm", 2,     one(0003300),           one(0177760), "Rs", m68020 },
-               
+
 {"rtr", 2,     one(0047167),           one(0177777), "",   m68000up },
-               
+
 {"rts", 2,     one(0047165),           one(0177777), "",   m68000up | mcfisa_a },
 
 {"satsl", 2,   one(0046200),           one(0177770), "Ds", mcfisa_b },
@@ -4561,12 +4561,12 @@ floatformat_i387_ext_is_valid (const struct floatformat *fmt, const char *from)
      zero can it be zero, and then it must be zero.  */
   unsigned long exponent, int_bit;
   const unsigned char *ufrom = (const unsigned char *) from;
-  
+
   exponent = get_field (ufrom, fmt->byteorder, fmt->totalsize,
                        fmt->exp_start, fmt->exp_len);
   int_bit = get_field (ufrom, fmt->byteorder, fmt->totalsize,
                       fmt->man_start, 1);
-  
+
   if ((exponent == 0) != (int_bit == 0))
     return 0;
   else
@@ -4699,7 +4699,7 @@ get_field (const unsigned char *data, enum floatformat_byteorders order,
     }
   return result;
 }
-  
+
 #ifndef min
 #define min(a, b) ((a) < (b) ? (a) : (b))
 #endif