Fix C++ build for Cygwin
[deliverable/binutils-gdb.git] / opcodes / m68k-dis.c
index 326e4299904dbb2fa19ba00d2aa463cfca1cf936..11c057d61394edc371814ace91d2ae37c3257e29 100644 (file)
@@ -1,7 +1,5 @@
 /* Print Motorola 68k instructions.
-   Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-   1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
-   Free Software Foundation, Inc.
+   Copyright (C) 1986-2016 Free Software Foundation, Inc.
 
    This file is part of the GNU opcodes library.
 
@@ -81,7 +79,7 @@ static char *const reg_half_names[] =
        return ret_val;                         \
       val = COERCE16 ((p[-2] << 8) + p[-1]);   \
     }                                          \
-  while (0)                                            
+  while (0)
 
 /* Get a 4 byte signed integer.  */
 #define COERCE32(x) ((bfd_signed_vma) ((x) ^ 0x80000000) - 0x80000000)
@@ -161,8 +159,6 @@ static char *const reg_half_names[] =
 /* Maximum length of an instruction.  */
 #define MAXLEN 22
 
-#include <setjmp.h>
-
 struct private
 {
   /* Points to first byte not fetched.  */
@@ -654,7 +650,7 @@ print_insn_arg (const char *d,
       {
         static char *const cacheFieldName[] = { "nc", "dc", "ic", "bc" };
         FETCH_ARG (2, val);
-       (*info->fprintf_func) (info->stream, cacheFieldName[val]);
+       (*info->fprintf_func) (info->stream, "%s", cacheFieldName[val]);
         break;
       }
 
@@ -792,7 +788,7 @@ print_insn_arg (const char *d,
          static char *const scalefactor_name[] = { "<<", ">>" };
 
          FETCH_ARG (1, val);
-         (*info->fprintf_func) (info->stream, scalefactor_name[val]);
+         (*info->fprintf_func) (info->stream, "%s", scalefactor_name[val]);
        }
       else
        {
@@ -1111,7 +1107,7 @@ print_insn_arg (const char *d,
                  return -1;
              }
              if (flt_p)        /* Print a float? */
-               (*info->fprintf_func) (info->stream, "#%g", flval);
+               (*info->fprintf_func) (info->stream, "#0e%g", flval);
              else
                (*info->fprintf_func) (info->stream, "#%d", val);
              break;
@@ -1340,7 +1336,7 @@ match_insn_m68k (bfd_vma memaddr,
 
   if (*args == '.')
     args++;
-  
+
   /* Point at first word of argument data,
      and at descriptor for first argument.  */
   p = buffer + 2;
@@ -1587,7 +1583,7 @@ m68k_scan_mask (bfd_vma memaddr, disassemble_info *info,
        }
     }
   return 0;
-}              
+}
 
 /* Print the m68k instruction at address MEMADDR in debugged memory,
    on INFO->STREAM.  Returns length of the instruction, in bytes.  */
@@ -1626,7 +1622,7 @@ print_insn_m68k (bfd_vma memaddr, disassemble_info *info)
 
   if (val == 0)
     /* Handle undefined instructions.  */
-    info->fprintf_func (info->stream, "0%o", (buffer[0] << 8) + buffer[1]);
+    info->fprintf_func (info->stream, ".short 0x%04x", (buffer[0] << 8) + buffer[1]);
 
   return val ? val : 2;
 }
This page took 0.026423 seconds and 4 git commands to generate.