gas/
[deliverable/binutils-gdb.git] / gas / config / tc-frv.c
index f1771945418b86cb156a25b301f20e6b111f0e0d..a008039aa3596fa410f9b7363776712176104cdf 100644 (file)
@@ -1,11 +1,12 @@
 /* tc-frv.c -- Assembler for the Fujitsu FRV.
-   Copyright 2002, 2003, 2004, 2005 Free Software Foundation.
+   Copyright 2002, 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,
@@ -18,7 +19,6 @@
    the Free Software Foundation, 51 Franklin Street - Fifth Floor,
    Boston, MA 02110-1301, USA.  */
 
-#include <stdio.h>
 #include "as.h"
 #include "subsegs.h"     
 #include "symcat.h"
@@ -404,7 +404,7 @@ md_parse_option (c, arg)
 
        else
          {
-           as_fatal ("Unknown cpu -mcpu=%s", arg);
+           as_fatal (_("Unknown cpu -mcpu=%s"), arg);
            return 0;
          }
 
@@ -455,32 +455,31 @@ md_parse_option (c, arg)
 }
 
 void
-md_show_usage (stream)
-  FILE * stream;
+md_show_usage (FILE * stream)
 {
   fprintf (stream, _("FRV specific command line options:\n"));
-  fprintf (stream, _("-G n         Data >= n bytes is in small data area\n"));
-  fprintf (stream, _("-mgpr-32     Note 32 gprs are used\n"));
-  fprintf (stream, _("-mgpr-64     Note 64 gprs are used\n"));
-  fprintf (stream, _("-mfpr-32     Note 32 fprs are used\n"));
-  fprintf (stream, _("-mfpr-64     Note 64 fprs are used\n"));
-  fprintf (stream, _("-msoft-float Note software fp is used\n"));
-  fprintf (stream, _("-mdword      Note stack is aligned to a 8 byte boundary\n"));
-  fprintf (stream, _("-mno-dword   Note stack is aligned to a 4 byte boundary\n"));
-  fprintf (stream, _("-mdouble     Note fp double insns are used\n"));
-  fprintf (stream, _("-mmedia      Note media insns are used\n"));
-  fprintf (stream, _("-mmuladd     Note multiply add/subtract insns are used\n"));
-  fprintf (stream, _("-mpack       Note instructions are packed\n"));
-  fprintf (stream, _("-mno-pack    Do not allow instructions to be packed\n"));
-  fprintf (stream, _("-mpic        Note small position independent code\n"));
-  fprintf (stream, _("-mPIC        Note large position independent code\n"));
-  fprintf (stream, _("-mlibrary-pic Compile library for large position indepedent code\n"));
-  fprintf (stream, _("-mfdpic      Assemble for the FDPIC ABI\n"));
-  fprintf (stream, _("-mnopic      Disable -mpic, -mPIC, -mlibrary-pic and -mfdpic\n"));
+  fprintf (stream, _("-G n            Put data <= n bytes in the small data area\n"));
+  fprintf (stream, _("-mgpr-32        Mark generated file as only using 32 GPRs\n"));
+  fprintf (stream, _("-mgpr-64        Mark generated file as using all 64 GPRs\n"));
+  fprintf (stream, _("-mfpr-32        Mark generated file as only using 32 FPRs\n"));
+  fprintf (stream, _("-mfpr-64        Mark generated file as using all 64 FPRs\n"));
+  fprintf (stream, _("-msoft-float    Mark generated file as using software FP\n"));
+  fprintf (stream, _("-mdword         Mark generated file as using a 8-byte stack alignment\n"));
+  fprintf (stream, _("-mno-dword      Mark generated file as using a 4-byte stack alignment\n"));
+  fprintf (stream, _("-mdouble        Mark generated file as using double precision FP insns\n"));
+  fprintf (stream, _("-mmedia         Mark generated file as using media insns\n"));
+  fprintf (stream, _("-mmuladd        Mark generated file as using multiply add/subtract insns\n"));
+  fprintf (stream, _("-mpack          Allow instructions to be packed\n"));
+  fprintf (stream, _("-mno-pack       Do not allow instructions to be packed\n"));
+  fprintf (stream, _("-mpic           Mark generated file as using small position independent code\n"));
+  fprintf (stream, _("-mPIC           Mark generated file as using large position independent code\n"));
+  fprintf (stream, _("-mlibrary-pic   Mark generated file as using position indepedent code for libraries\n"));
+  fprintf (stream, _("-mfdpic         Assemble for the FDPIC ABI\n"));
+  fprintf (stream, _("-mnopic         Disable -mpic, -mPIC, -mlibrary-pic and -mfdpic\n"));
   fprintf (stream, _("-mcpu={fr500|fr550|fr400|fr405|fr450|fr300|frv|simple|tomcat}\n"));
-  fprintf (stream, _("             Record the cpu type\n"));
-  fprintf (stream, _("-mtomcat-stats Print out stats for tomcat workarounds\n"));
-  fprintf (stream, _("-mtomcat-debug Debug tomcat workarounds\n"));
+  fprintf (stream, _("                Record the cpu type\n"));
+  fprintf (stream, _("-mtomcat-stats  Print out stats for tomcat workarounds\n"));
+  fprintf (stream, _("-mtomcat-debug  Debug tomcat workarounds\n"));
 } 
 
 \f
@@ -648,11 +647,11 @@ frv_debug_tomcat (start_chain)
       for (this_insn = this_chain->insn_list; this_insn; this_insn = this_insn->next)
        {
          if (this_insn->type == VLIW_LABEL_TYPE)
-           fprintf (stderr, "Label Value: %d\n", (int) this_insn->sym);
+           fprintf (stderr, "Label Value: %p\n", this_insn->sym);
          else if (this_insn->type == VLIW_BRANCH_TYPE)
-           fprintf (stderr, "%s to %d\n", this_insn->insn->base->name, (int) this_insn->sym);
+           fprintf (stderr, "%s to %p\n", this_insn->insn->base->name, this_insn->sym);
          else if (this_insn->type == VLIW_BRANCH_HAS_NOPS)
-           fprintf (stderr, "nop'd %s to %d\n", this_insn->insn->base->name, (int) this_insn->sym);
+           fprintf (stderr, "nop'd %s to %p\n", this_insn->insn->base->name, this_insn->sym);
          else if (this_insn->type == VLIW_NOP_TYPE)
            fprintf (stderr, "Nop\n");
          else
@@ -1558,61 +1557,10 @@ frv_md_number_to_chars (buf, val, n)
   number_to_chars_bigendian (buf, val, n);
 }
 
-/* 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.
-*/
-
-/* Equal to MAX_PRECISION in atof-ieee.c */
-#define MAX_LITTLENUMS 6
-
 char *
-md_atof (type, litP, sizeP)
-     char   type;
-     char * litP;
-     int *  sizeP;
+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
@@ -1700,7 +1648,7 @@ frv_pic_ptr (nbytes)
          if (*input_line_pointer == ')')
            input_line_pointer++;
          else
-           as_bad ("missing ')'");
+           as_bad (_("missing ')'"));
          reloc_type = BFD_RELOC_FRV_FUNCDESC;
        }
       else if (strncasecmp (input_line_pointer, "tlsmoff(", 8) == 0)
@@ -1710,7 +1658,7 @@ frv_pic_ptr (nbytes)
          if (*input_line_pointer == ')')
            input_line_pointer++;
          else
-           as_bad ("missing ')'");
+           as_bad (_("missing ')'"));
          reloc_type = BFD_RELOC_FRV_TLSMOFF;
        }
       else
This page took 0.028084 seconds and 4 git commands to generate.