]> Git Repo - binutils.git/blame - include/a29k-opcode.h
Eliminate normal-COFF things from ecoff.h that are really not present in
[binutils.git] / include / a29k-opcode.h
CommitLineData
089aacdb
RP
1/* Table of opcodes for the AMD 29000
2 Copyright (C) 1990, 1991 Free Software Foundation, Inc.
3
4This file is part of GDB and GAS.
5
6This program is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 1, or (at your option)
9any later version.
10
11This program is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with this program; see the file COPYING. If not, write to
18the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19
20/* $Id$ */
21
22struct a29k_opcode {
23 /* Name of the instruction. */
24 char *name;
25
26 /* Opcode word */
27 unsigned long opcode;
28
29 /* A string of characters which describe the operands.
30 Valid characters are:
31 , Itself. The character appears in the assembly code.
32 a RA. The register number is in bits 8-15 of the instruction.
33 b RB. The register number is in bits 0-7 of the instruction.
34 c RC. The register number is in bits 16-23 of the instruction.
35 i An immediate operand is in bits 0-7 of the instruction.
36 x Bits 0-7 and 16-23 of the instruction are bits 0-7 and 8-15
37 (respectively) of the immediate operand.
38 h Same as x but the instruction contains bits 16-31 of the
39 immediate operand.
40 X Same as x but bits 16-31 of the signed immediate operand
41 are set to 1 (thus the operand is always negative).
42 P,A Bits 0-7 and 16-23 of the instruction are bits 2-9 and 10-17
43 (respectively) of the immediate operand.
44 P=PC-relative, sign-extended to 32 bits.
45 A=Absolute, zero-extended to 32 bits.
46 e CE bit (bit 23) for a load/store instruction.
47 n Control field (bits 16-22) for a load/store instruction.
48 v Immediate operand in bits 16-23 of the instruction.
49 (used for trap numbers).
50 s SA. Special-purpose register number in bits 8-15
51 of the instruction.
52 u UI--bit 7 of the instruction.
53 r RND--bits 4-6 of the instruction.
54 d FD--bits 2-3 of the instruction.
55 f FS--bits 0-1 of the instruction.
56
57 Extensions for 29050:
58
59 d FMT--bits 2-3 of the instruction (not really new).
60 f ACN--bits 0-1 of the instruction (not really new).
61 F FUNC--Special function in bits 18-21 of the instruction.
62 C ACN--bits 16-17 specifying the accumlator register. */
63 char *args;
64};
65
a737c70b 66static CONST struct a29k_opcode a29k_opcodes[] =
089aacdb
RP
67{
68
69{ "add", 0x14000000, "c,a,b" },
70{ "add", 0x15000000, "c,a,i" },
71{ "addc", 0x1c000000, "c,a,b" },
72{ "addc", 0x1d000000, "c,a,i" },
73{ "addcs", 0x18000000, "c,a,b" },
74{ "addcs", 0x19000000, "c,a,i" },
75{ "addcu", 0x1a000000, "c,a,b" },
76{ "addcu", 0x1b000000, "c,a,i" },
77{ "adds", 0x10000000, "c,a,b" },
78{ "adds", 0x11000000, "c,a,i" },
79{ "addu", 0x12000000, "c,a,b" },
80{ "addu", 0x13000000, "c,a,i" },
81{ "and", 0x90000000, "c,a,b" },
82{ "and", 0x91000000, "c,a,i" },
83{ "andn", 0x9c000000, "c,a,b" },
84{ "andn", 0x9d000000, "c,a,i" },
85{ "aseq", 0x70000000, "v,a,b" },
86{ "aseq", 0x71000000, "v,a,i" },
87{ "asge", 0x5c000000, "v,a,b" },
88{ "asge", 0x5d000000, "v,a,i" },
89{ "asgeu", 0x5e000000, "v,a,b" },
90{ "asgeu", 0x5f000000, "v,a,i" },
91{ "asgt", 0x58000000, "v,a,b" },
92{ "asgt", 0x59000000, "v,a,i" },
93{ "asgtu", 0x5a000000, "v,a,b" },
94{ "asgtu", 0x5b000000, "v,a,i" },
95{ "asle", 0x54000000, "v,a,b" },
96{ "asle", 0x55000000, "v,a,i" },
97{ "asleu", 0x56000000, "v,a,b" },
98{ "asleu", 0x57000000, "v,a,i" },
99{ "aslt", 0x50000000, "v,a,b" },
100{ "aslt", 0x51000000, "v,a,i" },
101{ "asltu", 0x52000000, "v,a,b" },
102{ "asltu", 0x53000000, "v,a,i" },
103{ "asneq", 0x72000000, "v,a,b" },
104{ "asneq", 0x73000000, "v,a,i" },
105{ "call", 0xa8000000, "a,P" },
106{ "call", 0xa9000000, "a,A" },
107{ "calli", 0xc8000000, "a,b" },
108{ "class", 0xe6000000, "c,a,f" },
109{ "clz", 0x08000000, "c,b" },
110{ "clz", 0x09000000, "c,i" },
111{ "const", 0x03000000, "a,x" },
112{ "consth", 0x02000000, "a,h" },
113{ "consthz", 0x05000000, "a,h" },
114{ "constn", 0x01000000, "a,X" },
115{ "convert", 0xe4000000, "c,a,u,r,d,f" },
116{ "cpbyte", 0x2e000000, "c,a,b" },
117{ "cpbyte", 0x2f000000, "c,a,i" },
118{ "cpeq", 0x60000000, "c,a,b" },
119{ "cpeq", 0x61000000, "c,a,i" },
120{ "cpge", 0x4c000000, "c,a,b" },
121{ "cpge", 0x4d000000, "c,a,i" },
122{ "cpgeu", 0x4e000000, "c,a,b" },
123{ "cpgeu", 0x4f000000, "c,a,i" },
124{ "cpgt", 0x48000000, "c,a,b" },
125{ "cpgt", 0x49000000, "c,a,i" },
126{ "cpgtu", 0x4a000000, "c,a,b" },
127{ "cpgtu", 0x4b000000, "c,a,i" },
128{ "cple", 0x44000000, "c,a,b" },
129{ "cple", 0x45000000, "c,a,i" },
130{ "cpleu", 0x46000000, "c,a,b" },
131{ "cpleu", 0x47000000, "c,a,i" },
132{ "cplt", 0x40000000, "c,a,b" },
133{ "cplt", 0x41000000, "c,a,i" },
134{ "cpltu", 0x42000000, "c,a,b" },
135{ "cpltu", 0x43000000, "c,a,i" },
136{ "cpneq", 0x62000000, "c,a,b" },
137{ "cpneq", 0x63000000, "c,a,i" },
138{ "dadd", 0xf1000000, "c,a,b" },
139{ "ddiv", 0xf7000000, "c,a,b" },
140{ "deq", 0xeb000000, "c,a,b" },
141{ "dge", 0xef000000, "c,a,b" },
142{ "dgt", 0xed000000, "c,a,b" },
143{ "div", 0x6a000000, "c,a,b" },
144{ "div", 0x6b000000, "c,a,i" },
145{ "div0", 0x68000000, "c,b" },
146{ "div0", 0x69000000, "c,i" },
147{ "divide", 0xe1000000, "c,a,b" },
148{ "dividu", 0xe3000000, "c,a,b" },
149{ "divl", 0x6c000000, "c,a,b" },
150{ "divl", 0x6d000000, "c,a,i" },
151{ "divrem", 0x6e000000, "c,a,b" },
152{ "divrem", 0x6f000000, "c,a,i" },
153{ "dmac", 0xd9000000, "F,C,a,b" },
154{ "dmsm", 0xdb000000, "c,a,b" },
155{ "dmul", 0xf5000000, "c,a,b" },
156{ "dsub", 0xf3000000, "c,a,b" },
157{ "emulate", 0xd7000000, "v,a,b" },
158{ "exbyte", 0x0a000000, "c,a,b" },
159{ "exbyte", 0x0b000000, "c,a,i" },
160{ "exhw", 0x7c000000, "c,a,b" },
161{ "exhw", 0x7d000000, "c,a,i" },
162{ "exhws", 0x7e000000, "c,a" },
163{ "extract", 0x7a000000, "c,a,b" },
164{ "extract", 0x7b000000, "c,a,i" },
165{ "fadd", 0xf0000000, "c,a,b" },
166{ "fdiv", 0xf6000000, "c,a,b" },
167{ "fdmul", 0xf9000000, "c,a,b" },
168{ "feq", 0xea000000, "c,a,b" },
169{ "fge", 0xee000000, "c,a,b" },
170{ "fgt", 0xec000000, "c,a,b" },
171{ "fmac", 0xd8000000, "F,C,a,b" },
172{ "fmsm", 0xda000000, "c,a,b" },
173{ "fmul", 0xf4000000, "c,a,b" },
174{ "fsub", 0xf2000000, "c,a,b" },
175{ "halt", 0x89000000, "" },
176{ "inbyte", 0x0c000000, "c,a,b" },
177{ "inbyte", 0x0d000000, "c,a,i" },
178{ "inhw", 0x78000000, "c,a,b" },
179{ "inhw", 0x79000000, "c,a,i" },
180{ "inv", 0x9f000000, "" },
181{ "iret", 0x88000000, "" },
182{ "iretinv", 0x8c000000, "" },
183{ "jmp", 0xa0000000, "P" },
184{ "jmp", 0xa1000000, "A" },
185{ "jmpf", 0xa4000000, "a,P" },
186{ "jmpf", 0xa5000000, "a,A" },
187{ "jmpfdec", 0xb4000000, "a,P" },
188{ "jmpfdec", 0xb5000000, "a,A" },
189{ "jmpfi", 0xc4000000, "a,b" },
190{ "jmpi", 0xc0000000, "b" },
191{ "jmpt", 0xac000000, "a,P" },
192{ "jmpt", 0xad000000, "a,A" },
193{ "jmpti", 0xcc000000, "a,b" },
194{ "load", 0x16000000, "e,n,a,b" },
195{ "load", 0x17000000, "e,n,a,i" },
196{ "loadl", 0x06000000, "e,n,a,b" },
197{ "loadl", 0x07000000, "e,n,a,i" },
198{ "loadm", 0x36000000, "e,n,a,b" },
199{ "loadm", 0x37000000, "e,n,a,i" },
200{ "loadset", 0x26000000, "e,n,a,b" },
201{ "loadset", 0x27000000, "e,n,a,i" },
202{ "mfacc", 0xe9000100, "c,d,f" },
203{ "mfsr", 0xc6000000, "c,s" },
204{ "mftlb", 0xb6000000, "c,a" },
205{ "mtacc", 0xe8010000, "c,d,f" },
206{ "mtsr", 0xce000000, "s,b" },
207{ "mtsrim", 0x04000000, "s,x" },
208{ "mttlb", 0xbe000000, "a,b" },
209{ "mul", 0x64000000, "c,a,b" },
210{ "mul", 0x65000000, "c,a,i" },
211{ "mull", 0x66000000, "c,a,b" },
212{ "mull", 0x67000000, "c,a,i" },
213{ "multiplu", 0xe2000000, "c,a,b" },
214{ "multiply", 0xe0000000, "c,a,b" },
215{ "multm", 0xde000000, "c,a,b" },
216{ "multmu", 0xdf000000, "c,a,b" },
217{ "mulu", 0x74000000, "c,a,b" },
218{ "mulu", 0x75000000, "c,a,i" },
219{ "nand", 0x9a000000, "c,a,b" },
220{ "nand", 0x9b000000, "c,a,i" },
221{ "nop", 0x70400101, "" },
222{ "nor", 0x98000000, "c,a,b" },
223{ "nor", 0x99000000, "c,a,i" },
224{ "or", 0x92000000, "c,a,b" },
225{ "or", 0x93000000, "c,a,i" },
226{ "orn", 0xaa000000, "c,a,b" },
227{ "orn", 0xab000000, "c,a,i" },
228
229/* The description of "setip" in Chapter 8 ("instruction set") of the user's
230 manual claims that these are absolute register numbers. But section
231 7.2.1 explains that they are not. The latter is correct, so print
232 these normally ("lr0", "lr5", etc.). */
233{ "setip", 0x9e000000, "c,a,b" },
234
235{ "sll", 0x80000000, "c,a,b" },
236{ "sll", 0x81000000, "c,a,i" },
237{ "sqrt", 0xe5000000, "c,a,f" },
238{ "sra", 0x86000000, "c,a,b" },
239{ "sra", 0x87000000, "c,a,i" },
240{ "srl", 0x82000000, "c,a,b" },
241{ "srl", 0x83000000, "c,a,i" },
242{ "store", 0x1e000000, "e,n,a,b" },
243{ "store", 0x1f000000, "e,n,a,i" },
244{ "storel", 0x0e000000, "e,n,a,b" },
245{ "storel", 0x0f000000, "e,n,a,i" },
246{ "storem", 0x3e000000, "e,n,a,b" },
247{ "storem", 0x3f000000, "e,n,a,i" },
248{ "sub", 0x24000000, "c,a,b" },
249{ "sub", 0x25000000, "c,a,i" },
250{ "subc", 0x2c000000, "c,a,b" },
251{ "subc", 0x2d000000, "c,a,i" },
252{ "subcs", 0x28000000, "c,a,b" },
253{ "subcs", 0x29000000, "c,a,i" },
254{ "subcu", 0x2a000000, "c,a,b" },
255{ "subcu", 0x2b000000, "c,a,i" },
256{ "subr", 0x34000000, "c,a,b" },
257{ "subr", 0x35000000, "c,a,i" },
258{ "subrc", 0x3c000000, "c,a,b" },
259{ "subrc", 0x3d000000, "c,a,i" },
260{ "subrcs", 0x38000000, "c,a,b" },
261{ "subrcs", 0x39000000, "c,a,i" },
262{ "subrcu", 0x3a000000, "c,a,b" },
263{ "subrcu", 0x3b000000, "c,a,i" },
264{ "subrs", 0x30000000, "c,a,b" },
265{ "subrs", 0x31000000, "c,a,i" },
266{ "subru", 0x32000000, "c,a,b" },
267{ "subru", 0x33000000, "c,a,i" },
268{ "subs", 0x20000000, "c,a,b" },
269{ "subs", 0x21000000, "c,a,i" },
270{ "subu", 0x22000000, "c,a,b" },
271{ "subu", 0x23000000, "c,a,i" },
272{ "xnor", 0x96000000, "c,a,b" },
273{ "xnor", 0x97000000, "c,a,i" },
274{ "xor", 0x94000000, "c,a,b" },
275{ "xor", 0x95000000, "c,a,i" },
276
277{ "", 0x0, "" } /* Dummy entry, not included in NUM_OPCODES. This
278 lets code examine entry i+1 without checking
279 if we've run off the end of the table. */
280};
281
a737c70b 282CONST unsigned int num_opcodes = (((sizeof a29k_opcodes) / (sizeof a29k_opcodes[0])) - 1);
089aacdb
RP
283
284/*
285 * $Log$
a737c70b
SC
286 * Revision 1.2 1991/07/15 23:34:04 steve
287 * *** empty log message ***
288 *
289 * Revision 1.1 1991/05/19 00:19:33 rich
089aacdb
RP
290 * Initial revision
291 *
292 * Revision 1.1.1.1 1991/04/04 18:15:23 rich
293 * new gas main line
294 *
295 * Revision 1.1 1991/04/04 18:15:23 rich
296 * Initial revision
297 *
298 * Revision 1.2 1991/03/30 17:13:19 rich
299 * num_opcodes now unsigned. Also, added rcsid and log.
300 *
301 *
302 */
303
304/* end of a29k-opcode.h */
This page took 0.054111 seconds and 4 git commands to generate.