• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisionbc46edd312aa3e231964b51329ac612c91ef34c2 (tree)
Time2006-11-30 23:49:43
AuthorKazu Hirata <kazu@code...>
CommiterKazu Hirata

Log Message

bfd/
* archures.c (bfd_mach_cpu32_fido): New.
(bfd_mach_mcf_isa_a_nodiv, bfd_mach_mcf_isa_a,
bfd_mach_mcf_isa_a_mac, bfd_mach_mcf_isa_a_emac,
bfd_mach_mcf_isa_aplus, bfd_mach_mcf_isa_aplus_mac,
bfd_mach_mcf_isa_aplus_emac, bfd_mach_mcf_isa_b_nousp,
bfd_mach_mcf_isa_b_nousp_mac, bfd_mach_mcf_isa_b_nousp_emac,
bfd_mach_mcf_isa_b, bfd_mach_mcf_isa_b_mac,
bfd_mach_mcf_isa_b_emac, bfd_mach_mcf_isa_b_float,
bfd_mach_mcf_isa_b_float_mac, bfd_mach_mcf_isa_b_float_emac):
Increment the defined values.
* cpu-m68k.c (arch_info_struct): Add en entry for
bfd_mach_cpu32_fido.
(m68k_arch_features): Add an entry corresponding to
bfd_mach_cpu32_fido.
(bfd_m68k_compatible): Handle bfd_mach_cpu32_fido.
* elf32-m68k.c (elf32_m68k_object_p): Handle
EF_M68K_CPU32_FIDO_A.
(elf32_m68k_merge_private_bfd_data): Use EF_M68K_CPU32_MASK.
(elf32_m68k_print_private_bfd_data): Handle
EF_M68K_CPU32_FIDO_A.

binutils/
* readelf.c (get_machine_flags): Handle EF_M68K_CPU32_FIDO_A.

gas/
* config/tc-m68k.c (m68k_elf_final_processing): Handle
EF_M68K_CPU32_FIDO_A.

include/
* include/elf/m68k.h (EF_M68K_CPU32_FIDO_A,
EF_M68K_CPU32_MASK): New.

Change Summary

Incremental Difference

--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,3 +1,38 @@
1+2006-11-30 Kazu Hirata <kazu@codesourcery.com>
2+
3+ bfd/
4+ * archures.c (bfd_mach_cpu32_fido): New.
5+ (bfd_mach_mcf_isa_a_nodiv, bfd_mach_mcf_isa_a,
6+ bfd_mach_mcf_isa_a_mac, bfd_mach_mcf_isa_a_emac,
7+ bfd_mach_mcf_isa_aplus, bfd_mach_mcf_isa_aplus_mac,
8+ bfd_mach_mcf_isa_aplus_emac, bfd_mach_mcf_isa_b_nousp,
9+ bfd_mach_mcf_isa_b_nousp_mac, bfd_mach_mcf_isa_b_nousp_emac,
10+ bfd_mach_mcf_isa_b, bfd_mach_mcf_isa_b_mac,
11+ bfd_mach_mcf_isa_b_emac, bfd_mach_mcf_isa_b_float,
12+ bfd_mach_mcf_isa_b_float_mac, bfd_mach_mcf_isa_b_float_emac):
13+ Increment the defined values.
14+ * cpu-m68k.c (arch_info_struct): Add en entry for
15+ bfd_mach_cpu32_fido.
16+ (m68k_arch_features): Add an entry corresponding to
17+ bfd_mach_cpu32_fido.
18+ (bfd_m68k_compatible): Handle bfd_mach_cpu32_fido.
19+ * elf32-m68k.c (elf32_m68k_object_p): Handle
20+ EF_M68K_CPU32_FIDO_A.
21+ (elf32_m68k_merge_private_bfd_data): Use EF_M68K_CPU32_MASK.
22+ (elf32_m68k_print_private_bfd_data): Handle
23+ EF_M68K_CPU32_FIDO_A.
24+
25+ binutils/
26+ * readelf.c (get_machine_flags): Handle EF_M68K_CPU32_FIDO_A.
27+
28+ gas/
29+ * config/tc-m68k.c (m68k_elf_final_processing): Handle
30+ EF_M68K_CPU32_FIDO_A.
31+
32+ include/
33+ * include/elf/m68k.h (EF_M68K_CPU32_FIDO_A,
34+ EF_M68K_CPU32_MASK): New.
35+
136 2006-11-29 Daniel Jacobowitz <dan@codesourcery.com>
237
338 Backport:
--- a/bfd/archures.c
+++ b/bfd/archures.c
@@ -80,22 +80,23 @@ DESCRIPTION
8080 .#define bfd_mach_m68040 6
8181 .#define bfd_mach_m68060 7
8282 .#define bfd_mach_cpu32 8
83-.#define bfd_mach_mcf_isa_a_nodiv 9
84-.#define bfd_mach_mcf_isa_a 10
85-.#define bfd_mach_mcf_isa_a_mac 11
86-.#define bfd_mach_mcf_isa_a_emac 12
87-.#define bfd_mach_mcf_isa_aplus 13
88-.#define bfd_mach_mcf_isa_aplus_mac 14
89-.#define bfd_mach_mcf_isa_aplus_emac 15
90-.#define bfd_mach_mcf_isa_b_nousp 16
91-.#define bfd_mach_mcf_isa_b_nousp_mac 17
92-.#define bfd_mach_mcf_isa_b_nousp_emac 18
93-.#define bfd_mach_mcf_isa_b 19
94-.#define bfd_mach_mcf_isa_b_mac 20
95-.#define bfd_mach_mcf_isa_b_emac 21
96-.#define bfd_mach_mcf_isa_b_float 22
97-.#define bfd_mach_mcf_isa_b_float_mac 23
98-.#define bfd_mach_mcf_isa_b_float_emac 24
83+.#define bfd_mach_cpu32_fido 9
84+.#define bfd_mach_mcf_isa_a_nodiv 10
85+.#define bfd_mach_mcf_isa_a 11
86+.#define bfd_mach_mcf_isa_a_mac 12
87+.#define bfd_mach_mcf_isa_a_emac 13
88+.#define bfd_mach_mcf_isa_aplus 14
89+.#define bfd_mach_mcf_isa_aplus_mac 15
90+.#define bfd_mach_mcf_isa_aplus_emac 16
91+.#define bfd_mach_mcf_isa_b_nousp 17
92+.#define bfd_mach_mcf_isa_b_nousp_mac 18
93+.#define bfd_mach_mcf_isa_b_nousp_emac 19
94+.#define bfd_mach_mcf_isa_b 20
95+.#define bfd_mach_mcf_isa_b_mac 21
96+.#define bfd_mach_mcf_isa_b_emac 22
97+.#define bfd_mach_mcf_isa_b_float 23
98+.#define bfd_mach_mcf_isa_b_float_mac 24
99+.#define bfd_mach_mcf_isa_b_float_emac 25
99100 . bfd_arch_vax, {* DEC Vax *}
100101 . bfd_arch_i960, {* Intel 960 *}
101102 . {* The order of the following is important.
--- a/bfd/cpu-m68k.c
+++ b/bfd/cpu-m68k.c
@@ -41,53 +41,54 @@ static const bfd_arch_info_type arch_info_struct[] =
4141 N(bfd_mach_m68040, "m68k:68040", FALSE, &arch_info_struct[6]),
4242 N(bfd_mach_m68060, "m68k:68060", FALSE, &arch_info_struct[7]),
4343 N(bfd_mach_cpu32, "m68k:cpu32", FALSE, &arch_info_struct[8]),
44+ N(bfd_mach_cpu32_fido, "m68k:fido", FALSE, &arch_info_struct[9]),
4445
4546 /* Various combinations of CF architecture features */
4647 N(bfd_mach_mcf_isa_a_nodiv, "m68k:isa-a:nodiv",
47- FALSE, &arch_info_struct[9]),
48- N(bfd_mach_mcf_isa_a, "m68k:isa-a",
4948 FALSE, &arch_info_struct[10]),
50- N(bfd_mach_mcf_isa_a_mac, "m68k:isa-a:mac",
49+ N(bfd_mach_mcf_isa_a, "m68k:isa-a",
5150 FALSE, &arch_info_struct[11]),
52- N(bfd_mach_mcf_isa_a_emac, "m68k:isa-a:emac",
51+ N(bfd_mach_mcf_isa_a_mac, "m68k:isa-a:mac",
5352 FALSE, &arch_info_struct[12]),
54- N(bfd_mach_mcf_isa_aplus, "m68k:isa-aplus",
53+ N(bfd_mach_mcf_isa_a_emac, "m68k:isa-a:emac",
5554 FALSE, &arch_info_struct[13]),
56- N(bfd_mach_mcf_isa_aplus_mac, "m68k:isa-aplus:mac",
55+ N(bfd_mach_mcf_isa_aplus, "m68k:isa-aplus",
5756 FALSE, &arch_info_struct[14]),
58- N(bfd_mach_mcf_isa_aplus_emac, "m68k:isa-aplus:emac",
57+ N(bfd_mach_mcf_isa_aplus_mac, "m68k:isa-aplus:mac",
5958 FALSE, &arch_info_struct[15]),
60- N(bfd_mach_mcf_isa_b_nousp, "m68k:isa-b:nousp",
59+ N(bfd_mach_mcf_isa_aplus_emac, "m68k:isa-aplus:emac",
6160 FALSE, &arch_info_struct[16]),
62- N(bfd_mach_mcf_isa_b_nousp_mac, "m68k:isa-b:nousp:mac",
61+ N(bfd_mach_mcf_isa_b_nousp, "m68k:isa-b:nousp",
6362 FALSE, &arch_info_struct[17]),
64- N(bfd_mach_mcf_isa_b_nousp_emac, "m68k:isa-b:nousp:emac",
63+ N(bfd_mach_mcf_isa_b_nousp_mac, "m68k:isa-b:nousp:mac",
6564 FALSE, &arch_info_struct[18]),
66- N(bfd_mach_mcf_isa_b, "m68k:isa-b",
65+ N(bfd_mach_mcf_isa_b_nousp_emac, "m68k:isa-b:nousp:emac",
6766 FALSE, &arch_info_struct[19]),
68- N(bfd_mach_mcf_isa_b_mac, "m68k:isa-b:mac",
67+ N(bfd_mach_mcf_isa_b, "m68k:isa-b",
6968 FALSE, &arch_info_struct[20]),
70- N(bfd_mach_mcf_isa_b_emac, "m68k:isa-b:emac",
69+ N(bfd_mach_mcf_isa_b_mac, "m68k:isa-b:mac",
7170 FALSE, &arch_info_struct[21]),
72- N(bfd_mach_mcf_isa_b_float, "m68k:isa-b:float",
71+ N(bfd_mach_mcf_isa_b_emac, "m68k:isa-b:emac",
7372 FALSE, &arch_info_struct[22]),
74- N(bfd_mach_mcf_isa_b_float_mac, "m68k:isa-b:float:mac",
73+ N(bfd_mach_mcf_isa_b_float, "m68k:isa-b:float",
7574 FALSE, &arch_info_struct[23]),
76- N(bfd_mach_mcf_isa_b_float_emac, "m68k:isa-b:float:emac",
75+ N(bfd_mach_mcf_isa_b_float_mac, "m68k:isa-b:float:mac",
7776 FALSE, &arch_info_struct[24]),
77+ N(bfd_mach_mcf_isa_b_float_emac, "m68k:isa-b:float:emac",
78+ FALSE, &arch_info_struct[25]),
7879
7980 /* Legacy names for CF architectures */
80- N(bfd_mach_mcf_isa_a_nodiv, "m68k:5200", FALSE, &arch_info_struct[25]),
81- N(bfd_mach_mcf_isa_a_mac,"m68k:5206e", FALSE, &arch_info_struct[26]),
82- N(bfd_mach_mcf_isa_a_mac, "m68k:5307", FALSE, &arch_info_struct[27]),
83- N(bfd_mach_mcf_isa_b_nousp_mac, "m68k:5407", FALSE, &arch_info_struct[28]),
84- N(bfd_mach_mcf_isa_aplus_emac, "m68k:528x", FALSE, &arch_info_struct[29]),
85- N(bfd_mach_mcf_isa_aplus_emac, "m68k:521x", FALSE, &arch_info_struct[30]),
86- N(bfd_mach_mcf_isa_a_emac, "m68k:5249", FALSE, &arch_info_struct[31]),
81+ N(bfd_mach_mcf_isa_a_nodiv, "m68k:5200", FALSE, &arch_info_struct[26]),
82+ N(bfd_mach_mcf_isa_a_mac,"m68k:5206e", FALSE, &arch_info_struct[27]),
83+ N(bfd_mach_mcf_isa_a_mac, "m68k:5307", FALSE, &arch_info_struct[28]),
84+ N(bfd_mach_mcf_isa_b_nousp_mac, "m68k:5407", FALSE, &arch_info_struct[29]),
85+ N(bfd_mach_mcf_isa_aplus_emac, "m68k:528x", FALSE, &arch_info_struct[30]),
86+ N(bfd_mach_mcf_isa_aplus_emac, "m68k:521x", FALSE, &arch_info_struct[31]),
87+ N(bfd_mach_mcf_isa_a_emac, "m68k:5249", FALSE, &arch_info_struct[32]),
8788 N(bfd_mach_mcf_isa_b_float_emac, "m68k:547x",
88- FALSE, &arch_info_struct[32]),
89- N(bfd_mach_mcf_isa_b_float_emac, "m68k:548x",
9089 FALSE, &arch_info_struct[33]),
90+ N(bfd_mach_mcf_isa_b_float_emac, "m68k:548x",
91+ FALSE, &arch_info_struct[34]),
9192 N(bfd_mach_mcf_isa_b_float_emac, "m68k:cfv4e", FALSE, 0),
9293 };
9394
@@ -107,6 +108,7 @@ static const unsigned m68k_arch_features[] =
107108 m68040|m68881|m68851,
108109 m68060|m68881|m68851,
109110 cpu32|m68881,
111+ cpu32|m68881|fido_a,
110112 mcfisa_a,
111113 mcfisa_a|mcfhwdiv,
112114 mcfisa_a|mcfhwdiv|mcfmac,
@@ -202,16 +204,16 @@ bfd_m68k_compatible (const bfd_arch_info_type *a,
202204 if (a->mach <= bfd_mach_m68060 && b->mach <= bfd_mach_m68060)
203205 /* Merge m68k machine. */
204206 return a->mach > b->mach ? a : b;
205- else if (a->mach == bfd_mach_cpu32 && b->mach == bfd_mach_cpu32)
206- /* CPU32 is compatible with itself. */
207- return a;
208- else if (a->mach >= bfd_mach_mcf_isa_a_nodiv
209- && b->mach >= bfd_mach_mcf_isa_a_nodiv)
207+ else if (a->mach >= bfd_mach_cpu32 && b->mach >= bfd_mach_cpu32)
210208 {
211- /* Merge cf machine. */
209+ /* Merge the machine features. */
212210 unsigned features = (bfd_m68k_mach_to_features (a->mach)
213211 | bfd_m68k_mach_to_features (b->mach));
214212
213+ /* CPU32 and Coldfire are incompatible. */
214+ if ((~features & (cpu32 | mcfisa_a)) == 0)
215+ return NULL;
216+
215217 /* ISA A+ and ISA B are incompatible. */
216218 if ((~features & (mcfisa_aa | mcfisa_b)) == 0)
217219 return NULL;
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -444,7 +444,14 @@ elf32_m68k_object_p (bfd *abfd)
444444 if ((eflags & EF_M68K_ARCH_MASK) == EF_M68K_M68000)
445445 features |= m68000;
446446 else if ((eflags & EF_M68K_ARCH_MASK) == EF_M68K_CPU32)
447- features |= cpu32;
447+ {
448+ features |= cpu32;
449+ switch (eflags & EF_M68K_CPU32_MASK)
450+ {
451+ case EF_M68K_CPU32_FIDO_A:
452+ features |= fido_a; break;
453+ }
454+ }
448455 else
449456 {
450457 switch (eflags & EF_M68K_CF_ISA_MASK)
@@ -535,7 +542,7 @@ elf32_m68k_merge_private_bfd_data (ibfd, obfd)
535542 if ((in_flags & EF_M68K_ARCH_MASK) == EF_M68K_M68000)
536543 variant_mask = 0;
537544 else if ((in_flags & EF_M68K_ARCH_MASK) == EF_M68K_CPU32)
538- variant_mask = 0;
545+ variant_mask = EF_M68K_CPU32_MASK;
539546 else
540547 variant_mask = EF_M68K_CF_ISA_MASK;
541548
@@ -572,7 +579,11 @@ elf32_m68k_print_private_bfd_data (abfd, ptr)
572579 if ((eflags & EF_M68K_ARCH_MASK) == EF_M68K_M68000)
573580 fprintf (file, " [m68000]");
574581 else if ((eflags & EF_M68K_ARCH_MASK) == EF_M68K_CPU32)
575- fprintf (file, " [cpu32]");
582+ {
583+ fprintf (file, " [cpu32]");
584+ if (eflags & EF_M68K_CPU32_FIDO_A)
585+ fprintf (file, " [fido]");
586+ }
576587 else
577588 {
578589 if ((eflags & EF_M68K_ARCH_MASK) == EF_M68K_CFV4E)
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -1951,7 +1951,11 @@ get_machine_flags (unsigned e_flags, unsigned e_machine)
19511951 if ((e_flags & EF_M68K_ARCH_MASK) == EF_M68K_M68000)
19521952 strcat (buf, ", m68000");
19531953 else if ((e_flags & EF_M68K_ARCH_MASK) == EF_M68K_CPU32)
1954- strcat (buf, ", cpu32");
1954+ {
1955+ strcat (buf, ", cpu32");
1956+ if (e_flags & EF_M68K_CPU32_FIDO_A)
1957+ strcat (buf, ", fido_a");
1958+ }
19551959 else
19561960 {
19571961 char const *isa = _("unknown");
--- a/gas/config/tc-m68k.c
+++ b/gas/config/tc-m68k.c
@@ -7552,7 +7552,11 @@ m68k_elf_final_processing (void)
75527552 flags |= EF_M68K_CFV4E;
75537553 /* Set file-specific flags if this is a cpu32 processor. */
75547554 if (cpu_of_arch (current_architecture) & cpu32)
7555- flags |= EF_M68K_CPU32;
7555+ {
7556+ flags |= EF_M68K_CPU32;
7557+ if (cpu_of_arch (current_architecture) & fido_a)
7558+ flags |= EF_M68K_CPU32_FIDO_A;
7559+ }
75567560 else if ((cpu_of_arch (current_architecture) & m68000up)
75577561 && !(cpu_of_arch (current_architecture) & m68020up))
75587562 flags |= EF_M68K_M68000;
--- a/include/elf/m68k.h
+++ b/include/elf/m68k.h
@@ -76,4 +76,10 @@ END_RELOC_NUMBERS (R_68K_max)
7676 #define EF_M68K_CF_FLOAT 0x40 /* Has float insns */
7777 #define EF_M68K_CF_MASK 0xFF
7878
79+/* We use the bottom 8 bits to encode information about the
80+ CPU32 variant. If we use any of these bits, the top 24 bits must
81+ be EF_M68K_CPU32. */
82+#define EF_M68K_CPU32_FIDO_A 0x01
83+#define EF_M68K_CPU32_MASK 0xFF
84+
7985 #endif