xref: /openbsd-src/gnu/usr.bin/binutils/bfd/cpu-i386.c (revision c074d1c999f3e07019cd5e9a2f190b057ef3b935)
12159047fSniklas /* BFD support for the Intel 386 architecture.
2*c074d1c9Sdrahn    Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001, 2002
3b55d4692Sfgsch    Free Software Foundation, Inc.
42159047fSniklas 
52159047fSniklas This file is part of BFD, the Binary File Descriptor library.
62159047fSniklas 
72159047fSniklas This program is free software; you can redistribute it and/or modify
82159047fSniklas it under the terms of the GNU General Public License as published by
92159047fSniklas the Free Software Foundation; either version 2 of the License, or
102159047fSniklas (at your option) any later version.
112159047fSniklas 
122159047fSniklas This program is distributed in the hope that it will be useful,
132159047fSniklas but WITHOUT ANY WARRANTY; without even the implied warranty of
142159047fSniklas MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
152159047fSniklas GNU General Public License for more details.
162159047fSniklas 
172159047fSniklas You should have received a copy of the GNU General Public License
182159047fSniklas along with this program; if not, write to the Free Software
192159047fSniklas Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
202159047fSniklas 
212159047fSniklas #include "bfd.h"
222159047fSniklas #include "sysdep.h"
232159047fSniklas #include "libbfd.h"
242159047fSniklas 
25b305b0f1Sespie const bfd_arch_info_type bfd_i386_arch_intel_syntax =
26b305b0f1Sespie {
27b305b0f1Sespie   32,	/* 32 bits in a word */
28b305b0f1Sespie   32,	/* 32 bits in an address */
29b305b0f1Sespie   8,	/* 8 bits in a byte */
30b305b0f1Sespie   bfd_arch_i386,
31b305b0f1Sespie   bfd_mach_i386_i386_intel_syntax,
32b305b0f1Sespie   "i386:intel",
33b305b0f1Sespie   "i386:intel",
34b305b0f1Sespie   3,
35*c074d1c9Sdrahn   TRUE,
36b305b0f1Sespie   bfd_default_compatible,
37b305b0f1Sespie   bfd_default_scan ,
38b305b0f1Sespie   0,
39b305b0f1Sespie };
40b55d4692Sfgsch const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
41b55d4692Sfgsch {
42b55d4692Sfgsch   64, /* 64 bits in a word */
43b55d4692Sfgsch   64, /* 64 bits in an address */
44b55d4692Sfgsch   8,  /* 8 bits in a byte */
45b55d4692Sfgsch   bfd_arch_i386,
46b55d4692Sfgsch   bfd_mach_x86_64_intel_syntax,
47*c074d1c9Sdrahn   "i386:intel",
48*c074d1c9Sdrahn   "i386:x86-64:intel",
49b55d4692Sfgsch   3,
50*c074d1c9Sdrahn   TRUE,
51b55d4692Sfgsch   bfd_default_compatible,
52b55d4692Sfgsch   bfd_default_scan ,
53b55d4692Sfgsch   &bfd_i386_arch_intel_syntax,
54b55d4692Sfgsch };
554361b62eSniklas static const bfd_arch_info_type i8086_arch =
564361b62eSniklas {
574361b62eSniklas   32,	/* 32 bits in a word */
584361b62eSniklas   32,	/* 32 bits in an address (well, not really) */
594361b62eSniklas   8,	/* 8 bits in a byte */
604361b62eSniklas   bfd_arch_i386,
614361b62eSniklas   bfd_mach_i386_i8086,
624361b62eSniklas   "i8086",
634361b62eSniklas   "i8086",
644361b62eSniklas   3,
65*c074d1c9Sdrahn   FALSE,
664361b62eSniklas   bfd_default_compatible,
674361b62eSniklas   bfd_default_scan ,
68b55d4692Sfgsch   &bfd_x86_64_arch_intel_syntax,
69b55d4692Sfgsch };
70b55d4692Sfgsch 
71b55d4692Sfgsch const bfd_arch_info_type bfd_x86_64_arch =
72b55d4692Sfgsch {
73b55d4692Sfgsch   64, /* 32 bits in a word */
74b55d4692Sfgsch   64, /* 32 bits in an address */
75b55d4692Sfgsch   8,  /* 8 bits in a byte */
76b55d4692Sfgsch   bfd_arch_i386,
77b55d4692Sfgsch   bfd_mach_x86_64,
78*c074d1c9Sdrahn   "i386",
79*c074d1c9Sdrahn   "i386:x86-64",
80b55d4692Sfgsch   3,
81*c074d1c9Sdrahn   TRUE,
82b55d4692Sfgsch   bfd_default_compatible,
83b55d4692Sfgsch   bfd_default_scan ,
84b55d4692Sfgsch   &i8086_arch,
854361b62eSniklas };
864361b62eSniklas 
872159047fSniklas const bfd_arch_info_type bfd_i386_arch =
882159047fSniklas {
892159047fSniklas   32,	/* 32 bits in a word */
902159047fSniklas   32,	/* 32 bits in an address */
912159047fSniklas   8,	/* 8 bits in a byte */
922159047fSniklas   bfd_arch_i386,
934361b62eSniklas   bfd_mach_i386_i386,
942159047fSniklas   "i386",
952159047fSniklas   "i386",
962159047fSniklas   3,
97*c074d1c9Sdrahn   TRUE,
982159047fSniklas   bfd_default_compatible,
992159047fSniklas   bfd_default_scan ,
100b55d4692Sfgsch   &bfd_x86_64_arch
1012159047fSniklas };
102