cpu-i386.c revision 94536
1193323Sed/* BFD support for the Intel 386 architecture.
2193323Sed   Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001, 2002
3193323Sed   Free Software Foundation, Inc.
4193323Sed
5193323SedThis file is part of BFD, the Binary File Descriptor library.
6193323Sed
7193323SedThis program is free software; you can redistribute it and/or modify
8193323Sedit under the terms of the GNU General Public License as published by
9193323Sedthe Free Software Foundation; either version 2 of the License, or
10193323Sed(at your option) any later version.
11193323Sed
12193323SedThis program is distributed in the hope that it will be useful,
13193323Sedbut WITHOUT ANY WARRANTY; without even the implied warranty of
14193323SedMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15193323SedGNU General Public License for more details.
16193323Sed
17193323SedYou should have received a copy of the GNU General Public License
18218893Sdimalong with this program; if not, write to the Free Software
19193323SedFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
20193323Sed
21193323Sed#include "bfd.h"
22193323Sed#include "sysdep.h"
23193323Sed#include "libbfd.h"
24193323Sed
25193323Sedconst bfd_arch_info_type bfd_i386_arch_intel_syntax =
26193323Sed{
27193323Sed  32,	/* 32 bits in a word */
28193323Sed  32,	/* 32 bits in an address */
29193323Sed  8,	/* 8 bits in a byte */
30193323Sed  bfd_arch_i386,
31193323Sed  bfd_mach_i386_i386_intel_syntax,
32193323Sed  "i386:intel",
33193323Sed  "i386:intel",
34193323Sed  3,
35193323Sed  true,
36193323Sed  bfd_default_compatible,
37193323Sed  bfd_default_scan ,
38193323Sed  0,
39193323Sed};
40193323Sedconst bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
41198892Srdivacky{
42193323Sed  64, /* 64 bits in a word */
43193323Sed  64, /* 64 bits in an address */
44193323Sed  8,  /* 8 bits in a byte */
45193323Sed  bfd_arch_i386,
46193323Sed  bfd_mach_x86_64_intel_syntax,
47193323Sed  "i386:intel",
48193323Sed  "i386:x86-64:intel",
49193323Sed  3,
50193323Sed  true,
51193323Sed  bfd_default_compatible,
52193323Sed  bfd_default_scan ,
53198090Srdivacky  &bfd_i386_arch_intel_syntax,
54198090Srdivacky};
55193323Sedstatic const bfd_arch_info_type i8086_arch =
56198090Srdivacky{
57198090Srdivacky  32,	/* 32 bits in a word */
58198090Srdivacky  32,	/* 32 bits in an address (well, not really) */
59193323Sed  8,	/* 8 bits in a byte */
60198090Srdivacky  bfd_arch_i386,
61193323Sed  bfd_mach_i386_i8086,
62198090Srdivacky  "i8086",
63193323Sed  "i8086",
64193323Sed  3,
65193323Sed  false,
66193323Sed  bfd_default_compatible,
67193323Sed  bfd_default_scan ,
68193323Sed  &bfd_x86_64_arch_intel_syntax,
69193323Sed};
70193323Sed
71193323Sedconst bfd_arch_info_type bfd_x86_64_arch =
72193323Sed{
73193323Sed  64, /* 32 bits in a word */
74193323Sed  64, /* 32 bits in an address */
75193323Sed  8,  /* 8 bits in a byte */
76193323Sed  bfd_arch_i386,
77193323Sed  bfd_mach_x86_64,
78193323Sed  "i386",
79193323Sed  "i386:x86-64",
80193323Sed  3,
81193323Sed  true,
82  bfd_default_compatible,
83  bfd_default_scan ,
84  &i8086_arch,
85};
86
87const bfd_arch_info_type bfd_i386_arch =
88{
89  32,	/* 32 bits in a word */
90  32,	/* 32 bits in an address */
91  8,	/* 8 bits in a byte */
92  bfd_arch_i386,
93  bfd_mach_i386_i386,
94  "i386",
95  "i386",
96  3,
97  true,
98  bfd_default_compatible,
99  bfd_default_scan ,
100  &bfd_x86_64_arch
101};
102