Fix copyright notices
[deliverable/binutils-gdb.git] / gas / config / tc-m68k.c
index cb4a328be2c0a7fd8f37b9f9d383929c620066cf..6fa019cc278f5f98bfa2b1a029e9bddf37469a33 100644 (file)
@@ -1,5 +1,6 @@
 /* tc-m68k.c -- Assemble for the m68k family
-   Copyright (C) 1987, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+   Copyright 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+   2000, 2001
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
@@ -229,7 +230,7 @@ struct m68k_it
 #define arch_coldfire_p(x)     (((x) & mcf) != 0)
 
 /* Macros for determining if cpu supports a specific addressing mode */
-#define HAVE_LONG_BRANCH(x)    ((x) & (m68020|m68030|m68040|m68060|cpu32))
+#define HAVE_LONG_BRANCH(x)     ((x) & (m68020|m68030|m68040|m68060|cpu32|mcf5407))
 
 static struct m68k_it the_ins; /* the instruction being assembled */
 
@@ -351,56 +352,59 @@ static void md_convert_frag_1 PARAMS ((fragS *));
 
 static int current_architecture;
 
-struct m68k_cpu {
-  unsigned long arch;
-  const char *name;
-  int alias;
-};
+struct m68k_cpu
+  {
+    unsigned long arch;
+    const char *name;
+    int alias;
+  };
 
-static const struct m68k_cpu archs[] = {
-  { m68000, "68000", 0 },
-  { m68010, "68010", 0 },
-  { m68020, "68020", 0 },
-  { m68030, "68030", 0 },
-  { m68040, "68040", 0 },
-  { m68060, "68060", 0 },
-  { cpu32,  "cpu32", 0 },
-  { m68881, "68881", 0 },
-  { m68851, "68851", 0 },
-  { mcf5200, "5200", 0 },
-  { mcf5206e, "5206e", 0 },
-  { mcf5307, "5307", 0},
-  /* Aliases (effectively, so far as gas is concerned) for the above
-     cpus.  */
-  { m68020, "68k", 1 },
-  { m68000, "68008", 1 },
-  { m68000, "68302", 1 },
-  { m68000, "68306", 1 },
-  { m68000, "68307", 1 },
-  { m68000, "68322", 1 },
-  { m68000, "68356", 1 },
-  { m68000, "68ec000", 1 },
-  { m68000, "68hc000", 1 },
-  { m68000, "68hc001", 1 },
-  { m68020, "68ec020", 1 },
-  { m68030, "68ec030", 1 },
-  { m68040, "68ec040", 1 },
-  { m68060, "68ec060", 1 },
-  { cpu32,  "68330", 1 },
-  { cpu32,  "68331", 1 },
-  { cpu32,  "68332", 1 },
-  { cpu32,  "68333", 1 },
-  { cpu32,  "68334", 1 },
-  { cpu32,  "68336", 1 },
-  { cpu32,  "68340", 1 },
-  { cpu32,  "68341", 1 },
-  { cpu32,  "68349", 1 },
-  { cpu32,  "68360", 1 },
-  { m68881, "68882", 1 },
-  { mcf5200, "5202", 1 },
-  { mcf5200, "5204", 1 },
-  { mcf5200, "5206", 1 },
-};
+static const struct m68k_cpu archs[] =
+  {
+    { m68000, "68000", 0 },
+    { m68010, "68010", 0 },
+    { m68020, "68020", 0 },
+    { m68030, "68030", 0 },
+    { m68040, "68040", 0 },
+    { m68060, "68060", 0 },
+    { cpu32,  "cpu32", 0 },
+    { m68881, "68881", 0 },
+    { m68851, "68851", 0 },
+    { mcf5200, "5200", 0 },
+    { mcf5206e, "5206e", 0 },
+    { mcf5307, "5307", 0},
+    { mcf5407, "5407", 0},
+    /* Aliases (effectively, so far as gas is concerned) for the above
+       cpus.  */
+    { m68020, "68k", 1 },
+    { m68000, "68008", 1 },
+    { m68000, "68302", 1 },
+    { m68000, "68306", 1 },
+    { m68000, "68307", 1 },
+    { m68000, "68322", 1 },
+    { m68000, "68356", 1 },
+    { m68000, "68ec000", 1 },
+    { m68000, "68hc000", 1 },
+    { m68000, "68hc001", 1 },
+    { m68020, "68ec020", 1 },
+    { m68030, "68ec030", 1 },
+    { m68040, "68ec040", 1 },
+    { m68060, "68ec060", 1 },
+    { cpu32,  "68330", 1 },
+    { cpu32,  "68331", 1 },
+    { cpu32,  "68332", 1 },
+    { cpu32,  "68333", 1 },
+    { cpu32,  "68334", 1 },
+    { cpu32,  "68336", 1 },
+    { cpu32,  "68340", 1 },
+    { cpu32,  "68341", 1 },
+    { cpu32,  "68349", 1 },
+    { cpu32,  "68360", 1 },
+    { m68881, "68882", 1 },
+    { mcf5200, "5202", 1 },
+    { mcf5200, "5204", 1 },
+    { mcf5200, "5206", 1 },
+  };
 
 static const int n_archs = sizeof (archs) / sizeof (archs[0]);
 
@@ -643,7 +647,7 @@ CONST pseudo_typeS mote_pseudo_table[] =
 extern char *input_line_pointer;
 
 static char mklower_table[256];
-#define mklower(c) (mklower_table[(unsigned char)(c)])
+#define mklower(c) (mklower_table[(unsigned char) (c)])
 static char notend_table[256];
 static char alt_notend_table[256];
 #define notend(s)                                              \
@@ -874,8 +878,18 @@ tc_gen_reloc (section, fixp)
   arelent *reloc;
   bfd_reloc_code_real_type code;
 
+  /* If the tcbit is set, then this was a fixup of a negative value
+     that was never resolved.  We do not have a reloc to handle this,
+     so just return.  We assume that other code will have detected this
+     situation and produced a helpful error message, so we just tell the
+     user that the reloc cannot be produced.  */
   if (fixp->fx_tcbit)
-    abort ();
+    {
+      if (fixp->fx_addsy)
+       as_bad (_("Unable to produce reloc against symbol '%s'"),
+               S_GET_NAME (fixp->fx_addsy));
+      return NULL;
+    }
 
   if (fixp->fx_r_type != BFD_RELOC_NONE)
     {
@@ -2441,7 +2455,7 @@ m68k_ip (instring)
            case FPREG:
            default:
              as_bad (_("unknown/incorrect operand"));
-             /* abort(); */
+             /* abort (); */
            }
          install_gen_operand (s[1], tmpreg);
          break;
@@ -3955,6 +3969,7 @@ select_control_regs ()
     case mcf5200:
     case mcf5206e:
     case mcf5307:
+    case mcf5407:
       control_regs = mcf_control_regs;
       break;
     default:
@@ -4383,7 +4398,7 @@ md_convert_frag_1 (fragP)
          fragP->fr_opcode[0] = 0x4E;
          fragP->fr_opcode[1] = (char) 0xB9; /* JSR with ABSL LONG operand */
          fix_new (fragP, fragP->fr_fix, 4, fragP->fr_symbol, fragP->fr_offset,
-                  0, RELAX_RELOC_PC32);
+                  0, RELAX_RELOC_ABS32);
          fragP->fr_fix += 4;
        }
       else if (fragP->fr_opcode[0] == 0x60)    /* jbra */
@@ -4564,7 +4579,6 @@ md_estimate_size_before_relax (fragP, segment)
      segT segment;
 {
   int old_fix;
-  register char *buffer_address = fragP->fr_fix + fragP->fr_literal;
 
   old_fix = fragP->fr_fix;
 
@@ -4652,8 +4666,8 @@ md_estimate_size_before_relax (fragP, segment)
     case TAB (DBCCLBR, SZ_UNDEF):
     case TAB (DBCCABSJ, SZ_UNDEF):
       {
-       if (S_GET_SEGMENT (fragP->fr_symbol) == segment
-           && relaxable_symbol (fragP->fr_symbol)
+       if ((S_GET_SEGMENT (fragP->fr_symbol) == segment
+            && relaxable_symbol (fragP->fr_symbol))
            || flag_short_refs)
          {
            fragP->fr_subtype = TAB (TABTYPE (fragP->fr_subtype), SHORT);
@@ -6765,7 +6779,7 @@ struct option md_longopts[] = {
   {"pcrel", no_argument, NULL, OPTION_PCREL},
   {NULL, no_argument, NULL, 0}
 };
-size_t md_longopts_size = sizeof(md_longopts);
+size_t md_longopts_size = sizeof (md_longopts);
 
 int
 md_parse_option (c, arg)
@@ -6929,7 +6943,7 @@ void
 md_show_usage (stream)
      FILE *stream;
 {
-  fprintf(stream, _("\
+  fprintf (stream, _("\
 680X0 options:\n\
 -l                     use 1 word for refs to undefined symbols [default 2]\n\
 -m68000 | -m68008 | -m68010 | -m68020 | -m68030 | -m68040 | -m68060\n\
@@ -6939,7 +6953,7 @@ md_show_usage (stream)
 -m68881 | -m68882 | -mno-68881 | -mno-68882\n\
                        target has/lacks floating-point coprocessor\n\
                        [default yes for 68020, 68030, and cpu32]\n"));
-  fprintf(stream, _("\
+  fprintf (stream, _("\
 -m68851 | -mno-68851\n\
                        target has/lacks memory-management unit coprocessor\n\
                        [default yes for 68020 and up]\n\
@@ -7048,7 +7062,6 @@ is_label (str)
 
 /* We have no need to default values of symbols.  */
 
-/* ARGSUSED */
 symbolS *
 md_undefined_symbol (name)
      char *name ATTRIBUTE_UNUSED;
@@ -7100,7 +7113,6 @@ md_pcrel_from (fixP)
 #ifndef BFD_ASSEMBLER
 #ifdef OBJ_COFF
 
-/*ARGSUSED*/
 void
 tc_coff_symbol_emit_hook (ignore)
      symbolS *ignore ATTRIBUTE_UNUSED;
This page took 0.027352 seconds and 4 git commands to generate.