1179404Sobrien/* mips16-opc.c.  Mips16 opcode table.
2208737Sjmallett   Copyright 1996, 1997, 1998, 2000, 2005 Free Software Foundation, Inc.
3179404Sobrien   Contributed by Ian Lance Taylor, Cygnus Support
4179404Sobrien
5179404SobrienThis file is part of GDB, GAS, and the GNU binutils.
6179404Sobrien
7179404SobrienGDB, GAS, and the GNU binutils are free software; you can redistribute
8179404Sobrienthem and/or modify them under the terms of the GNU General Public
9179404SobrienLicense as published by the Free Software Foundation; either version
10179404Sobrien1, or (at your option) any later version.
11179404Sobrien
12179404SobrienGDB, GAS, and the GNU binutils are distributed in the hope that they
13179404Sobrienwill be useful, but WITHOUT ANY WARRANTY; without even the implied
14179404Sobrienwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
15179404Sobrienthe GNU General Public License for more details.
16179404Sobrien
17179404SobrienYou should have received a copy of the GNU General Public License
18179404Sobrienalong with this file; see the file COPYING.  If not, write to the Free
19208737SjmallettSoftware Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
20208737Sjmallett02110-1301, USA.  */
21179404Sobrien
22179404Sobrien#include <stdio.h>
23179404Sobrien#include "sysdep.h"
24179404Sobrien#include "opcode/mips.h"
25179404Sobrien
26179404Sobrien/* This is the opcodes table for the mips16 processor.  The format of
27179404Sobrien   this table is intentionally identical to the one in mips-opc.c.
28179404Sobrien   However, the special letters that appear in the argument string are
29179404Sobrien   different, and the table uses some different flags.  */
30179404Sobrien
31179404Sobrien/* Use some short hand macros to keep down the length of the lines in
32179404Sobrien   the opcodes table.  */
33179404Sobrien
34179404Sobrien#define UBD     INSN_UNCOND_BRANCH_DELAY
35179404Sobrien#define BR      MIPS16_INSN_BRANCH
36179404Sobrien
37179404Sobrien#define WR_x	MIPS16_INSN_WRITE_X
38179404Sobrien#define WR_y	MIPS16_INSN_WRITE_Y
39179404Sobrien#define WR_z	MIPS16_INSN_WRITE_Z
40179404Sobrien#define WR_T	MIPS16_INSN_WRITE_T
41179404Sobrien#define WR_SP	MIPS16_INSN_WRITE_SP
42179404Sobrien#define WR_31	MIPS16_INSN_WRITE_31
43179404Sobrien#define WR_Y	MIPS16_INSN_WRITE_GPR_Y
44179404Sobrien
45179404Sobrien#define RD_x	MIPS16_INSN_READ_X
46179404Sobrien#define RD_y	MIPS16_INSN_READ_Y
47179404Sobrien#define RD_Z	MIPS16_INSN_READ_Z
48179404Sobrien#define RD_T	MIPS16_INSN_READ_T
49179404Sobrien#define RD_SP	MIPS16_INSN_READ_SP
50179404Sobrien#define RD_31	MIPS16_INSN_READ_31
51179404Sobrien#define RD_PC	MIPS16_INSN_READ_PC
52179404Sobrien#define RD_X	MIPS16_INSN_READ_GPR_X
53179404Sobrien
54179404Sobrien#define WR_HI	INSN_WRITE_HI
55179404Sobrien#define WR_LO	INSN_WRITE_LO
56179404Sobrien#define RD_HI	INSN_READ_HI
57179404Sobrien#define RD_LO	INSN_READ_LO
58179404Sobrien
59179404Sobrien#define TRAP	INSN_TRAP
60179404Sobrien
61218822Sdim#define I1	INSN_ISA1
62179404Sobrien#define I3	INSN_ISA3
63218822Sdim#define I32	INSN_ISA32
64218822Sdim#define I64	INSN_ISA64
65218822Sdim#define T3	INSN_3900
66179404Sobrien
67179404Sobrienconst struct mips_opcode mips16_opcodes[] =
68179404Sobrien{
69218822Sdim/* name,    args,	match,	mask,	pinfo,         	pinfo2, membership */
70218822Sdim{"nop",	    "",		0x6500, 0xffff, RD_Z,		0,	I1 }, /* move $0,$Z */
71218822Sdim{"la",	    "x,A",	0x0800, 0xf800, WR_x|RD_PC,	0,	I1 },
72218822Sdim{"abs",	    "x,w",	0, (int) M_ABS, INSN_MACRO,	0,	I1 },
73218822Sdim{"addiu",   "y,x,4",	0x4000, 0xf810, WR_y|RD_x,	0,	I1 },
74218822Sdim{"addiu",   "x,k",	0x4800, 0xf800, WR_x|RD_x,	0,	I1 },
75218822Sdim{"addiu",   "S,K",	0x6300, 0xff00, WR_SP|RD_SP,	0,	I1 },
76218822Sdim{"addiu",   "S,S,K",	0x6300, 0xff00, WR_SP|RD_SP,	0,	I1 },
77218822Sdim{"addiu",   "x,P,V",	0x0800, 0xf800, WR_x|RD_PC,	0,	I1 },
78218822Sdim{"addiu",   "x,S,V",	0x0000, 0xf800, WR_x|RD_SP,	0,	I1 },
79218822Sdim{"addu",    "z,v,y",	0xe001, 0xf803, WR_z|RD_x|RD_y,	0,	I1 },
80218822Sdim{"addu",    "y,x,4",	0x4000, 0xf810, WR_y|RD_x,	0,	I1 },
81218822Sdim{"addu",    "x,k",	0x4800, 0xf800, WR_x|RD_x,	0,	I1 },
82218822Sdim{"addu",    "S,K",	0x6300, 0xff00, WR_SP|RD_SP,	0,	I1 },
83218822Sdim{"addu",    "S,S,K",	0x6300, 0xff00, WR_SP|RD_SP,	0,	I1 },
84218822Sdim{"addu",    "x,P,V",	0x0800, 0xf800, WR_x|RD_PC,	0,	I1 },
85218822Sdim{"addu",    "x,S,V",	0x0000, 0xf800, WR_x|RD_SP,	0,	I1 },
86218822Sdim{"and",	    "x,y",	0xe80c, 0xf81f, WR_x|RD_x|RD_y,	0,	I1 },
87218822Sdim{"b",	    "q",	0x1000, 0xf800, BR,		0,	I1 },
88218822Sdim{"beq",	    "x,y,p",	0, (int) M_BEQ, INSN_MACRO,	0,	I1 },
89218822Sdim{"beq",     "x,U,p",	0, (int) M_BEQ_I, INSN_MACRO,	0,	I1 },
90218822Sdim{"beqz",    "x,p",	0x2000, 0xf800, BR|RD_x,	0,	I1 },
91218822Sdim{"bge",	    "x,y,p",	0, (int) M_BGE, INSN_MACRO,	0,	I1 },
92218822Sdim{"bge",     "x,8,p",	0, (int) M_BGE_I, INSN_MACRO,	0,	I1 },
93218822Sdim{"bgeu",    "x,y,p",	0, (int) M_BGEU, INSN_MACRO,	0,	I1 },
94218822Sdim{"bgeu",    "x,8,p",	0, (int) M_BGEU_I, INSN_MACRO,	0,	I1 },
95218822Sdim{"bgt",	    "x,y,p",	0, (int) M_BGT, INSN_MACRO,	0,	I1 },
96218822Sdim{"bgt",     "x,8,p",	0, (int) M_BGT_I, INSN_MACRO,	0,	I1 },
97218822Sdim{"bgtu",    "x,y,p",	0, (int) M_BGTU, INSN_MACRO,	0,	I1 },
98218822Sdim{"bgtu",    "x,8,p",	0, (int) M_BGTU_I, INSN_MACRO,	0,	I1 },
99218822Sdim{"ble",	    "x,y,p",	0, (int) M_BLE, INSN_MACRO,	0,	I1 },
100218822Sdim{"ble",     "x,8,p",	0, (int) M_BLE_I, INSN_MACRO,	0,	I1 },
101218822Sdim{"bleu",    "x,y,p",	0, (int) M_BLEU, INSN_MACRO,	0,	I1 },
102218822Sdim{"bleu",    "x,8,p",	0, (int) M_BLEU_I, INSN_MACRO,	0,	I1 },
103218822Sdim{"blt",	    "x,y,p",	0, (int) M_BLT, INSN_MACRO,	0,	I1 },
104218822Sdim{"blt",     "x,8,p",	0, (int) M_BLT_I, INSN_MACRO,	0,	I1 },
105218822Sdim{"bltu",    "x,y,p",	0, (int) M_BLTU, INSN_MACRO,	0,	I1 },
106218822Sdim{"bltu",    "x,8,p",	0, (int) M_BLTU_I, INSN_MACRO,	0,	I1 },
107218822Sdim{"bne",	    "x,y,p",	0, (int) M_BNE, INSN_MACRO,	0,	I1 },
108218822Sdim{"bne",     "x,U,p",	0, (int) M_BNE_I, INSN_MACRO,	0,	I1 },
109218822Sdim{"bnez",    "x,p",	0x2800, 0xf800, BR|RD_x,	0,	I1 },
110218822Sdim{"break",   "6",	0xe805, 0xf81f, TRAP,		0,	I1 },
111218822Sdim{"bteqz",   "p",	0x6000, 0xff00, BR|RD_T,	0,	I1 },
112218822Sdim{"btnez",   "p",	0x6100, 0xff00, BR|RD_T,	0,	I1 },
113218822Sdim{"cmpi",    "x,U",	0x7000, 0xf800, WR_T|RD_x,	0,	I1 },
114218822Sdim{"cmp",	    "x,y",	0xe80a, 0xf81f, WR_T|RD_x|RD_y,	0,	I1 },
115218822Sdim{"cmp",     "x,U",	0x7000, 0xf800, WR_T|RD_x,	0,	I1 },
116208737Sjmallett{"dla",	    "y,E",	0xfe00, 0xff00, WR_y|RD_PC, 	0,	I3 },
117208737Sjmallett{"daddiu",  "y,x,4",	0x4010, 0xf810, WR_y|RD_x, 	0,	I3 },
118208737Sjmallett{"daddiu",  "y,j",	0xfd00, 0xff00, WR_y|RD_y, 	0,	I3 },
119208737Sjmallett{"daddiu",  "S,K",	0xfb00, 0xff00, WR_SP|RD_SP, 	0,	I3 },
120208737Sjmallett{"daddiu",  "S,S,K",	0xfb00, 0xff00, WR_SP|RD_SP, 	0,	I3 },
121208737Sjmallett{"daddiu",  "y,P,W",	0xfe00, 0xff00, WR_y|RD_PC, 	0,	I3 },
122208737Sjmallett{"daddiu",  "y,S,W",	0xff00, 0xff00, WR_y|RD_SP, 	0,	I3 },
123208737Sjmallett{"daddu",   "z,v,y",	0xe000, 0xf803, WR_z|RD_x|RD_y, 0,	I3 },
124208737Sjmallett{"daddu",   "y,x,4",	0x4010, 0xf810, WR_y|RD_x, 	0,	I3 },
125208737Sjmallett{"daddu",   "y,j",	0xfd00, 0xff00, WR_y|RD_y, 	0,	I3 },
126208737Sjmallett{"daddu",   "S,K",	0xfb00, 0xff00, WR_SP|RD_SP, 	0,	I3 },
127208737Sjmallett{"daddu",   "S,S,K",	0xfb00, 0xff00, WR_SP|RD_SP, 	0,	I3 },
128208737Sjmallett{"daddu",   "y,P,W",	0xfe00, 0xff00, WR_y|RD_PC, 	0,	I3 },
129208737Sjmallett{"daddu",   "y,S,W",	0xff00, 0xff00, WR_y|RD_SP, 	0,	I3 },
130208737Sjmallett{"ddiv",    "0,x,y",	0xe81e, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 	0,	I3 },
131218822Sdim{"ddiv",    "z,v,y",	0, (int) M_DDIV_3, INSN_MACRO,	0,	I1 },
132208737Sjmallett{"ddivu",   "0,x,y",	0xe81f, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0,	I3 },
133218822Sdim{"ddivu",   "z,v,y",	0, (int) M_DDIVU_3, INSN_MACRO,	0,	I1 },
134218822Sdim{"div",     "0,x,y",	0xe81a, 0xf81f, RD_x|RD_y|WR_HI|WR_LO,	0,	I1 },
135218822Sdim{"div",     "z,v,y",	0, (int) M_DIV_3, INSN_MACRO,	0,	I1 },
136218822Sdim{"divu",    "0,x,y",	0xe81b, 0xf81f, RD_x|RD_y|WR_HI|WR_LO,	0,	I1 },
137218822Sdim{"divu",    "z,v,y",	0, (int) M_DIVU_3, INSN_MACRO,	0,	I1 },
138208737Sjmallett{"dmul",    "z,v,y",	0, (int) M_DMUL, INSN_MACRO, 	0,	I3 },
139208737Sjmallett{"dmult",   "x,y",	0xe81c, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0,	I3 },
140208737Sjmallett{"dmultu",  "x,y",	0xe81d, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0,	I3 },
141208737Sjmallett{"drem",    "0,x,y",	0xe81e, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0,	I3 },
142218822Sdim{"drem",    "z,v,y",	0, (int) M_DREM_3, INSN_MACRO,	0,	I1 },
143208737Sjmallett{"dremu",   "0,x,y",	0xe81f, 0xf81f, RD_x|RD_y|WR_HI|WR_LO, 0,	I3 },
144218822Sdim{"dremu",   "z,v,y",	0, (int) M_DREMU_3, INSN_MACRO,	0,	I1 },
145208737Sjmallett{"dsllv",   "y,x",	0xe814, 0xf81f, WR_y|RD_y|RD_x, 0,	I3 },
146208737Sjmallett{"dsll",    "x,w,[",	0x3001, 0xf803, WR_x|RD_y, 	0,	I3 },
147208737Sjmallett{"dsll",    "y,x",	0xe814, 0xf81f, WR_y|RD_y|RD_x, 0,	I3 },
148208737Sjmallett{"dsrav",   "y,x",	0xe817, 0xf81f, WR_y|RD_y|RD_x, 0,	I3 },
149208737Sjmallett{"dsra",    "y,]",	0xe813, 0xf81f, WR_y|RD_y, 	0,	I3 },
150208737Sjmallett{"dsra",    "y,x",	0xe817, 0xf81f, WR_y|RD_y|RD_x, 0,	I3 },
151208737Sjmallett{"dsrlv",   "y,x",	0xe816, 0xf81f, WR_y|RD_y|RD_x, 0,	I3 },
152208737Sjmallett{"dsrl",    "y,]",	0xe808, 0xf81f, WR_y|RD_y, 	0,	I3 },
153208737Sjmallett{"dsrl",    "y,x",	0xe816, 0xf81f, WR_y|RD_y|RD_x, 0,	I3 },
154208737Sjmallett{"dsubu",   "z,v,y",	0xe002, 0xf803, WR_z|RD_x|RD_y, 0,	I3 },
155218822Sdim{"dsubu",   "y,x,4",	0, (int) M_DSUBU_I, INSN_MACRO,	0,	I1 },
156218822Sdim{"dsubu",   "y,j",	0, (int) M_DSUBU_I_2, INSN_MACRO, 0,	I1 },
157218822Sdim{"exit",    "L",	0xed09, 0xff1f, TRAP,		0,	I1 },
158218822Sdim{"exit",    "L",	0xee09, 0xff1f, TRAP,		0,	I1 },
159218822Sdim{"exit",    "L",	0xef09, 0xff1f, TRAP,		0,	I1 },
160218822Sdim{"entry",   "l",	0xe809, 0xf81f, TRAP,		0,	I1 },
161218822Sdim{"extend",  "e",	0xf000, 0xf800, 0,		0,	I1 },
162218822Sdim{"jalr",    "x",	0xe840, 0xf8ff, UBD|WR_31|RD_x,	0,	I1 },
163218822Sdim{"jalr",    "R,x",	0xe840, 0xf8ff, UBD|WR_31|RD_x,	0,	I1 },
164218822Sdim{"jal",     "x",	0xe840, 0xf8ff, UBD|WR_31|RD_x,	0,	I1 },
165218822Sdim{"jal",     "R,x",	0xe840, 0xf8ff, UBD|WR_31|RD_x,	0,	I1 },
166218822Sdim{"jal",	    "a",	0x1800, 0xfc00, UBD|WR_31,	0,	I1 },
167218822Sdim{"jalx",    "a",	0x1c00, 0xfc00, UBD|WR_31,	0,	I1 },
168218822Sdim{"jr",	    "x",	0xe800, 0xf8ff, UBD|RD_x,	0,	I1 },
169218822Sdim{"jr",	    "R",	0xe820, 0xffff, UBD|RD_31,	0,	I1 },
170218822Sdim{"j",	    "x",	0xe800, 0xf8ff, UBD|RD_x,	0,	I1 },
171218822Sdim{"j",	    "R",	0xe820, 0xffff, UBD|RD_31,	0,	I1 },
172218822Sdim{"lb",	    "y,5(x)",	0x8000, 0xf800, WR_y|RD_x,	0,	I1 },
173218822Sdim{"lbu",	    "y,5(x)",	0xa000, 0xf800, WR_y|RD_x,	0,	I1 },
174208737Sjmallett{"ld",	    "y,D(x)",	0x3800, 0xf800, WR_y|RD_x, 	0,	I3 },
175208737Sjmallett{"ld",	    "y,B",	0xfc00, 0xff00, WR_y|RD_PC, 	0,	I3 },
176208737Sjmallett{"ld",	    "y,D(P)",	0xfc00, 0xff00, WR_y|RD_PC, 	0,	I3 },
177208737Sjmallett{"ld",	    "y,D(S)",	0xf800, 0xff00, WR_y|RD_SP, 	0,	I3 },
178218822Sdim{"lh",	    "y,H(x)",	0x8800, 0xf800, WR_y|RD_x,	0,	I1 },
179218822Sdim{"lhu",	    "y,H(x)",	0xa800, 0xf800, WR_y|RD_x,	0,	I1 },
180218822Sdim{"li",	    "x,U",	0x6800, 0xf800, WR_x,		0,	I1 },
181218822Sdim{"lw",	    "y,W(x)",	0x9800, 0xf800, WR_y|RD_x,	0,	I1 },
182218822Sdim{"lw",	    "x,A",	0xb000, 0xf800, WR_x|RD_PC,	0,	I1 },
183218822Sdim{"lw",	    "x,V(P)",	0xb000, 0xf800, WR_x|RD_PC,	0,	I1 },
184218822Sdim{"lw",	    "x,V(S)",	0x9000, 0xf800, WR_x|RD_SP,	0,	I1 },
185208737Sjmallett{"lwu",     "y,W(x)",	0xb800, 0xf800, WR_y|RD_x, 	0,	I3 },
186218822Sdim{"mfhi",    "x",	0xe810, 0xf8ff, WR_x|RD_HI,	0,	I1 },
187218822Sdim{"mflo",    "x",	0xe812, 0xf8ff, WR_x|RD_LO,	0,	I1 },
188218822Sdim{"move",    "y,X",	0x6700, 0xff00, WR_y|RD_X, 	0,	I1 },
189218822Sdim{"move",    "Y,Z",	0x6500, 0xff00, WR_Y|RD_Z,	0,	I1 },
190218822Sdim{"mul",     "z,v,y",	0, (int) M_MUL, INSN_MACRO,	0,	I1 },
191218822Sdim{"mult",    "x,y",	0xe818, 0xf81f, RD_x|RD_y|WR_HI|WR_LO,	0,	I1 },
192218822Sdim{"multu",   "x,y",	0xe819, 0xf81f, RD_x|RD_y|WR_HI|WR_LO,	0,	I1 },
193218822Sdim{"neg",	    "x,w",	0xe80b, 0xf81f, WR_x|RD_y,	0,	I1 },
194218822Sdim{"not",	    "x,w",	0xe80f, 0xf81f, WR_x|RD_y,	0,	I1 },
195218822Sdim{"or",	    "x,y",	0xe80d, 0xf81f, WR_x|RD_x|RD_y,	0,	I1 },
196218822Sdim{"rem",     "0,x,y",	0xe81a, 0xf81f, RD_x|RD_y|WR_HI|WR_LO,	0,	I1 },
197218822Sdim{"rem",     "z,v,y",	0, (int) M_REM_3, INSN_MACRO,	0,	I1 },
198218822Sdim{"remu",    "0,x,y",	0xe81b, 0xf81f, RD_x|RD_y|WR_HI|WR_LO,	0,	I1 },
199218822Sdim{"remu",    "z,v,y",	0, (int) M_REMU_3, INSN_MACRO,	0,	I1 },
200218822Sdim{"sb",	    "y,5(x)",	0xc000, 0xf800, RD_y|RD_x,	0,	I1 },
201208737Sjmallett{"sd",	    "y,D(x)",	0x7800, 0xf800, RD_y|RD_x, 	0,	I3 },
202208737Sjmallett{"sd",	    "y,D(S)",	0xf900, 0xff00, RD_y|RD_PC, 	0,	I3 },
203218822Sdim{"sd",	    "R,C(S)",	0xfa00, 0xff00, RD_31|RD_PC,	0,	I1 },
204218822Sdim{"sh",	    "y,H(x)",	0xc800, 0xf800, RD_y|RD_x,	0,	I1 },
205218822Sdim{"sllv",    "y,x",	0xe804, 0xf81f, WR_y|RD_y|RD_x, 0,	I1 },
206218822Sdim{"sll",	    "x,w,<",	0x3000, 0xf803, WR_x|RD_y,	0,	I1 },
207218822Sdim{"sll",     "y,x",	0xe804, 0xf81f, WR_y|RD_y|RD_x,	0,	I1 },
208218822Sdim{"slti",    "x,8",	0x5000, 0xf800, WR_T|RD_x,	0,	I1 },
209218822Sdim{"slt",	    "x,y",	0xe802, 0xf81f, WR_T|RD_x|RD_y,	0,	I1 },
210218822Sdim{"slt",     "x,8",	0x5000, 0xf800, WR_T|RD_x,	0,	I1 },
211218822Sdim{"sltiu",   "x,8",	0x5800, 0xf800, WR_T|RD_x,	0,	I1 },
212218822Sdim{"sltu",    "x,y",	0xe803, 0xf81f, WR_T|RD_x|RD_y,	0,	I1 },
213218822Sdim{"sltu",    "x,8",	0x5800, 0xf800, WR_T|RD_x,	0,	I1 },
214218822Sdim{"srav",    "y,x",	0xe807, 0xf81f, WR_y|RD_y|RD_x,	0,	I1 },
215218822Sdim{"sra",	    "x,w,<",	0x3003, 0xf803, WR_x|RD_y,	0,	I1 },
216218822Sdim{"sra",     "y,x",	0xe807, 0xf81f, WR_y|RD_y|RD_x,	0,	I1 },
217218822Sdim{"srlv",    "y,x",	0xe806, 0xf81f, WR_y|RD_y|RD_x,	0,	I1 },
218218822Sdim{"srl",	    "x,w,<",	0x3002, 0xf803, WR_x|RD_y,	0,	I1 },
219218822Sdim{"srl",     "y,x",	0xe806, 0xf81f, WR_y|RD_y|RD_x,	0,	I1 },
220218822Sdim{"subu",    "z,v,y",	0xe003, 0xf803, WR_z|RD_x|RD_y,	0,	I1 },
221218822Sdim{"subu",    "y,x,4",	0, (int) M_SUBU_I, INSN_MACRO,	0,	I1 },
222218822Sdim{"subu",    "x,k",	0, (int) M_SUBU_I_2, INSN_MACRO,0,	I1 },
223218822Sdim{"sw",	    "y,W(x)",	0xd800, 0xf800, RD_y|RD_x,	0,	I1 },
224218822Sdim{"sw",	    "x,V(S)",	0xd000, 0xf800, RD_x|RD_SP,	0,	I1 },
225218822Sdim{"sw",	    "R,V(S)",	0x6200, 0xff00, RD_31|RD_SP,	0,	I1 },
226218822Sdim{"xor",	    "x,y",	0xe80e, 0xf81f, WR_x|RD_x|RD_y, 0,	I1 },
227208737Sjmallett  /* MIPS16e additions */
228218822Sdim{"jalrc",   "x",	0xe8c0, 0xf8ff, WR_31|RD_x|TRAP, 0,     I32 },
229218822Sdim{"jalrc",   "R,x",	0xe8c0, 0xf8ff, WR_31|RD_x|TRAP, 0,     I32 },
230218822Sdim{"jrc",     "x",	0xe880, 0xf8ff, RD_x|TRAP,	0,      I32 },
231218822Sdim{"jrc",     "R",	0xe8a0, 0xffff, RD_31|TRAP,	0,      I32 },
232218822Sdim{"restore", "M",	0x6400, 0xff80, WR_31|RD_SP|WR_SP|TRAP,	0,	I32 },
233218822Sdim{"save",    "m",	0x6480, 0xff80, RD_31|RD_SP|WR_SP|TRAP,	0,	I32 },
234218822Sdim{"sdbbp",   "6",	0xe801, 0xf81f, TRAP,		0,	I32 },
235218822Sdim{"seb",	    "x",	0xe891, 0xf8ff, WR_x|RD_x,	0,      I32 },
236218822Sdim{"seh",	    "x",	0xe8b1, 0xf8ff, WR_x|RD_x,	0,      I32 },
237218822Sdim{"sew",	    "x",	0xe8d1, 0xf8ff, WR_x|RD_x,	0,      I64 },
238218822Sdim{"zeb",	    "x",	0xe811, 0xf8ff, WR_x|RD_x,	0,      I32 },
239218822Sdim{"zeh",	    "x",	0xe831, 0xf8ff, WR_x|RD_x,	0,      I32 },
240218822Sdim{"zew",	    "x",	0xe851, 0xf8ff, WR_x|RD_x,	0,      I64 },
241179404Sobrien};
242179404Sobrien
243179404Sobrienconst int bfd_mips16_num_opcodes =
244179404Sobrien  ((sizeof mips16_opcodes) / (sizeof (mips16_opcodes[0])));
245