175fd0b74Schristos /* PDP-11 opcde list. 2*e992f068Schristos Copyright (C) 2001-2022 Free Software Foundation, Inc. 375fd0b74Schristos 475fd0b74Schristos This file is part of GDB and GAS. 575fd0b74Schristos 675fd0b74Schristos GDB and GAS are free software; you can redistribute it and/or modify 775fd0b74Schristos it under the terms of the GNU General Public License as published by 875fd0b74Schristos the Free Software Foundation; either version 3, or (at your option) 975fd0b74Schristos any later version. 1075fd0b74Schristos 1175fd0b74Schristos GDB and GAS are distributed in the hope that it will be useful, 1275fd0b74Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 1375fd0b74Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1475fd0b74Schristos GNU General Public License for more details. 1575fd0b74Schristos 1675fd0b74Schristos You should have received a copy of the GNU General Public License 1775fd0b74Schristos along with GDB or GAS; see the file COPYING3. If not, write to 1875fd0b74Schristos the Free Software Foundation, 51 Franklin Street - Fifth Floor, 1975fd0b74Schristos Boston, MA 02110-1301, USA. */ 2075fd0b74Schristos 2175fd0b74Schristos /* PDP-11 opcode types. */ 2275fd0b74Schristos 2375fd0b74Schristos #define PDP11_OPCODE_NO_OPS 0 2475fd0b74Schristos #define PDP11_OPCODE_REG 1 /* register */ 2575fd0b74Schristos #define PDP11_OPCODE_OP 2 /* generic operand */ 2675fd0b74Schristos #define PDP11_OPCODE_REG_OP 3 /* register and generic operand */ 2775fd0b74Schristos #define PDP11_OPCODE_REG_OP_REV 4 /* register and generic operand, 2875fd0b74Schristos reversed syntax */ 2975fd0b74Schristos #define PDP11_OPCODE_AC_FOP 5 /* fpu accumulator and generic float 3075fd0b74Schristos operand */ 3175fd0b74Schristos #define PDP11_OPCODE_OP_OP 6 /* two generic operands */ 3275fd0b74Schristos #define PDP11_OPCODE_DISPL 7 /* pc-relative displacement */ 3375fd0b74Schristos #define PDP11_OPCODE_REG_DISPL 8 /* redister and pc-relative 3475fd0b74Schristos displacement */ 3575fd0b74Schristos #define PDP11_OPCODE_IMM8 9 /* 8-bit immediate */ 3675fd0b74Schristos #define PDP11_OPCODE_IMM6 10 /* 6-bit immediate */ 3775fd0b74Schristos #define PDP11_OPCODE_IMM3 11 /* 3-bit immediate */ 3875fd0b74Schristos #define PDP11_OPCODE_ILLEGAL 12 /* illegal instruction */ 3975fd0b74Schristos #define PDP11_OPCODE_FOP_AC 13 /* generic float argument, then fpu 4075fd0b74Schristos accumulator */ 4175fd0b74Schristos #define PDP11_OPCODE_FOP 14 /* generic float operand */ 4275fd0b74Schristos #define PDP11_OPCODE_AC_OP 15 /* fpu accumulator and generic int 4375fd0b74Schristos operand */ 4475fd0b74Schristos #define PDP11_OPCODE_OP_AC 16 /* generic int argument, then fpu 4575fd0b74Schristos accumulator */ 4675fd0b74Schristos 4775fd0b74Schristos /* 4875fd0b74Schristos * PDP-11 instruction set extensions. 4975fd0b74Schristos * 5075fd0b74Schristos * Please keep the numbers low, as they are used as indices into 5175fd0b74Schristos * an array. 5275fd0b74Schristos */ 5375fd0b74Schristos 5475fd0b74Schristos #define PDP11_NONE 0 /* not in instruction set */ 5575fd0b74Schristos #define PDP11_BASIC 1 /* basic instruction set (11/20 etc) */ 5675fd0b74Schristos #define PDP11_CSM 2 /* commercial instruction set */ 5775fd0b74Schristos #define PDP11_CIS 3 /* commercial instruction set */ 5875fd0b74Schristos #define PDP11_EIS 4 /* extended instruction set (11/45 etc) */ 5975fd0b74Schristos #define PDP11_FIS 5 /* KEV11 floating-point instructions */ 6075fd0b74Schristos #define PDP11_FPP 6 /* FP-11 floating-point instructions */ 6175fd0b74Schristos #define PDP11_LEIS 7 /* limited extended instruction set 6275fd0b74Schristos (11/40 etc) */ 6375fd0b74Schristos #define PDP11_MFPT 8 /* move from processor type */ 6475fd0b74Schristos #define PDP11_MPROC 9 /* multiprocessor instructions: tstset, 6575fd0b74Schristos wrtlck */ 6675fd0b74Schristos #define PDP11_MXPS 10 /* move from/to processor status */ 6775fd0b74Schristos #define PDP11_SPL 11 /* set priority level */ 6875fd0b74Schristos #define PDP11_UCODE 12 /* microcode instructions: ldub, med, xfc */ 6975fd0b74Schristos #define PDP11_EXT_NUM 13 /* total number of extension types */ 7075fd0b74Schristos 7175fd0b74Schristos struct pdp11_opcode 7275fd0b74Schristos { 7375fd0b74Schristos const char *name; 7475fd0b74Schristos int opcode; 7575fd0b74Schristos int mask; 7675fd0b74Schristos int type; 7775fd0b74Schristos int extension; 7875fd0b74Schristos }; 7975fd0b74Schristos 8075fd0b74Schristos extern const struct pdp11_opcode pdp11_opcodes[]; 8175fd0b74Schristos extern const struct pdp11_opcode pdp11_aliases[]; 8275fd0b74Schristos extern const int pdp11_num_opcodes, pdp11_num_aliases; 8375fd0b74Schristos 8475fd0b74Schristos /* end of pdp11.h */ 85