* config/tc-m68k.h (AOUT_MACHTYPE): Define to be external variable
authorIan Lance Taylor <ian@airs.com>
Tue, 19 Oct 1993 22:18:15 +0000 (22:18 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 19 Oct 1993 22:18:15 +0000 (22:18 +0000)
m68k_aout_machtype.
* config/tc-m68k.c (omagic): Remove obsolete and unused variable.
(m68k_aout_machtype): New variable, if OBJ_AOUT.
(md_assemble): Initialize m68k_aout_machtype based on
current_architecture, if OBJ_AOUT.
(md_parse_option): Remove obsolete reference to omagic.

gas/ChangeLog
gas/config/tc-m68k.c
gas/config/tc-m68k.h

index 1905790b7593bb8e1bdf3aef16e215d69da1a69e..5aba96efdf17b84a654d68280779b2013bfa0309 100644 (file)
@@ -1,8 +1,19 @@
+Tue Oct 19 18:13:26 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
+
+       * config/tc-m68k.h (AOUT_MACHTYPE): Define to be external variable
+       m68k_aout_machtype.
+       * config/tc-m68k.c (omagic): Remove obsolete and unused variable.
+       (m68k_aout_machtype): New variable, if OBJ_AOUT.
+       (md_assemble): Initialize m68k_aout_machtype based on
+       current_architecture, if OBJ_AOUT.
+       (md_parse_option): Remove obsolete reference to omagic.
+
 Thu Oct 14 16:51:00 1993  Ian Lance Taylor  (ian@tweedledumb.cygnus.com)
 
        * config/tc-mips.c (md_pseudo_table): Ignore .livereg pseudo-op.
        (s_option): Ignore .option O* and .option pic*.
        (s_ent): Skip whitespace between symbol and optional digit.
+       (my_getSmallExpression): Handle ($xx) correctly: assume 0($xx).
 
        * app.c (do_scrub_next_char): Always accept 'x' and 'X' as escape
        characters in state 6.
index 0f243b8365b95e03b9b4de310ab39247d95e4ecb..0100e03298e3f2b0c82a7043e8fede86a3c809d2 100644 (file)
    included by one source file per executable.  */
 #include "opcode/m68k.h"
 
-#ifndef BFD_ASSEMBLER
-#ifdef TE_SUN
-/* This variable contains the value to write out at the beginning of
-   the a.out file.  The 2<<16 means that this is a 68020 file instead
-   of an old-style 68000 file */
-
-long omagic = 2 << 16 | OMAGIC;        /* Magic byte for header file */
-#else
-long omagic = OMAGIC;
-#endif
-#endif
-
 /* This array holds the chars that always start a comment.  If the
    pre-processor is disabled, these aren't very useful */
 CONST char comment_chars[] = "|";
@@ -82,8 +70,8 @@ CONST char FLT_CHARS[] = "rRsSfFdDxXeEpP";
 const int md_reloc_size = 8;   /* Size of relocation record */
 
 /* Are we trying to generate PIC code?  If so, absolute references
-   ought to be made PC-relative.  They aren't yet, but we can parse
-   the option now so the user doesn't get an error...  */
+   ought to be made into linkage table references or pc-relative
+   references.  */
 int flag_want_pic;
 
 /* Its an arbitrary name:  This means I don't approve of it */
@@ -2284,7 +2272,7 @@ m68k_ip (instring)
                                    TAB (PCLEA, SZ_UNDEF));
 #else
                          addword (0x0170);
-                         add_fix ('l', opP->con1, 0);
+                         add_fix ('l', opP->con1, 1);
                          addword (0), addword (0);
 #endif
                          break;
@@ -3541,6 +3529,11 @@ init_regtable ()
 
 static int no_68851, no_68881;
 
+#ifdef OBJ_AOUT
+/* a.out machine type.  Default to 68020.  */
+int m68k_aout_machtype = 2;
+#endif
+
 void
 md_assemble (str)
      char *str;
@@ -3615,7 +3608,18 @@ md_assemble (str)
        as_bad ("options for 68881 and no-68881 both given");
       if (no_68851 && (current_architecture & m68851))
        as_bad ("options for 68851 and no-68851 both given");
-      done_first_time = 1;
+
+#ifdef OBJ_AOUT
+      /* Work out the magic number.  This isn't very general.  */
+      if (current_architecture & m68000)
+       m68k_aout_machtype = 0;
+      else if (current_architecture & m68010)
+       m68k_aout_machtype = 1;
+      else if (current_architecture & m68020)
+       m68k_aout_machtype = 2;
+      else
+       m68k_aout_machtype = 2;
+#endif
     }
 
   memset ((char *) (&the_ins), '\0', sizeof (the_ins));
@@ -3825,7 +3829,7 @@ md_begin ()
 
       retval = hash_insert (op_hash, ins->name, (char *) hack);
       /* Didn't his mommy tell him about null pointers? */
-      if (retval && *retval)
+      if (retval)
        as_bad ("Internal Error:  Can't hash %s: %s", ins->name, retval);
     }
 
@@ -4874,7 +4878,8 @@ s_proc (ignore)
  *             so don't use or document it, but that's the way the parsing
  *             works).
  *
- *     -k      Ignored for now.  (Sun 3 only.  Indicates PIC.)
+ *     -pic    Indicates PIC.
+ *     -k      Indicates PIC.  (Sun 3 only.)
  *
  * MAYBE_FLOAT_TOO is defined below so that specifying a processor type
  * (e.g. m68020) also requests that float instructions be included.  This
@@ -4903,12 +4908,6 @@ md_parse_option (argP, cntP, vecP)
                                   jsr's.  */
       break;
 
-#ifdef TE_SUN3
-    case 'k':
-      flag_want_pic = 1;
-      break;
-#endif
-
     case 'A':
       (*argP)++;
       /* intentional fall-through */
@@ -4928,9 +4927,6 @@ md_parse_option (argP, cntP, vecP)
        }
       else if (!strcmp (*argP, "68010"))
        {
-#ifdef TE_SUN
-         omagic = 1 << 16 | OMAGIC;
-#endif
          current_architecture |= m68010;
        }
       else if (!strcmp (*argP, "68020"))
@@ -4994,15 +4990,21 @@ md_parse_option (argP, cntP, vecP)
     case 'p':
       if (!strcmp (*argP, "pic"))
        {
-         (*argP) += 3;
+         *argP += 3;
+         flag_want_pic = 1;
          break;                /* -pic, Position Independent Code */
        }
       else
-       {
-         return 0;
-       }                       /* pic or not */
+       goto bad_arg;
+
+#ifdef TE_SUN3
+    case 'k':
+      flag_want_pic = 1;
+      break;
+#endif
 
     default:
+    bad_arg:
       return 0;
     }
   return 1;
index 1a573ec6e840b55cccd3ce8e68a866821bb7afa7..415706a9a17ebc7f72ae051e29f0aac9d86589ab 100644 (file)
 #define TARGET_FORMAT "a.out-sunos-big"
 #endif
 
+#ifdef TE_LYNX
+#define TARGET_FORMAT          "coff-m68k-lynx"
+#endif
+
 #define COFF_MAGIC MC68MAGIC
 #define BFD_ARCH bfd_arch_m68k
 #define COFF_FLAGS F_AR32W
@@ -40,7 +44,8 @@
 #endif /* TE_SUN3 */
 
 #ifndef AOUT_MACHTYPE
-#define AOUT_MACHTYPE 0x2
+#define AOUT_MACHTYPE m68k_aout_machtype
+extern int m68k_aout_machtype;
 #endif
 
 #define tc_crawl_symbol_chain(a)       {;}     /* not used */
This page took 0.036309 seconds and 4 git commands to generate.