aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@netbsd.org>2002-02-13 18:14:48 +0000
committerJason Thorpe <thorpej@netbsd.org>2002-02-13 18:14:48 +0000
commit76f57f3aaa745f1dbb24496feb91ee18be5cfe17 (patch)
treeac01c3c08b663878934c28d7b76b87d5b6372ac1 /gas
parent78b4f46824bf1fc873b17528ca434b420f12a36a (diff)
downloadgdb-76f57f3aaa745f1dbb24496feb91ee18be5cfe17.zip
gdb-76f57f3aaa745f1dbb24496feb91ee18be5cfe17.tar.gz
gdb-76f57f3aaa745f1dbb24496feb91ee18be5cfe17.tar.bz2
bfd:
2002-02-13 Matt Fredette <fredette@netbsd.org> * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize EF_M68000. bintuls: 2002-02-13 Matt Fredette <fredette@netbsd.org> * readelf.c (get_machine_flags): Recognize EF_M68000. gas: 2002-02-13 Matt Fredette <fredette@netbsd.org> * config/tc-m68k.c (md_show_usage): No longer display a hard-coded "68020" for the default CPU, instead display the canonical name of the true, configured default CPU. (m68k_elf_final_processing): Mark objects for sub-68020 CPUs with the new EF_M68000 flag. include/elf: 2002-02-13 Matt Fredette <fredette@netbsd.org> * m68k.h (EF_M68000): Define.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/config/tc-m68k.c31
2 files changed, 37 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 80f907e..7c1608a 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,11 @@
+2002-02-13 Matt Fredette <fredette@netbsd.org>
+
+ * config/tc-m68k.c (md_show_usage): No longer display a
+ hard-coded "68020" for the default CPU, instead display the
+ canonical name of the true, configured default CPU.
+ (m68k_elf_final_processing): Mark objects for sub-68020
+ CPUs with the new EF_M68000 flag.
+
2002-02-13 Andreas Schwab <schwab@suse.de>
* config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust
diff --git a/gas/config/tc-m68k.c b/gas/config/tc-m68k.c
index ef5f845..aeb72ce 100644
--- a/gas/config/tc-m68k.c
+++ b/gas/config/tc-m68k.c
@@ -6916,16 +6916,40 @@ void
md_show_usage (stream)
FILE *stream;
{
+ const char *default_cpu = TARGET_CPU;
+ int default_arch, i;
+
+ /* Get the canonical name for the default target CPU. */
+ if (*default_cpu == 'm')
+ default_cpu++;
+ for (i = 0; i < n_archs; i++)
+ {
+ if (strcasecmp (default_cpu, archs[i].name) == 0)
+ {
+ default_arch = archs[i].arch;
+ for (i = 0; i < n_archs; i++)
+ {
+ if (archs[i].arch == default_arch
+ && !archs[i].alias)
+ {
+ default_cpu = archs[i].name;
+ break;
+ }
+ }
+ }
+ }
+
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\
-m68302 | -m68331 | -m68332 | -m68333 | -m68340 | -m68360 | -mcpu32 |\n\
-m5200 | -m5202 | -m5204 | -m5206 | -m5206e | -m5307 | -m5407\n\
- specify variant of 680X0 architecture [default 68020]\n\
+ specify variant of 680X0 architecture [default %s]\n\
-m68881 | -m68882 | -mno-68881 | -mno-68882\n\
target has/lacks floating-point coprocessor\n\
- [default yes for 68020, 68030, and cpu32]\n"));
+ [default yes for 68020, 68030, and cpu32]\n"),
+ default_cpu);
fprintf (stream, _("\
-m68851 | -mno-68851\n\
target has/lacks memory-management unit coprocessor\n\
@@ -7118,5 +7142,8 @@ void m68k_elf_final_processing()
/* Set file-specific flags if this is a cpu32 processor */
if (cpu_of_arch (current_architecture) & cpu32)
elf_elfheader (stdoutput)->e_flags |= EF_CPU32;
+ else if ((cpu_of_arch (current_architecture) & m68000up)
+ && !(cpu_of_arch (current_architecture) & m68020up))
+ elf_elfheader (stdoutput)->e_flags |= EF_M68000;
}
#endif