This is the third and final batch of makefile changes this round.
[deliverable/binutils-gdb.git] / gdb / rs6k-opcode.h
1 /* IBM RS/6000 instruction set definitions, for GNU software. */
2
3 typedef struct rs6000_insn {
4 char *operator; /* opcode name */
5 char *opr_ext; /* opcode name extension */
6 char *format; /* opcode format */
7 char p_opcode; /* primary opcode */
8 int e_opcode; /* extended opcode */
9 char oprnd_format[6]; /* operand format */
10 } OPCODE;
11
12 /* operand format specifiers */
13
14 #define TO 1
15 #define RA 2
16 #define SI 3
17 #define RT 4
18 #define UI 5
19 #define BF 6
20 #define BFA 7
21 #define BT 8
22 #define BA 9
23 #define BB 10
24 #define BO 11
25 #define BI 12
26 #define RB 13
27 #define RS 14
28 #define SH 15
29 #define MB 16
30 #define ME 17
31 #define SPR 18
32 #define DIS 19
33 #define FXM 21
34 #define FRT 22
35 #define NB 23
36 #define FRS 24
37 #define FRA 25
38 #define FRB 26
39 #define FRC 27
40 #define FLM 28
41 #define I 29
42 #define LI 30
43 #define A2 31
44 #define TA14 32 /* 14 bit representation of target address */
45 #define TA24 33 /* 24 bit representation of target address */
46 #define FL1 34
47 #define FL2 35
48 #define LEV 36
49
50 /* RS/6000 INSTRUCTION SET
51 (sorted on primary and extended opcode)
52
53 oprtr primary ext.
54 operator ext format opcode opcode operand format
55 ------- ------- ------ ------- ------ --------------- */
56
57 struct rs6000_insn rs6k_ops [] = {
58
59 {"ti", 0, "d", 3, -1, {TO,RA,SI,0} },
60 {"muli", 0, "d", 7, -1, {RT,RA,SI,0} },
61 {"sfi", 0, "d", 8, -1, {RT,RA,SI,0} },
62 {"dozi", 0, "d", 9, -1, {RT,RA,SI,0} },
63 {"cmpli", 0, "d", 10, -1, {BF,RA,UI,0} },
64 {"cmpi", 0, "d", 11, -1, {BF,RA,SI,0} },
65 {"ai", 0, "d", 12, -1, {RT,RA,SI,0} },
66 {"ai.", 0, "d", 13, -1, {RT,RA,SI,0} },
67 {"lil", 0, "d", 14, -1, {RT,SI,0} }, /* same as `cal' */
68 {"cal", 0, "d", 14, -1, {RT,DIS,RA,0} },
69 {"liu", 0, "d", 15, -1, {RT, UI,0} }, /* same as `cau' */
70 {"cau", 0, "d", 15, -1, {RT,RA,UI,0} },
71 {"bb", "1tfl", "b", 16, -1, {LI,A2,0} },
72 /* ^^^^^
73 exception #1. Either fix this, or document what you are doing here. FIXMEmgo.
74 */
75 {"bc", "la", "b", 16, -1, {BO,BI,TA14,0} },
76 {"svc", "la", "sc", 17, -1, {LEV,FL1,FL2,0} },
77 {"b", "la", "i", 18, -1, {TA24,0} },
78 {"mcrf", 0, "xl", 19, 0, {BF,BFA,0} },
79 {"bcr", "l", "xl", 19, 16, {BO,BI,0} },
80 {"cror", 0, "xl", 19, 33, {BT,BA,BB,0} },
81 {"crandc", 0, "xl", 19, 129, {BT,BA,BB,0} },
82 {"bcc", "l", "xl", 19, 193, {BO,BI,0} },
83 {"crnor", 0, "xl", 19, 225, {BT,BA,BB,0} },
84 {"crand", 0, "xl", 19, 257, {BT,BA,BB,0} },
85 {"creqv", 0, "xl", 19, 289, {BT,BA,BB,0} },
86 {"crnand", 0, "xl", 19, 289, {BT,BA,BB,0} },
87 {"crxor", 0, "xl", 19, 417, {BT,BA,BB,0} },
88 {"crorc", 0, "xl", 19, 449, {BT,BA,BB,0} },
89 {"bcr", "l", "xl", 19, 528, {BO,BI,0} },
90 {"rlimi", ".", "m", 20, -1, {RA,RS,SH,MB,ME,0} /*??*/},
91 {"rlinm", ".", "m", 21, -1, {RA,RS,SH,MB,ME,0} /*??*/},
92 {"rlmi", ".", "m", 22, -1, {RA,RS,RB,MB,ME,0} /*??*/},
93 {"rlnm", ".", "m", 23, -1, {RA,RS,RB,MB,ME,0} /*??*/},
94 {"oril", 0, "d", 24, -1, {RA,RS,UI,0} },
95 {"oriu", 0, "d", 25, -1, {RA,RS,UI,0} },
96 {"xoril", 0, "d", 26, -1, {RA,RS,UI,0} },
97 {"xoriu", 0, "d", 27, -1, {RA,RS,UI,0} },
98 {"andil.", 0, "d", 28, -1, {RA,RS,UI,0} },
99 {"andiu.", 0, "d", 29, -1, {RA,RS,UI,0} },
100 {"cmp", 0, "x", 31, 0, {BF,RA,RB,0} },
101 {"t", 0, "x", 31, 4, {TO,RA,RB,0} },
102 {"sf", "o.", "xo", 31, 8, {RT,RA,RB,0} },
103 {"a", "o.", "xo", 31, 10, {RT,RA,RB,0} },
104 {"mfcr", 0, "x", 31, 19, {RT,0} },
105 {"lx", 0, "x", 31, 23, {RT,RA,RB,0} },
106 {"sl", ".", "x", 31, 24, {RA,RS,RB,0} },
107 {"cntlz", ".", "xo", 31, 26, {RA,RS,0} },
108 {"and", ".", "x", 31, 28, {RA,RS,RB,0} },
109 {"maskg", ".", "x", 31, 29, {RA,RS,RB,0} },
110 {"cmpl", 0, "x", 31, 32, {BF,RA,RB,0} },
111 {"sfe", "o.", "xo", 31, 136, {RT,RA,RB,0} },
112 {"lux", 0, "x", 31, 55, {RT,RA,RB,0} },
113 {"andc", ".", "x", 31, 60, {RA,RS,RB,0} },
114 {"mfmsr", 0, "x", 31, 83, {RT,0} },
115 {"lbzx", 0, "x", 31, 87, {RT,RA,RB,0} },
116 {"neg", "o.", "xo", 31, 104, {RT,RA,0} },
117 {"mul", "o.", "xo", 31, 107, {RT,RA,RB,0} },
118 {"lbzux", 0, "x", 31, 119, {RT,RA,RB,0} },
119 {"nor", ".", "x", 31, 124, {RA,RS,RB,0} },
120 {"ae", "o.", "xo", 31, 138, {RT,RA,RB,0} },
121 {"mtcrf", 0, "xfx", 31, 144, {FXM,RS,0} },
122 {"stx", 0, "x", 31, 151, {RS,RA,RB,0} },
123 {"slq", ".", "x", 31, 152, {RA,RS,RB,0} },
124 {"sle", ".", "x", 31, 153, {RA,RS,RB,0} },
125 {"stux", 0, "x", 31, 183, {RS,RA,RB,0} },
126 {"sliq", ".", "x", 31, 184, {RA,RS,SH,0} },
127 {"sfze", "o.", "xo", 31, 200, {RT,RA,0} },
128 {"aze", "o.", "xo", 31, 202, {RT,RA,0} },
129 {"stbx", 0, "x", 31, 215, {RS,RA,RB,0} },
130 {"sllq", ".", "x", 31, 216, {RA,RS,RB,0} },
131 {"sleq", ".", "x", 31, 217, {RA,RS,RB,0} },
132 {"sfme", "o.", "xo", 31, 232, {RT,RA,0} },
133 {"ame", "o.", "xo", 31, 234, {RT,RA,0} },
134 {"muls", "o.", "xo", 31, 235, {RT,RA,RB,0} },
135 {"stbux", 0, "x", 31, 247, {RS,RA,RB,0} },
136 {"slliq", ".", "x", 31, 248, {RA,RS,SH,0} },
137 {"doz", "o.", "x", 31, 264, {RT,RA,RB,0} },
138 {"cax", "o.", "xo", 31, 266, {RT,RA,RB,0} },
139 {"lscbx", ".", "x", 31, 277, {RT,RA,RB,0} },
140 {"lhzx", 0, "x", 31, 279, {RT,RA,RB,0} },
141 {"eqv", ".", "x", 31, 284, {RA,RS,RB,0} },
142 {"lhzux", 0, "x", 31, 311, {RT,RA,RB,0} },
143 {"xor", ".", "x", 31, 316, {RA,RS,RB,0} },
144 {"div", "o.", "xo", 31, 331, {RT,RA,RB,0} },
145 {"mfspr", 0, "x", 31, 339, {RT,SPR,0} },
146 {"lhax", 0, "x", 31, 343, {RT,RA,RB,0} },
147 {"abs", "o.", "xo", 31, 360, {RT,RA,0} },
148 {"divs", "o.", "xo", 31, 363, {RT,RA,RB,0} },
149 {"lhaux", 0, "x", 31, 375, {RT,RA,RB,0} },
150 {"sthx", 0, "x", 31, 407, {RS,RA,RB,0} },
151 {"orc", ".", "x", 31, 412, {RA,RS,RB,0} },
152 {"sthux", 0, "x", 31, 439, {RS,RA,RB,0} },
153 {"or", ".", "x", 31, 444, {RA,RS,RB,0} },
154 {"mtspr", 0, "x", 31, 467, {SPR,RS,0} },
155 {"nand", ".", "x", 31, 476, {RA,RS,RB,0} },
156 {"nabs", "o.", "xo", 31, 488, {RT,RA,0} },
157 {"mcrxr", 0, "x", 31, 512, {BF,0} },
158 {"lsx", 0, "x", 31, 533, {RT,RA,RB,0} },
159 {"lbrx", 0, "x", 31, 534, {RT,RA,RB,0} },
160 {"lfsx", 0, "x", 31, 535, {FRT,RA,RB,0} },
161 {"sr", ".", "x", 31, 536, {RA,RS,RB,0} },
162 {"rrib", ".", "x", 31, 537, {RA,RS,RB,0} },
163 {"maskir", ".", "x", 31, 541, {RA,RS,RB,0} },
164 {"lfsux", 0, "x", 31, 567, {FRT,RA,RB,0} },
165 {"lsi", 0, "x", 31, 597, {RT,RA,NB,0} },
166 {"lfdx", 0, "x", 31, 599, {FRT,RA,RB,0} },
167 {"lfdux", 0, "x", 31, 631, {FRT,RA,RB,0} },
168 {"stsx", 0, "x", 31, 661, {RS,RA,RB,0} },
169 {"stbrx", 0, "x", 31, 662, {RS,RA,RB,0} },
170 {"stfsx", 0, "x", 31, 663, {FRS,RA,RB,0} },
171 {"srq", ".", "x", 31, 664, {RA,RS,RB,0} },
172 {"sre", ".", "x", 31, 665, {RA,RS,RB,0} },
173 {"stfsux", 0, "x", 31, 695, {FRS,RA,RB,0} },
174 {"sriq", ".", "x", 31, 696, {RA,RS,SH,0} },
175 {"stsi", 0, "x", 31, 725, {RS,RA,NB,0} },
176 {"stfdx", 0, "x", 31, 727, {FRS,RA,RB,0} },
177 {"srlq", ".", "x", 31, 728, {RA,RS,RB,0} },
178 {"sreq", ".", "x", 31, 729, {RA,RS,RB,0} },
179 {"stfdux", 0, "x", 31, 759, {FRS,RA,RB,0} },
180 {"srliq", ".", "x", 31, 760, {RA,RS,SH,0} },
181 {"lhbrx", 0, "x", 31, 790, {RT,RA,RB,0} },
182 {"sra", ".", "x", 31, 792, {RA,RS,RB,0} },
183 {"srai", ".", "x", 31, 824, {RA,RS,SH,0} },
184 {"sthbrx", 0, "x", 31, 918, {RS,RA,RB,0} },
185 {"sraq", ".", "x", 31, 920, {RA,RS,RB,0} },
186 {"srea", ".", "x", 31, 921, {RA,RS,RB,0} },
187 {"exts", ".", "x", 31, 922, {RA,RS,0} },
188 {"sraiq", ".", "x", 31, 952, {RA,RS,SH,0} },
189 {"l", 0, "d", 32, -1, {RT,DIS,RA,0} },
190 {"lu", 0, "d", 33, -1, {RT,DIS,RA,0} },
191 {"lbz", 0, "d", 34, -1, {RT,DIS,RA,0} },
192 {"lbzu", 0, "d", 35, -1, {RT,DIS,RA,0} },
193 {"st", 0, "d", 36, -1, {RS,DIS,RA,0} },
194 {"stu", 0, "d", 37, -1, {RS,DIS,RA,0} },
195 {"stb", 0, "d", 38, -1, {RS,DIS,RA,0} },
196 {"stbu", 0, "d", 39, -1, {RS,DIS,RA,0} },
197 {"lhz", 0, "d", 40, -1, {RT,DIS,RA,0} },
198 {"lhzu", 0, "d", 41, -1, {RT,DIS,RA,0} },
199 {"lha", 0, "d", 42, -1, {RT,DIS,RA,0} },
200 {"lhau", 0, "d", 43, -1, {RT,DIS,RA,0} },
201 {"sth", 0, "d", 44, -1, {RS,DIS,RA,0} },
202 {"sthu", 0, "d", 45, -1, {RS,DIS,RA,0} },
203 {"lm", 0, "d", 46, -1, {RT,DIS,RA,0} },
204 {"stm", 0, "d", 47, -1, {RS,DIS,RA,0} },
205 {"lfs", 0, "d", 48, -1, {FRT,DIS,RA,0} },
206 {"lfsu", 0, "d", 49, -1, {FRT,DIS,RA,0} },
207 {"lfd", 0, "d", 50, -1, {FRT,DIS,RA,0} },
208 {"lfdu", 0, "d", 51, -1, {FRT,DIS,RA,0} },
209 {"stfs", 0, "d", 52, -1, {FRS,DIS,RA,0} },
210 {"stfsu", 0, "d", 53, -1, {FRS,DIS,RA,0} },
211 {"stfd", 0, "d", 54, -1, {FRS,DIS,RA,0} },
212 {"stfdu", 0, "d", 55, -1, {FRS,DIS,RA,0} },
213 {"fcmpu", 0, "x", 63, 0, {BF,FRA,FRB,0} },
214 {"fm", ".", "a", 63, 5, {FRT,FRA,FRC,0} },
215 {"fd", ".", "a", 63, 8, {FRT,FRA,FRB,0} },
216 {"frsp", ".", "x", 63, 12, {FRT,FRB,0} },
217 {"fs", ".", "a", 63, 20, {FRT,FRA,FRB,0} },
218 {"fa", ".", "a", 63, 21, {FRT,FRA,FRB,0} },
219 {"fms", ".", "a", 63, 28, {FRT,FRA,FRC,FRB,0} },
220 {"fma", ".", "a", 63, 29, {FRT,FRA,FRC,FRB,0} },
221 {"fnms", ".", "a", 63, 30, {FRT,FRA,FRC,FRB,0} },
222 {"fnma", ".", "a", 63, 31, {FRT,FRA,FRC,FRB,0} },
223 {"fcmpo", 0, "x", 63, 32, {BF,FRA,FRB,0} },
224 {"mtfsb1", ".", "x", 63, 38, {BT,0} },
225 {"fneg", ".", "x", 63, 40, {FRT,FRB,0} },
226 {"mcrfs", 0, "x", 63, 64, {BF,BFA,0} },
227 {"mtfsb0", ".", "x", 63, 70, {BT,0} },
228 {"fmr", ".", "x", 63, 72, {FRT,FRB,0} },
229 {"mtfsfi", ".", "x", 63, 134, {BF,I,0} },
230 {"fnabs", ".", "x", 63, 136, {FRT,FRB,0} },
231 {"fabs", ".", "x", 63, 264, {FRT,FRB,0} },
232 {"mffs", ".", "x", 63, 583, {FRT,0} },
233 {"mtfsf", ".", "xfl", 63, 711, {FLM,FRB,0} },
234 };
235
236 #define NOPCODES (sizeof (rs6k_ops) / sizeof (struct rs6000_insn))
This page took 0.043975 seconds and 4 git commands to generate.