Remove duplicate definitions of the md_atof() function
[deliverable/binutils-gdb.git] / gas / config / tc-mn10300.c
index fb7dc58aeccf3f46e9c58556c22f7a84fe924c61..9b2441fa735084e03b7d4af9aa78a479340cb097 100644 (file)
@@ -6,7 +6,7 @@
 
    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,
@@ -711,44 +711,9 @@ md_undefined_symbol (name)
 }
 
 char *
-md_atof (type, litp, sizep)
-     int type;
-     char *litp;
-     int *sizep;
+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
@@ -1019,7 +984,7 @@ md_convert_frag (abfd, sec, fragP)
       int offset = fragP->fr_fix;
       fragP->fr_literal[offset] = 0xcc;
 
-      fix_new (fragP, fragP->fr_fix + 1, 4, fragP->fr_symbol,
+      fix_new (fragP, fragP->fr_fix + 1, 2, fragP->fr_symbol,
               fragP->fr_offset + 1, 1, BFD_RELOC_16_PCREL);
       fragP->fr_var = 0;
       fragP->fr_fix += 3;
@@ -2280,17 +2245,8 @@ keep_going:
                    abort ();
                }
 
-             /* Convert the size of the reloc into what fix_new_exp wants.  */
-             reloc_size = reloc_size / 8;
-             if (reloc_size == 8)
-               reloc_size = 0;
-             else if (reloc_size == 16)
-               reloc_size = 1;
-             else if (reloc_size == 32)
-               reloc_size = 2;
-
              fixP = fix_new_exp (frag_now, f - frag_now->fr_literal + offset,
-                                 reloc_size, &fixups[i].exp, pcrel,
+                                 reloc_size / 8, &fixups[i].exp, pcrel,
                                  ((bfd_reloc_code_real_type) reloc));
 
              if (pcrel)
This page took 0.026688 seconds and 4 git commands to generate.