Add x86-64 ILP32 support.
[deliverable/binutils-gdb.git] / bfd / cpu-i386.c
CommitLineData
252b5132 1/* BFD support for the Intel 386 architecture.
aa820537
AM
2 Copyright 1992, 1994, 1995, 1996, 1998, 2000, 2001, 2002, 2004, 2005,
3 2007, 2009
7898deda 4 Free Software Foundation, Inc.
252b5132 5
cd123cb7 6 This file is part of BFD, the Binary File Descriptor library.
252b5132 7
cd123cb7
NC
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.
252b5132 12
cd123cb7
NC
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.
252b5132 17
cd123cb7
NC
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. */
252b5132 22
252b5132 23#include "sysdep.h"
3db64b00 24#include "bfd.h"
252b5132
RH
25#include "libbfd.h"
26
351f65ca
L
27static const bfd_arch_info_type bfd_x64_32_arch_intel_syntax =
28{
29 64, /* 64 bits in a word */
30 32, /* 32 bits in an address */
31 8, /* 8 bits in a byte */
32 bfd_arch_i386,
33 bfd_mach_x64_32_intel_syntax,
34 "i386:intel",
35 "i386:x64-32:intel",
36 3,
37 FALSE,
38 bfd_default_compatible,
39 bfd_default_scan,
40 0
41};
42
34274ccc 43static const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
8d88c4ca
NC
44{
45 64, /* 64 bits in a word */
46 64, /* 64 bits in an address */
47 8, /* 8 bits in a byte */
48 bfd_arch_i386,
49 bfd_mach_x86_64_intel_syntax,
beb43bb9
JH
50 "i386:intel",
51 "i386:x86-64:intel",
8d88c4ca 52 3,
1abc8597
AM
53 FALSE,
54 bfd_default_compatible,
55 bfd_default_scan,
351f65ca 56 &bfd_x64_32_arch_intel_syntax,
1abc8597
AM
57};
58
34274ccc 59static const bfd_arch_info_type bfd_i386_arch_intel_syntax =
1abc8597
AM
60{
61 32, /* 32 bits in a word */
62 32, /* 32 bits in an address */
63 8, /* 8 bits in a byte */
64 bfd_arch_i386,
65 bfd_mach_i386_i386_intel_syntax,
66 "i386:intel",
67 "i386:intel",
68 3,
b34976b6 69 TRUE,
b74fa2cd 70 bfd_default_compatible,
1abc8597
AM
71 bfd_default_scan,
72 &bfd_x86_64_arch_intel_syntax
8d88c4ca 73};
1abc8597 74
34274ccc 75static const bfd_arch_info_type i8086_arch =
252b5132
RH
76{
77 32, /* 32 bits in a word */
78 32, /* 32 bits in an address (well, not really) */
79 8, /* 8 bits in a byte */
80 bfd_arch_i386,
81 bfd_mach_i386_i8086,
82 "i8086",
83 "i8086",
84 3,
b34976b6 85 FALSE,
b74fa2cd 86 bfd_default_compatible,
1abc8597
AM
87 bfd_default_scan,
88 &bfd_i386_arch_intel_syntax
8d88c4ca
NC
89};
90
351f65ca
L
91static const bfd_arch_info_type bfd_x64_32_arch =
92{
93 64, /* 64 bits in a word */
94 32, /* 32 bits in an address */
95 8, /* 8 bits in a byte */
96 bfd_arch_i386,
97 bfd_mach_x64_32,
98 "i386",
99 "i386:x64-32",
100 3,
101 FALSE,
102 bfd_default_compatible,
103 bfd_default_scan,
104 &i8086_arch
105};
106
34274ccc 107static const bfd_arch_info_type bfd_x86_64_arch =
8d88c4ca 108{
b1995b01
L
109 64, /* 64 bits in a word */
110 64, /* 64 bits in an address */
8d88c4ca
NC
111 8, /* 8 bits in a byte */
112 bfd_arch_i386,
113 bfd_mach_x86_64,
beb43bb9
JH
114 "i386",
115 "i386:x86-64",
8d88c4ca 116 3,
1abc8597 117 FALSE,
b74fa2cd 118 bfd_default_compatible,
1abc8597 119 bfd_default_scan,
351f65ca 120 &bfd_x64_32_arch
252b5132
RH
121};
122
123const bfd_arch_info_type bfd_i386_arch =
124{
125 32, /* 32 bits in a word */
126 32, /* 32 bits in an address */
127 8, /* 8 bits in a byte */
128 bfd_arch_i386,
129 bfd_mach_i386_i386,
130 "i386",
131 "i386",
132 3,
b34976b6 133 TRUE,
b74fa2cd 134 bfd_default_compatible,
1abc8597 135 bfd_default_scan,
3fde5a36 136 &bfd_x86_64_arch
252b5132 137};
This page took 0.496751 seconds and 4 git commands to generate.