gas: blackfin: fix DBG/DBGCMPLX insn encoding
[deliverable/binutils-gdb.git] / gas / config / tc-mn10200.c
index 9eecf47ea58aeb4cb34b6b42485300b297e659b7..f9bf78b84529a605ccaeafaf94be3fe7aa6799f5 100644 (file)
@@ -1,12 +1,12 @@
 /* tc-mn10200.c -- Assembler code for the Matsushita 10200
    Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-   2005, 2006  Free Software Foundation, Inc.
+   2005, 2006, 2007, 2009  Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
    GAS is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
+   the Free Software Foundation; either version 3, or (at your option)
    any later version.
 
    GAS is distributed in the hope that it will be useful,
@@ -321,39 +321,7 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
 char *
 md_atof (int type, char *litp, int *sizep)
 {
-  int prec;
-  LITTLENUM_TYPE words[4];
-  char *t;
-  int i;
-
-  switch (type)
-    {
-    case 'f':
-      prec = 2;
-      break;
-
-    case 'd':
-      prec = 4;
-      break;
-
-    default:
-      *sizep = 0;
-      return _("bad call to md_atof");
-    }
-
-  t = atof_ieee (input_line_pointer, type, words);
-  if (t)
-    input_line_pointer = t;
-
-  *sizep = prec * 2;
-
-  for (i = prec - 1; i >= 0; i--)
-    {
-      md_number_to_chars (litp, (valueT) words[i], 2);
-      litp += 2;
-    }
-
-  return NULL;
+  return ieee_md_atof (type, litp, sizep, FALSE);
 }
 
 void
@@ -1188,6 +1156,7 @@ keep_going:
     abort ();
 
   /* Write out the instruction.  */
+  dwarf2_emit_insn (0);
   if (relaxable && fc > 0)
     {
       /* On a 64-bit host the size of an 'int' is not the same
@@ -1272,12 +1241,12 @@ keep_going:
       for (i = 0; i < fc; i++)
        {
          const struct mn10200_operand *operand;
+         int reloc_size;
 
          operand = &mn10200_operands[fixups[i].opindex];
          if (fixups[i].reloc != BFD_RELOC_UNUSED)
            {
              reloc_howto_type *reloc_howto;
-             int size;
              int offset;
              fixS *fixP;
 
@@ -1287,14 +1256,14 @@ keep_going:
              if (!reloc_howto)
                abort ();
 
-             size = bfd_get_reloc_size (reloc_howto);
+             reloc_size = bfd_get_reloc_size (reloc_howto);
 
-             if (size < 1 || size > 4)
+             if (reloc_size < 1 || reloc_size > 4)
                abort ();
 
-             offset = 4 - size;
+             offset = 4 - reloc_size;
              fixP = fix_new_exp (frag_now, f - frag_now->fr_literal + offset,
-                                 size,
+                                 reloc_size,
                                  &fixups[i].exp,
                                  reloc_howto->pc_relative,
                                  fixups[i].reloc);
@@ -1303,11 +1272,11 @@ keep_going:
                 next instruction, not from the start of the current
                 instruction.  */
              if (reloc_howto->pc_relative)
-               fixP->fx_offset += size;
+               fixP->fx_offset += reloc_size;
            }
          else
            {
-             int reloc, pcrel, reloc_size, offset;
+             int reloc, pcrel, offset;
              fixS *fixP;
 
              reloc = BFD_RELOC_NONE;
This page took 0.025821 seconds and 4 git commands to generate.