gas/:
[binutils-gdb.git] / gas / config / tc-ns32k.c
index 1a8c3cb3eea8f3e0bfb54b3c163d6693fc0e46ba..66aeae87178c16d78bb907a9e5f3924131991a7a 100644 (file)
@@ -1,13 +1,13 @@
 /* ns32k.c  -- Assemble on the National Semiconductor 32k series
    Copyright 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2005
+   2001, 2002, 2003, 2005, 2006, 2007
    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,
@@ -22,8 +22,6 @@
 
 /*#define SHOW_NUM 1*//* Uncomment for debugging.  */
 
-#include <stdio.h>
-
 #include "as.h"
 #include "opcode/ns32k.h"
 
@@ -1863,7 +1861,7 @@ convert_iif (void)
                              size = 4;
                            else
                              {
-                               as_bad (_("Displacement to large for :d"));
+                               as_bad (_("Displacement too large for :d"));
                                size = 4;
                              }
                          }
@@ -1915,9 +1913,6 @@ md_begin (void)
   freeptr_static = (char *) malloc (PRIVATE_SIZE);
 }
 
-/* Must be equal to MAX_PRECISON in atof-ieee.c.  */
-#define MAX_LITTLENUMS 6
-
 /* Turn the string pointed to by litP into a floating point constant
    of type TYPE, and emit the appropriate bytes.  The number of
    LITTLENUMS emitted is stored in *SIZEP.  An error message is
@@ -1926,38 +1921,7 @@ md_begin (void)
 char *
 md_atof (int type, char *litP, int *sizeP)
 {
-  int prec;
-  LITTLENUM_TYPE words[MAX_LITTLENUMS];
-  LITTLENUM_TYPE *wordP;
-  char *t;
-
-  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 * sizeof (LITTLENUM_TYPE);
-
-  for (wordP = words + prec; prec--;)
-    {
-      md_number_to_chars (litP, (long) (*--wordP), sizeof (LITTLENUM_TYPE));
-      litP += sizeof (LITTLENUM_TYPE);
-    }
-
-  return 0;
+  return ieee_md_atof (type, litP, sizeP, FALSE);
 }
 \f
 int