1 /* BFD support for the Intel 386 architecture.
2 Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001, 2002, 2004, 2005,
4 Free Software Foundation, Inc.
6 This file is part of BFD, the Binary File Descriptor library.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21 MA 02110-1301, USA. */
27 static const bfd_arch_info_type
*
28 bfd_i386_compatible (const bfd_arch_info_type
*a
,
29 const bfd_arch_info_type
*b
)
31 const bfd_arch_info_type
*compat
= bfd_default_compatible (a
, b
);
33 /* Don't allow mixing x64_32 with x86_64. */
35 && (a
->mach
& bfd_mach_x64_32
) != (b
->mach
& bfd_mach_x64_32
))
41 static const bfd_arch_info_type bfd_x64_32_arch_intel_syntax
=
43 64, /* 64 bits in a word */
44 64, /* 64 bits in an address */
45 8, /* 8 bits in a byte */
47 bfd_mach_x64_32_intel_syntax
,
57 static const bfd_arch_info_type bfd_x86_64_arch_intel_syntax
=
59 64, /* 64 bits in a word */
60 64, /* 64 bits in an address */
61 8, /* 8 bits in a byte */
63 bfd_mach_x86_64_intel_syntax
,
70 &bfd_x64_32_arch_intel_syntax
,
73 static const bfd_arch_info_type bfd_i386_arch_intel_syntax
=
75 32, /* 32 bits in a word */
76 32, /* 32 bits in an address */
77 8, /* 8 bits in a byte */
79 bfd_mach_i386_i386_intel_syntax
,
86 &bfd_x86_64_arch_intel_syntax
89 static const bfd_arch_info_type i8086_arch
=
91 32, /* 32 bits in a word */
92 32, /* 32 bits in an address (well, not really) */
93 8, /* 8 bits in a byte */
102 &bfd_i386_arch_intel_syntax
105 static const bfd_arch_info_type bfd_x64_32_arch
=
107 64, /* 64 bits in a word */
108 64, /* 64 bits in an address */
109 8, /* 8 bits in a byte */
121 static const bfd_arch_info_type bfd_x86_64_arch
=
123 64, /* 64 bits in a word */
124 64, /* 64 bits in an address */
125 8, /* 8 bits in a byte */
137 const bfd_arch_info_type bfd_i386_arch
=
139 32, /* 32 bits in a word */
140 32, /* 32 bits in an address */
141 8, /* 8 bits in a byte */