Tue Aug 8 13:07:05 1995 Ian Lance Taylor <ian@cygnus.com>
+ * config/tc-m68k.c (archs): Add 68ec000, 68hc000, 68hc001,
+ 68ec020, 68ec030, 68ec040, and 68330.
+ (md_pseudo_table): Add chip and comline.
+ (m68k_init_after_args): Use strcasecmp when comparing default_cpu
+ against architectures.
+ (mri_chip, s_chip): New static functions.
+
* struc-symbol.h (struct symbol): Add sy_mri_common bit.
* read.h (mri_comon_symbol): Declare.
(s_mri_common): Declare.
static void s_data2 PARAMS ((int));
static void s_even PARAMS ((int));
static void s_proc PARAMS ((int));
+static void mri_chip PARAMS ((void));
+static void s_chip PARAMS ((int));
static int current_architecture;
{ m68020, "68k" },
{ m68000, "68302" },
{ m68000, "68008" },
+ { m68000, "68ec000" },
+ { m68000, "68hc000" },
+ { m68000, "68hc001" },
+ { m68020, "68ec020" },
+ { m68030, "68ec030" },
+ { m68040, "68ec040" },
+ { cpu32, "68330" },
{ cpu32, "68331" },
{ cpu32, "68332" },
{ cpu32, "68333" },
#ifdef OBJ_ELF
{"swbeg", s_ignore, 0},
#endif
+
+ /* The following pseudo-ops are supported for MRI compatibility. */
+ {"chip", s_chip, 0},
+ {"comline", s_space, 1},
+
{0, 0, 0}
};
if (*default_cpu == 'm')
default_cpu++;
for (i = 0; i < n_archs; i++)
- if (!strcmp (default_cpu, archs[i].name))
+ if (strcasecmp (default_cpu, archs[i].name) == 0)
break;
if (i == n_archs)
{
{
demand_empty_rest_of_line ();
}
+\f
+/* Pseudo-ops handled for MRI compatibility. */
+
+/* Handle an MRI style chip specification. */
-/* s_space is defined in read.c .skip is simply an alias to it. */
+static void
+mri_chip ()
+{
+ char *s;
+ char c;
+ int i;
+
+ s = input_line_pointer;
+ c = get_symbol_end ();
+ for (i = 0; i < n_archs; i++)
+ if (strcasecmp (s, archs[i].name) == 0)
+ break;
+ if (i >= n_archs)
+ {
+ as_bad ("%s: unrecognized processor name", s);
+ *input_line_pointer = c;
+ ignore_rest_of_line ();
+ return;
+ }
+ *input_line_pointer = c;
+ if (*input_line_pointer == '/')
+ current_architecture = 0;
+ else
+ current_architecture &= m68881 | m68851;
+ current_architecture |= archs[i].arch;
+
+ while (*input_line_pointer == '/')
+ {
+ ++input_line_pointer;
+ s = input_line_pointer;
+ c = get_symbol_end ();
+ if (strcmp (s, "68881") == 0)
+ current_architecture |= m68881;
+ else if (strcmp (s, "68851") == 0)
+ current_architecture |= m68851;
+ *input_line_pointer = c;
+ }
+}
+
+/* The MRI CHIP pseudo-op. */
+
+static void
+s_chip (ignore)
+ int ignore;
+{
+ mri_chip ();
+ demand_empty_rest_of_line ();
+}
\f
/*
* md_parse_option