xref: /netbsd-src/external/gpl3/gdb.old/dist/include/opcode/pdp11.h (revision 8b657b0747480f8989760d71343d6dd33f8d4cf9)
1a5a4af3bSchristos /* PDP-11 opcde list.
2*8b657b07Schristos    Copyright (C) 2001-2022 Free Software Foundation, Inc.
3a5a4af3bSchristos 
4a5a4af3bSchristos    This file is part of GDB and GAS.
5a5a4af3bSchristos 
6a5a4af3bSchristos    GDB and GAS are free software; you can redistribute it and/or modify
7a5a4af3bSchristos    it under the terms of the GNU General Public License as published by
8a5a4af3bSchristos    the Free Software Foundation; either version 3, or (at your option)
9a5a4af3bSchristos    any later version.
10a5a4af3bSchristos 
11a5a4af3bSchristos    GDB and GAS are distributed in the hope that it will be useful,
12a5a4af3bSchristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
13a5a4af3bSchristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14a5a4af3bSchristos    GNU General Public License for more details.
15a5a4af3bSchristos 
16a5a4af3bSchristos    You should have received a copy of the GNU General Public License
17a5a4af3bSchristos    along with GDB or GAS; see the file COPYING3.  If not, write to
18a5a4af3bSchristos    the Free Software Foundation, 51 Franklin Street - Fifth Floor,
19a5a4af3bSchristos    Boston, MA 02110-1301, USA.  */
20a5a4af3bSchristos 
21a5a4af3bSchristos /* PDP-11 opcode types.  */
22a5a4af3bSchristos 
23a5a4af3bSchristos #define PDP11_OPCODE_NO_OPS	 0
24a5a4af3bSchristos #define PDP11_OPCODE_REG	 1	/* register */
25a5a4af3bSchristos #define PDP11_OPCODE_OP		 2	/* generic operand */
26a5a4af3bSchristos #define PDP11_OPCODE_REG_OP	 3	/* register and generic operand */
27a5a4af3bSchristos #define PDP11_OPCODE_REG_OP_REV	 4	/* register and generic operand,
28a5a4af3bSchristos 					   reversed syntax */
29a5a4af3bSchristos #define PDP11_OPCODE_AC_FOP	 5	/* fpu accumulator and generic float
30a5a4af3bSchristos 					   operand */
31a5a4af3bSchristos #define PDP11_OPCODE_OP_OP	 6	/* two generic operands */
32a5a4af3bSchristos #define PDP11_OPCODE_DISPL	 7	/* pc-relative displacement */
33a5a4af3bSchristos #define PDP11_OPCODE_REG_DISPL	 8	/* redister and pc-relative
34a5a4af3bSchristos 					   displacement */
35a5a4af3bSchristos #define PDP11_OPCODE_IMM8	 9	/* 8-bit immediate */
36a5a4af3bSchristos #define PDP11_OPCODE_IMM6	10	/* 6-bit immediate */
37a5a4af3bSchristos #define PDP11_OPCODE_IMM3	11	/* 3-bit immediate */
38a5a4af3bSchristos #define PDP11_OPCODE_ILLEGAL	12	/* illegal instruction */
39a5a4af3bSchristos #define PDP11_OPCODE_FOP_AC	13	/* generic float argument, then fpu
40a5a4af3bSchristos 					   accumulator */
41a5a4af3bSchristos #define PDP11_OPCODE_FOP	14	/* generic float operand */
42a5a4af3bSchristos #define PDP11_OPCODE_AC_OP	15	/* fpu accumulator and generic int
43a5a4af3bSchristos 					   operand */
44a5a4af3bSchristos #define PDP11_OPCODE_OP_AC	16	/* generic int argument, then fpu
45a5a4af3bSchristos 					   accumulator */
46a5a4af3bSchristos 
47a5a4af3bSchristos /*
48a5a4af3bSchristos  * PDP-11 instruction set extensions.
49a5a4af3bSchristos  *
50a5a4af3bSchristos  * Please keep the numbers low, as they are used as indices into
51a5a4af3bSchristos  * an array.
52a5a4af3bSchristos  */
53a5a4af3bSchristos 
54a5a4af3bSchristos #define PDP11_NONE	 0	/* not in instruction set */
55a5a4af3bSchristos #define PDP11_BASIC	 1	/* basic instruction set (11/20 etc) */
56a5a4af3bSchristos #define PDP11_CSM	 2	/* commercial instruction set */
57a5a4af3bSchristos #define PDP11_CIS	 3	/* commercial instruction set */
58a5a4af3bSchristos #define PDP11_EIS	 4	/* extended instruction set (11/45 etc) */
59a5a4af3bSchristos #define PDP11_FIS	 5	/* KEV11 floating-point instructions */
60a5a4af3bSchristos #define PDP11_FPP	 6	/* FP-11 floating-point instructions */
61a5a4af3bSchristos #define PDP11_LEIS	 7	/* limited extended instruction set
62a5a4af3bSchristos 				   (11/40 etc) */
63a5a4af3bSchristos #define PDP11_MFPT	 8	/* move from processor type */
64a5a4af3bSchristos #define PDP11_MPROC	 9	/* multiprocessor instructions: tstset,
65a5a4af3bSchristos 				   wrtlck */
66a5a4af3bSchristos #define PDP11_MXPS	10	/* move from/to processor status */
67a5a4af3bSchristos #define PDP11_SPL	11	/* set priority level */
68a5a4af3bSchristos #define PDP11_UCODE	12	/* microcode instructions: ldub, med, xfc */
69a5a4af3bSchristos #define PDP11_EXT_NUM	13	/* total number of extension types */
70a5a4af3bSchristos 
71a5a4af3bSchristos struct pdp11_opcode
72a5a4af3bSchristos {
73a5a4af3bSchristos   const char *name;
74a5a4af3bSchristos   int opcode;
75a5a4af3bSchristos   int mask;
76a5a4af3bSchristos   int type;
77a5a4af3bSchristos   int extension;
78a5a4af3bSchristos };
79a5a4af3bSchristos 
80a5a4af3bSchristos extern const struct pdp11_opcode pdp11_opcodes[];
81a5a4af3bSchristos extern const struct pdp11_opcode pdp11_aliases[];
82a5a4af3bSchristos extern const int pdp11_num_opcodes, pdp11_num_aliases;
83a5a4af3bSchristos 
84a5a4af3bSchristos /* end of pdp11.h */
85