]> oss.titaniummirror.com Git - msp430-binutils.git/blobdiff - gas/config/tc-openrisc.c
Merge commit 'upstream/2.20'
[msp430-binutils.git] / gas / config / tc-openrisc.c
index f8ec6844589cd0e888dda5eaa2a30ebde55711af..981cdfb6a60317fac913b44b13585a18c20a676d 100644 (file)
@@ -1,5 +1,6 @@
 /* tc-openrisc.c -- Assembler for the OpenRISC family.
-   Copyright 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation.
+   Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2009
+   Free Software Foundation.
    Contributed by Johan Rydberg, jrydberg@opencores.org
 
    This file is part of GAS, the GNU Assembler.
@@ -129,7 +130,7 @@ md_assemble (char * str)
 
   if (!insn.insn)
     {
-      as_bad (errmsg);
+      as_bad ("%s", errmsg);
       return;
     }
 
@@ -347,47 +348,7 @@ md_number_to_chars (char * buf, valueT val, int n)
 char *
 md_atof (int type, char * litP, int *  sizeP)
 {
-  int              i;
-  int              prec;
-  LITTLENUM_TYPE   words [MAX_LITTLENUMS];
-  char *           t;
-
-  switch (type)
-    {
-    case 'f':
-    case 'F':
-    case 's':
-    case 'S':
-      prec = 2;
-      break;
-
-    case 'd':
-    case 'D':
-    case 'r':
-    case 'R':
-      prec = 4;
-      break;
-
-   /* FIXME: Some targets allow other format chars for bigger sizes here.  */
-
-    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 (i = 0; i < prec; i++)
-    {
-      md_number_to_chars (litP, (valueT) words[i],
-                         sizeof (LITTLENUM_TYPE));
-      litP += sizeof (LITTLENUM_TYPE);
-    }
-
-  return 0;
+  return ieee_md_atof (type, litP, sizeP, TRUE);
 }
 
 bfd_boolean