summaryrefslogtreecommitdiff
path: root/opcodes/ia64-opc-x.c
blob: 9d9a6c109cc87344909a975a9317d9deaab5619c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
/* ia64-opc-x.c -- IA-64 `X' opcode table.
   Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
   Contributed by Timothy Wall <twall@cygnus.com>

   This file is part of GDB, GAS, and the GNU binutils.

   GDB, GAS, and the GNU binutils are free software; you can redistribute
   them and/or modify them under the terms of the GNU General Public
   License as published by the Free Software Foundation; either version
   2, or (at your option) any later version.

   GDB, GAS, and the GNU binutils are distributed in the hope that they
   will be useful, but WITHOUT ANY WARRANTY; without even the implied
   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
   the GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this file; see the file COPYING.  If not, write to the
   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
   02111-1307, USA.  */

#include "ia64-opc.h"

/* Identify the specific X-unit type.  */
#define X0      IA64_TYPE_X, 0
#define X	IA64_TYPE_X, 1

/* Instruction bit fields:  */
#define bBtype(x)	(((ia64_insn) ((x) & 0x7)) << 6)
#define bD(x)		(((ia64_insn) ((x) & 0x1)) << 35)
#define bPa(x)		(((ia64_insn) ((x) & 0x1)) << 12)
#define bPr(x)		(((ia64_insn) ((x) & 0x3f)) << 0)
#define bVc(x)		(((ia64_insn) ((x) & 0x1)) << 20)
#define bWha(x)		(((ia64_insn) ((x) & 0x3)) << 33)
#define bX3(x)		(((ia64_insn) ((x) & 0x7)) << 33)
#define bX6(x)		(((ia64_insn) ((x) & 0x3f)) << 27)

#define mBtype		bBtype (-1)
#define mD		bD (-1)
#define mPa		bPa (-1)
#define mPr		bPr (-1)
#define mVc             bVc (-1)
#define mWha		bWha (-1)
#define mX3             bX3 (-1)
#define mX6		bX6 (-1)

#define OpX3X6(a,b,c)		(bOp (a) | bX3 (b) | bX6(c)), \
				(mOp | mX3 | mX6)
#define OpVc(a,b)		(bOp (a) | bVc (b)), (mOp | mVc)
#define OpPaWhaD(a,b,c,d) \
	(bOp (a) | bPa (b) | bWha (c) | bD (d)), (mOp | mPa | mWha | mD)
#define OpBtypePaWhaD(a,b,c,d,e) \
	(bOp (a) | bBtype (b) | bPa (c) | bWha (d) | bD (e)), \
	(mOp | mBtype | mPa | mWha | mD)
#define OpBtypePaWhaDPr(a,b,c,d,e,f) \
	(bOp (a) | bBtype (b) | bPa (c) | bWha (d) | bD (e) | bPr (f)), \
	(mOp | mBtype | mPa | mWha | mD | mPr)

struct ia64_opcode ia64_opcodes_x[] =
  {
    {"break.x", X0, OpX3X6 (0, 0, 0x00), {IMMU62}, 0, 0, NULL},
    {"nop.x",   X0, OpX3X6 (0, 0, 0x01), {IMMU62}, 0, 0, NULL},
    {"movl",	X,  OpVc (6, 0), {R1, IMMU64}, 0, 0, NULL},
#define BRL(a,b) \
      X0, OpBtypePaWhaDPr (0xC, 0, a, 0, b, 0), {TGT64}, PSEUDO, 0, NULL
    {"brl.few",         BRL (0, 0)},
    {"brl",             BRL (0, 0)},
    {"brl.few.clr",	BRL (0, 1)},
    {"brl.clr",		BRL (0, 1)},
    {"brl.many",	BRL (1, 0)},
    {"brl.many.clr",	BRL (1, 1)},
#undef BRL
#define BRL(a,b,c) \
      X0, OpBtypePaWhaD (0xC, 0, a, b, c), {TGT64}, 0, 0, NULL
#define BRLP(a,b,c) \
      X0, OpBtypePaWhaD (0xC, 0, a, b, c), {TGT64}, PSEUDO, 0, NULL
    {"brl.cond.sptk.few",	BRL (0, 0, 0)},
    {"brl.cond.sptk",		BRLP (0, 0, 0)},
    {"brl.cond.sptk.few.clr",	BRL (0, 0, 1)},
    {"brl.cond.sptk.clr",	BRLP (0, 0, 1)},
    {"brl.cond.spnt.few",	BRL (0, 1, 0)},
    {"brl.cond.spnt",		BRLP (0, 1, 0)},
    {"brl.cond.spnt.few.clr",	BRL (0, 1, 1)},
    {"brl.cond.spnt.clr",	BRLP (0, 1, 1)},
    {"brl.cond.dptk.few",	BRL (0, 2, 0)},
    {"brl.cond.dptk",		BRLP (0, 2, 0)},
    {"brl.cond.dptk.few.clr",	BRL (0, 2, 1)},
    {"brl.cond.dptk.clr",	BRLP (0, 2, 1)},
    {"brl.cond.dpnt.few",	BRL (0, 3, 0)},
    {"brl.cond.dpnt",		BRLP (0, 3, 0)},
    {"brl.cond.dpnt.few.clr",	BRL (0, 3, 1)},
    {"brl.cond.dpnt.clr",	BRLP (0, 3, 1)},
    {"brl.cond.sptk.many",	BRL (1, 0, 0)},
    {"brl.cond.sptk.many.clr",	BRL (1, 0, 1)},
    {"brl.cond.spnt.many",	BRL (1, 1, 0)},
    {"brl.cond.spnt.many.clr",	BRL (1, 1, 1)},
    {"brl.cond.dptk.many",	BRL (1, 2, 0)},
    {"brl.cond.dptk.many.clr",	BRL (1, 2, 1)},
    {"brl.cond.dpnt.many",	BRL (1, 3, 0)},
    {"brl.cond.dpnt.many.clr",	BRL (1, 3, 1)},
    {"brl.sptk.few",		BRL (0, 0, 0)},
    {"brl.sptk",		BRLP (0, 0, 0)},
    {"brl.sptk.few.clr",	BRL (0, 0, 1)},
    {"brl.sptk.clr",		BRLP (0, 0, 1)},
    {"brl.spnt.few",		BRL (0, 1, 0)},
    {"brl.spnt",		BRLP (0, 1, 0)},
    {"brl.spnt.few.clr",	BRL (0, 1, 1)},
    {"brl.spnt.clr",		BRLP (0, 1, 1)},
    {"brl.dptk.few",		BRL (0, 2, 0)},
    {"brl.dptk",		BRLP (0, 2, 0)},
    {"brl.dptk.few.clr",	BRL (0, 2, 1)},
    {"brl.dptk.clr",		BRLP (0, 2, 1)},
    {"brl.dpnt.few",		BRL (0, 3, 0)},
    {"brl.dpnt",		BRLP (0, 3, 0)},
    {"brl.dpnt.few.clr",	BRL (0, 3, 1)},
    {"brl.dpnt.clr",		BRLP (0, 3, 1)},
    {"brl.sptk.many",		BRL (1, 0, 0)},
    {"brl.sptk.many.clr",	BRL (1, 0, 1)},
    {"brl.spnt.many",		BRL (1, 1, 0)},
    {"brl.spnt.many.clr",	BRL (1, 1, 1)},
    {"brl.dptk.many",		BRL (1, 2, 0)},
    {"brl.dptk.many.clr",	BRL (1, 2, 1)},
    {"brl.dpnt.many",		BRL (1, 3, 0)},
    {"brl.dpnt.many.clr",	BRL (1, 3, 1)},
#undef BRL
#undef BRLP
#define BRL(a,b,c) X, OpPaWhaD (0xD, a, b, c), {B1, TGT64}, 0, 0, NULL
#define BRLP(a,b,c) X, OpPaWhaD (0xD, a, b, c), {B1, TGT64}, PSEUDO, 0, NULL
    {"brl.call.sptk.few",	BRL (0, 0, 0)},
    {"brl.call.sptk",		BRLP (0, 0, 0)},
    {"brl.call.sptk.few.clr",	BRL (0, 0, 1)},
    {"brl.call.sptk.clr",	BRLP (0, 0, 1)},
    {"brl.call.spnt.few",	BRL (0, 1, 0)},
    {"brl.call.spnt",		BRLP (0, 1, 0)},
    {"brl.call.spnt.few.clr",	BRL (0, 1, 1)},
    {"brl.call.spnt.clr",	BRLP (0, 1, 1)},
    {"brl.call.dptk.few",	BRL (0, 2, 0)},
    {"brl.call.dptk",		BRLP (0, 2, 0)},
    {"brl.call.dptk.few.clr",	BRL (0, 2, 1)},
    {"brl.call.dptk.clr",	BRLP (0, 2, 1)},
    {"brl.call.dpnt.few",	BRL (0, 3, 0)},
    {"brl.call.dpnt",		BRLP (0, 3, 0)},
    {"brl.call.dpnt.few.clr",	BRL (0, 3, 1)},
    {"brl.call.dpnt.clr",	BRLP (0, 3, 1)},
    {"brl.call.sptk.many",	BRL (1, 0, 0)},
    {"brl.call.sptk.many.clr",	BRL (1, 0, 1)},
    {"brl.call.spnt.many",	BRL (1, 1, 0)},
    {"brl.call.spnt.many.clr",	BRL (1, 1, 1)},
    {"brl.call.dptk.many",	BRL (1, 2, 0)},
    {"brl.call.dptk.many.clr",	BRL (1, 2, 1)},
    {"brl.call.dpnt.many",	BRL (1, 3, 0)},
    {"brl.call.dpnt.many.clr",	BRL (1, 3, 1)},
#undef BRL
#undef BRLP
    {NULL, 0, 0, 0, 0, {0}, 0, 0, NULL}
  };

#undef X0
#undef X

#undef bBtype
#undef bD
#undef bPa
#undef bPr
#undef bVc
#undef bWha
#undef bX3
#undef bX6

#undef mBtype
#undef mD
#undef mPa
#undef mPr
#undef mVc
#undef mWha
#undef mX3
#undef mX6

#undef OpX3X6
#undef OpVc
#undef OpPaWhaD
#undef OpBtypePaWhaD
#undef OpBtypePaWhaDPr