aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-10-25 17:40:19 +0000
committerNick Clifton <nickc@redhat.com>2005-10-25 17:40:19 +0000
commit3c9b82baee30a1d3cfeb419643c6363dc9267208 (patch)
treee967c167366034d2a3bef0221e40d5abe7b999b6 /bfd/coffcode.h
parentfcfa13d2b2b18f83382c2a0cb82c9c7d21be10cb (diff)
downloadgdb-3c9b82baee30a1d3cfeb419643c6363dc9267208.zip
gdb-3c9b82baee30a1d3cfeb419643c6363dc9267208.tar.gz
gdb-3c9b82baee30a1d3cfeb419643c6363dc9267208.tar.bz2
Add support for the Z80 processor family
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r--bfd/coffcode.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 3b94dff..aaf79c1 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -1955,6 +1955,23 @@ coff_set_arch_mach_hook (bfd *abfd, void * filehdr)
machine = 88100;
break;
#endif
+#ifdef Z80MAGIC
+ case Z80MAGIC:
+ arch = bfd_arch_z80;
+ switch (internal_f->f_flags & F_MACHMASK)
+ {
+ case 0:
+ case bfd_mach_z80strict << 12:
+ case bfd_mach_z80 << 12:
+ case bfd_mach_z80full << 12:
+ case bfd_mach_r800 << 12:
+ machine = ((unsigned)internal_f->f_flags & F_MACHMASK) >> 12;
+ break;
+ default:
+ return FALSE;
+ }
+ break;
+#endif
#ifdef Z8KMAGIC
case Z8KMAGIC:
arch = bfd_arch_z8k;
@@ -2555,6 +2572,24 @@ coff_set_flags (bfd * abfd,
{
switch (bfd_get_arch (abfd))
{
+#ifdef Z80MAGIC
+ case bfd_arch_z80:
+ *magicp = Z80MAGIC;
+ switch (bfd_get_mach (abfd))
+ {
+ case 0:
+ case bfd_mach_z80strict:
+ case bfd_mach_z80:
+ case bfd_mach_z80full:
+ case bfd_mach_r800:
+ *flagsp = bfd_get_mach (abfd) << 12;
+ break;
+ default:
+ return FALSE;
+ }
+ return TRUE;
+#endif
+
#ifdef Z8KMAGIC
case bfd_arch_z8k:
*magicp = Z8KMAGIC;