From 2a327eef521fbbcac3f43ecc70a3f7bd7af7d3c1 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu@codesourcery.com>
Date: Mon, 8 Jan 2007 18:42:37 +0000
Subject: [PATCH] bfd/ 	* archures.c (bfd_mach_cpu32_fido): Rename to
 bfd_mach_fido. 	* bfd-in2.h: Regenerate. 	* cpu-m68k.c
 (arch_info_struct): Use bfd_mach_fido instead of 	bfd_mach_cpu32_fido. 
 (m68k_arch_features): Use fido_a instead of cpu32. 	(bfd_m68k_compatible):
 Reject the combination of Fido and 	ColdFire.  Accept the combination of
 CPU32 and Fido with a 	warning. 	* elf32-m68k.c (elf32_m68k_object_p, 
 elf32_m68k_merge_private_bfd_data, 	elf32_m68k_print_private_bfd_data):
 Treat Fido as an 	architecture by itself.

binutils/
	* readelf.c (get_machine_flags): Treat Fido as an architecture
	by itself.

gas/
	* config/tc-m68k.c (m68k_archs, m68k_cpus): Treat Fido as an
	architecture by itself.
	(m68k_ip): Don't issue a warning for tbl instructions on fido.
	(m68k_elf_final_processing): Treat Fido as an architecture by
	itself.

include/elf/
	* m68k.h (EF_M68K_FIDO): New.
	(EF_M68K_ARCH_MASK): OR EF_M68K_FIDO.
	(EF_M68K_CPU32_FIDO_A, EF_M68K_CPU32_MASK): Remove.

include/opcode/
	* m68k.h (m68010up): OR fido_a.

opcodes/
	* m68k-opc.c (m68k_opcodes): Replace cpu32 with
	cpu32 | fido_a except on tbl instructions.
---
 include/elf/ChangeLog    |  6 ++++++
 include/elf/m68k.h       | 10 +++-------
 include/opcode/ChangeLog |  4 ++++
 include/opcode/m68k.h    |  2 +-
 4 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog
index c3dd1168d..5504cb07f 100644
--- a/include/elf/ChangeLog
+++ b/include/elf/ChangeLog
@@ -1,3 +1,9 @@
+2007-01-08  Kazu Hirata  <kazu@codesourcery.com>
+
+	* m68k.h (EF_M68K_FIDO): New.
+	(EF_M68K_ARCH_MASK): OR EF_M68K_FIDO.
+	(EF_M68K_CPU32_FIDO_A, EF_M68K_CPU32_MASK): Remove.
+
 2006-12-25  Kazu Hirata  <kazu@codesourcery.com>
 
 	* m68k.h (EF_M68K_CPU32_FIDO_A, EF_M68K_CPU32_MASK): New.
diff --git a/include/elf/m68k.h b/include/elf/m68k.h
index 875172967..a9f2203a6 100644
--- a/include/elf/m68k.h
+++ b/include/elf/m68k.h
@@ -57,7 +57,9 @@ END_RELOC_NUMBERS (R_68K_max)
 #define EF_M68K_CPU32    0x00810000
 #define EF_M68K_M68000   0x01000000
 #define EF_M68K_CFV4E    0x00008000
-#define EF_M68K_ARCH_MASK (EF_M68K_M68000 | EF_M68K_CPU32 | EF_M68K_CFV4E)
+#define EF_M68K_FIDO     0x02000000
+#define EF_M68K_ARCH_MASK						\
+  (EF_M68K_M68000 | EF_M68K_CPU32 | EF_M68K_CFV4E | EF_M68K_FIDO)
 
 /* We use the bottom 8 bits to encode information about the
    coldfire variant.  If we use any of these bits, the top 24 bits are
@@ -76,10 +78,4 @@ END_RELOC_NUMBERS (R_68K_max)
 #define EF_M68K_CF_FLOAT	0x40  /* Has float insns */
 #define EF_M68K_CF_MASK		0xFF
      
-/* We use the bottom 8 bits to encode information about the
-   CPU32 variant.  If we use any of these bits, the top 24 bits must
-   be EF_M68K_CPU32.  */
-#define EF_M68K_CPU32_FIDO_A	0x01
-#define EF_M68K_CPU32_MASK	0xFF
-
 #endif
diff --git a/include/opcode/ChangeLog b/include/opcode/ChangeLog
index 526593b0a..a0b321f09 100644
--- a/include/opcode/ChangeLog
+++ b/include/opcode/ChangeLog
@@ -1,3 +1,7 @@
+2007-01-08  Kazu Hirata  <kazu@codesourcery.com>
+
+	* m68k.h (m68010up): OR fido_a.
+
 2006-12-25  Kazu Hirata  <kazu@codesourcery.com>
 
 	* m68k.h (fido_a): New.
diff --git a/include/opcode/m68k.h b/include/opcode/m68k.h
index ca0b4d98d..f87a7a379 100644
--- a/include/opcode/m68k.h
+++ b/include/opcode/m68k.h
@@ -49,7 +49,7 @@
 #define	m68040up   (m68040 | m68060)
 #define	m68030up   (m68030 | m68040up)
 #define	m68020up   (m68020 | m68030up)
-#define	m68010up   (m68010 | cpu32 | m68020up)
+#define	m68010up   (m68010 | cpu32 | fido_a | m68020up)
 #define	m68000up   (m68000 | m68010up)
 
 #define	mfloat  (m68881 | m68040 | m68060)