* config/tc-ppc.c (ppc_setup_opcodes): Tidy. Add code to test
[deliverable/binutils-gdb.git] / gas / config / tc-sh.c
index 8e42b815ff3b702196b564bf00e79ff3b4714263..0d098d2115d3022da43da15c8083c1f9d95bd7d2 100644 (file)
@@ -1,12 +1,12 @@
 /* tc-sh.c -- Assemble code for the Renesas / SuperH SH
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003, 2004, 2005, 2006  Free Software Foundation, Inc.
+   2003, 2004, 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,
@@ -886,7 +886,6 @@ align_test_frag_offset_fixed_p (const fragS *frag1, const fragS *frag2,
 
   return FALSE;
 }
-#endif /* OBJ_ELF */
 
 /* Optimize a difference of symbols which have rs_align_test frag if
    possible.  */
@@ -894,7 +893,6 @@ align_test_frag_offset_fixed_p (const fragS *frag1, const fragS *frag2,
 int
 sh_optimize_expr (expressionS *l, operatorT op, expressionS *r)
 {
-#ifdef OBJ_ELF
   bfd_vma frag_off;
 
   if (op == O_subtract
@@ -915,9 +913,9 @@ sh_optimize_expr (expressionS *l, operatorT op, expressionS *r)
       l->X_add_symbol = 0;
       return 1;
     }
-#endif /* OBJ_ELF */
   return 0;
 }
+#endif /* OBJ_ELF */
 \f
 /* This function is called once, at assembler startup time.  This should
    set up all the tables, etc that the MD part of the assembler needs.  */
@@ -3047,61 +3045,11 @@ md_undefined_symbol (char *name ATTRIBUTE_UNUSED)
 }
 
 /* Various routines to kill one day.  */
-/* Equal to MAX_PRECISION in atof-ieee.c.  */
-#define MAX_LITTLENUMS 6
-
-/* Turn a string in input_line_pointer into a floating point constant
-   of type TYPE, and store the appropriate bytes in *LITP.  The number
-   of LITTLENUMS emitted is stored in *SIZEP .  An error message is
-   returned, or NULL on OK.  */
 
 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;
-
-  if (! target_big_endian)
-    {
-      for (i = prec - 1; i >= 0; i--)
-       {
-         md_number_to_chars (litP, (valueT) words[i], 2);
-         litP += 2;
-       }
-    }
-  else
-    {
-      for (i = 0; i < prec; i++)
-       {
-         md_number_to_chars (litP, (valueT) words[i], 2);
-         litP += 2;
-       }
-    }
-
-  return NULL;
+  return ieee_md_atof (type, litP, sizeP, target_big_endian);
 }
 
 /* Handle the .uses pseudo-op.  This pseudo-op is used just before a
This page took 0.024219 seconds and 4 git commands to generate.