Convert ia64-gen to use getopt(). Add standard GNU options plus --srcdir.
[deliverable/binutils-gdb.git] / opcodes / ia64-opc-x.c
1 /* ia64-opc-x.c -- IA-64 `X' opcode table.
2 Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
3 Contributed by Timothy Wall <twall@cygnus.com>
4
5 This file is part of GDB, GAS, and the GNU binutils.
6
7 GDB, GAS, and the GNU binutils are free software; you can redistribute
8 them and/or modify them under the terms of the GNU General Public
9 License as published by the Free Software Foundation; either version
10 2, or (at your option) any later version.
11
12 GDB, GAS, and the GNU binutils are distributed in the hope that they
13 will be useful, but WITHOUT ANY WARRANTY; without even the implied
14 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
15 the GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this file; see the file COPYING. If not, write to the
19 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
21
22 #include "ia64-opc.h"
23
24 /* Identify the specific X-unit type. */
25 #define X0 IA64_TYPE_X, 0
26 #define X IA64_TYPE_X, 1
27
28 /* Instruction bit fields: */
29 #define bBtype(x) (((ia64_insn) ((x) & 0x7)) << 6)
30 #define bD(x) (((ia64_insn) ((x) & 0x1)) << 35)
31 #define bPa(x) (((ia64_insn) ((x) & 0x1)) << 12)
32 #define bPr(x) (((ia64_insn) ((x) & 0x3f)) << 0)
33 #define bVc(x) (((ia64_insn) ((x) & 0x1)) << 20)
34 #define bWha(x) (((ia64_insn) ((x) & 0x3)) << 33)
35 #define bX3(x) (((ia64_insn) ((x) & 0x7)) << 33)
36 #define bX6(x) (((ia64_insn) ((x) & 0x3f)) << 27)
37
38 #define mBtype bBtype (-1)
39 #define mD bD (-1)
40 #define mPa bPa (-1)
41 #define mPr bPr (-1)
42 #define mVc bVc (-1)
43 #define mWha bWha (-1)
44 #define mX3 bX3 (-1)
45 #define mX6 bX6 (-1)
46
47 #define OpX3X6(a,b,c) (bOp (a) | bX3 (b) | bX6(c)), \
48 (mOp | mX3 | mX6)
49 #define OpVc(a,b) (bOp (a) | bVc (b)), (mOp | mVc)
50 #define OpPaWhaD(a,b,c,d) \
51 (bOp (a) | bPa (b) | bWha (c) | bD (d)), (mOp | mPa | mWha | mD)
52 #define OpBtypePaWhaD(a,b,c,d,e) \
53 (bOp (a) | bBtype (b) | bPa (c) | bWha (d) | bD (e)), \
54 (mOp | mBtype | mPa | mWha | mD)
55 #define OpBtypePaWhaDPr(a,b,c,d,e,f) \
56 (bOp (a) | bBtype (b) | bPa (c) | bWha (d) | bD (e) | bPr (f)), \
57 (mOp | mBtype | mPa | mWha | mD | mPr)
58
59 struct ia64_opcode ia64_opcodes_x[] =
60 {
61 {"break.x", X0, OpX3X6 (0, 0, 0x00), {IMMU62}, 0, 0, NULL},
62 {"nop.x", X0, OpX3X6 (0, 0, 0x01), {IMMU62}, 0, 0, NULL},
63 {"movl", X, OpVc (6, 0), {R1, IMMU64}, 0, 0, NULL},
64 #define BRL(a,b) \
65 X0, OpBtypePaWhaDPr (0xC, 0, a, 0, b, 0), {TGT64}, PSEUDO, 0, NULL
66 {"brl.few", BRL (0, 0)},
67 {"brl", BRL (0, 0)},
68 {"brl.few.clr", BRL (0, 1)},
69 {"brl.clr", BRL (0, 1)},
70 {"brl.many", BRL (1, 0)},
71 {"brl.many.clr", BRL (1, 1)},
72 #undef BRL
73 #define BRL(a,b,c) \
74 X0, OpBtypePaWhaD (0xC, 0, a, b, c), {TGT64}, 0, 0, NULL
75 #define BRLP(a,b,c) \
76 X0, OpBtypePaWhaD (0xC, 0, a, b, c), {TGT64}, PSEUDO, 0, NULL
77 {"brl.cond.sptk.few", BRL (0, 0, 0)},
78 {"brl.cond.sptk", BRLP (0, 0, 0)},
79 {"brl.cond.sptk.few.clr", BRL (0, 0, 1)},
80 {"brl.cond.sptk.clr", BRLP (0, 0, 1)},
81 {"brl.cond.spnt.few", BRL (0, 1, 0)},
82 {"brl.cond.spnt", BRLP (0, 1, 0)},
83 {"brl.cond.spnt.few.clr", BRL (0, 1, 1)},
84 {"brl.cond.spnt.clr", BRLP (0, 1, 1)},
85 {"brl.cond.dptk.few", BRL (0, 2, 0)},
86 {"brl.cond.dptk", BRLP (0, 2, 0)},
87 {"brl.cond.dptk.few.clr", BRL (0, 2, 1)},
88 {"brl.cond.dptk.clr", BRLP (0, 2, 1)},
89 {"brl.cond.dpnt.few", BRL (0, 3, 0)},
90 {"brl.cond.dpnt", BRLP (0, 3, 0)},
91 {"brl.cond.dpnt.few.clr", BRL (0, 3, 1)},
92 {"brl.cond.dpnt.clr", BRLP (0, 3, 1)},
93 {"brl.cond.sptk.many", BRL (1, 0, 0)},
94 {"brl.cond.sptk.many.clr", BRL (1, 0, 1)},
95 {"brl.cond.spnt.many", BRL (1, 1, 0)},
96 {"brl.cond.spnt.many.clr", BRL (1, 1, 1)},
97 {"brl.cond.dptk.many", BRL (1, 2, 0)},
98 {"brl.cond.dptk.many.clr", BRL (1, 2, 1)},
99 {"brl.cond.dpnt.many", BRL (1, 3, 0)},
100 {"brl.cond.dpnt.many.clr", BRL (1, 3, 1)},
101 {"brl.sptk.few", BRL (0, 0, 0)},
102 {"brl.sptk", BRLP (0, 0, 0)},
103 {"brl.sptk.few.clr", BRL (0, 0, 1)},
104 {"brl.sptk.clr", BRLP (0, 0, 1)},
105 {"brl.spnt.few", BRL (0, 1, 0)},
106 {"brl.spnt", BRLP (0, 1, 0)},
107 {"brl.spnt.few.clr", BRL (0, 1, 1)},
108 {"brl.spnt.clr", BRLP (0, 1, 1)},
109 {"brl.dptk.few", BRL (0, 2, 0)},
110 {"brl.dptk", BRLP (0, 2, 0)},
111 {"brl.dptk.few.clr", BRL (0, 2, 1)},
112 {"brl.dptk.clr", BRLP (0, 2, 1)},
113 {"brl.dpnt.few", BRL (0, 3, 0)},
114 {"brl.dpnt", BRLP (0, 3, 0)},
115 {"brl.dpnt.few.clr", BRL (0, 3, 1)},
116 {"brl.dpnt.clr", BRLP (0, 3, 1)},
117 {"brl.sptk.many", BRL (1, 0, 0)},
118 {"brl.sptk.many.clr", BRL (1, 0, 1)},
119 {"brl.spnt.many", BRL (1, 1, 0)},
120 {"brl.spnt.many.clr", BRL (1, 1, 1)},
121 {"brl.dptk.many", BRL (1, 2, 0)},
122 {"brl.dptk.many.clr", BRL (1, 2, 1)},
123 {"brl.dpnt.many", BRL (1, 3, 0)},
124 {"brl.dpnt.many.clr", BRL (1, 3, 1)},
125 #undef BRL
126 #undef BRLP
127 #define BRL(a,b,c) X, OpPaWhaD (0xD, a, b, c), {B1, TGT64}, 0, 0, NULL
128 #define BRLP(a,b,c) X, OpPaWhaD (0xD, a, b, c), {B1, TGT64}, PSEUDO, 0, NULL
129 {"brl.call.sptk.few", BRL (0, 0, 0)},
130 {"brl.call.sptk", BRLP (0, 0, 0)},
131 {"brl.call.sptk.few.clr", BRL (0, 0, 1)},
132 {"brl.call.sptk.clr", BRLP (0, 0, 1)},
133 {"brl.call.spnt.few", BRL (0, 1, 0)},
134 {"brl.call.spnt", BRLP (0, 1, 0)},
135 {"brl.call.spnt.few.clr", BRL (0, 1, 1)},
136 {"brl.call.spnt.clr", BRLP (0, 1, 1)},
137 {"brl.call.dptk.few", BRL (0, 2, 0)},
138 {"brl.call.dptk", BRLP (0, 2, 0)},
139 {"brl.call.dptk.few.clr", BRL (0, 2, 1)},
140 {"brl.call.dptk.clr", BRLP (0, 2, 1)},
141 {"brl.call.dpnt.few", BRL (0, 3, 0)},
142 {"brl.call.dpnt", BRLP (0, 3, 0)},
143 {"brl.call.dpnt.few.clr", BRL (0, 3, 1)},
144 {"brl.call.dpnt.clr", BRLP (0, 3, 1)},
145 {"brl.call.sptk.many", BRL (1, 0, 0)},
146 {"brl.call.sptk.many.clr", BRL (1, 0, 1)},
147 {"brl.call.spnt.many", BRL (1, 1, 0)},
148 {"brl.call.spnt.many.clr", BRL (1, 1, 1)},
149 {"brl.call.dptk.many", BRL (1, 2, 0)},
150 {"brl.call.dptk.many.clr", BRL (1, 2, 1)},
151 {"brl.call.dpnt.many", BRL (1, 3, 0)},
152 {"brl.call.dpnt.many.clr", BRL (1, 3, 1)},
153 #undef BRL
154 #undef BRLP
155 {NULL, 0, 0, 0, 0, {0}, 0, 0, NULL}
156 };
157
158 #undef X0
159 #undef X
160
161 #undef bBtype
162 #undef bD
163 #undef bPa
164 #undef bPr
165 #undef bVc
166 #undef bWha
167 #undef bX3
168 #undef bX6
169
170 #undef mBtype
171 #undef mD
172 #undef mPa
173 #undef mPr
174 #undef mVc
175 #undef mWha
176 #undef mX3
177 #undef mX6
178
179 #undef OpX3X6
180 #undef OpVc
181 #undef OpPaWhaD
182 #undef OpBtypePaWhaD
183 #undef OpBtypePaWhaDPr
This page took 0.039366 seconds and 5 git commands to generate.