1 /* mips.h. Mips opcode list for GDB, the GNU debugger.
2 Copyright 1993, 94, 95, 96, 1997 Free Software Foundation, Inc.
3 Contributed by Ralph Campbell and OSF
4 Commented and modified by Ian Lance Taylor, Cygnus Support
6 This file is part of GDB, GAS, and the GNU binutils.
8 GDB, GAS, and the GNU binutils are free software; you can redistribute
9 them and/or modify them under the terms of the GNU General Public
10 License as published by the Free Software Foundation; either version
11 1, or (at your option) any later version.
13 GDB, GAS, and the GNU binutils are distributed in the hope that they
14 will be useful, but WITHOUT ANY WARRANTY; without even the implied
15 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
16 the GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this file; see the file COPYING. If not, write to the Free
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
25 /* These are bit masks and shift counts to use to access the various
26 fields of an instruction. To retrieve the X field of an
27 instruction, use the expression
28 (i >> OP_SH_X) & OP_MASK_X
29 To set the same field (to j), use
30 i = (i &~ (OP_MASK_X << OP_SH_X)) | (j << OP_SH_X)
32 Make sure you use fields that are appropriate for the instruction,
35 The 'i' format uses OP, RS, RT and IMMEDIATE.
37 The 'j' format uses OP and TARGET.
39 The 'r' format uses OP, RS, RT, RD, SHAMT and FUNCT.
41 The 'b' format uses OP, RS, RT and DELTA.
43 The floating point 'i' format uses OP, RS, RT and IMMEDIATE.
45 The floating point 'r' format uses OP, FMT, FT, FS, FD and FUNCT.
47 A breakpoint instruction uses OP, CODE and SPEC (10 bits of the
48 breakpoint instruction are not defined; Kane says the breakpoint
49 code field in BREAK is 20 bits; yet MIPS assemblers and debuggers
50 only use ten bits). An optional two-operand form of break/sdbbp
51 allows the lower ten bits to be set too, and MIPS32 and later
52 architectures allow 20 bits to be set with a signal operand
55 The syscall instruction uses CODE20.
57 The general coprocessor instructions use COPZ. */
59 #define OP_MASK_OP 0x3f
61 #define OP_MASK_RS 0x1f
63 #define OP_MASK_FR 0x1f
65 #define OP_MASK_FMT 0x1f
67 #define OP_MASK_BCC 0x7
69 #define OP_MASK_CODE 0x3ff
71 #define OP_MASK_CODE2 0x3ff
73 #define OP_MASK_RT 0x1f
75 #define OP_MASK_FT 0x1f
77 #define OP_MASK_CACHE 0x1f
78 #define OP_SH_CACHE 16
79 #define OP_MASK_RD 0x1f
81 #define OP_MASK_FS 0x1f
83 #define OP_MASK_PREFX 0x1f
84 #define OP_SH_PREFX 11
85 #define OP_MASK_CCC 0x7
87 #define OP_MASK_CODE20 0xfffff /* 20 bit syscall/breakpoint code. */
88 #define OP_SH_CODE20 6
89 #define OP_MASK_SHAMT 0x1f
91 #define OP_MASK_FD 0x1f
93 #define OP_MASK_TARGET 0x3ffffff
94 #define OP_SH_TARGET 0
95 #define OP_MASK_COPZ 0x1ffffff
97 #define OP_MASK_IMMEDIATE 0xffff
98 #define OP_SH_IMMEDIATE 0
99 #define OP_MASK_DELTA 0xffff
100 #define OP_SH_DELTA 0
101 #define OP_MASK_FUNCT 0x3f
102 #define OP_SH_FUNCT 0
103 #define OP_MASK_SPEC 0x3f
105 #define OP_SH_LOCC 8 /* FP condition code. */
106 #define OP_SH_HICC 18 /* FP condition code. */
107 #define OP_MASK_CC 0x7
108 #define OP_SH_COP1NORM 25 /* Normal COP1 encoding. */
109 #define OP_MASK_COP1NORM 0x1 /* a single bit. */
110 #define OP_SH_COP1SPEC 21 /* COP1 encodings. */
111 #define OP_MASK_COP1SPEC 0xf
112 #define OP_MASK_COP1SCLR 0x4
113 #define OP_MASK_COP1CMP 0x3
114 #define OP_SH_COP1CMP 4
115 #define OP_SH_FORMAT 21 /* FP short format field. */
116 #define OP_MASK_FORMAT 0x7
117 #define OP_SH_TRUE 16
118 #define OP_MASK_TRUE 0x1
120 #define OP_MASK_GE 0x01
121 #define OP_SH_UNSIGNED 16
122 #define OP_MASK_UNSIGNED 0x1
123 #define OP_SH_HINT 16
124 #define OP_MASK_HINT 0x1f
125 #define OP_SH_MMI 0 /* Multimedia (parallel) op. */
126 #define OP_MASK_MMI 0x3f
127 #define OP_SH_MMISUB 6
128 #define OP_MASK_MMISUB 0x1f
129 #define OP_MASK_PERFREG 0x1f /* Performance monitoring. */
130 #define OP_SH_PERFREG 1
131 #define OP_SH_SEL 0 /* Coprocessor select field. */
132 #define OP_MASK_SEL 0x7 /* The sel field of mfcZ and mtcZ. */
133 #define OP_SH_CODE19 6 /* 19 bit wait code. */
134 #define OP_MASK_CODE19 0x7ffff
136 /* This structure holds information for a particular instruction. */
140 /* The name of the instruction. */
142 /* A string describing the arguments for this instruction. */
144 /* The basic opcode for the instruction. When assembling, this
145 opcode is modified by the arguments to produce the actual opcode
146 that is used. If pinfo is INSN_MACRO, then this is 0. */
148 /* If pinfo is not INSN_MACRO, then this is a bit mask for the
149 relevant portions of the opcode when disassembling. If the
150 actual opcode anded with the match field equals the opcode field,
151 then we have found the correct instruction. If pinfo is
152 INSN_MACRO, then this field is the macro identifier. */
154 /* For a macro, this is INSN_MACRO. Otherwise, it is a collection
155 of bits describing the instruction, notably any relevant hazard
158 /* A collection of bits describing the instruction sets of which this
159 instruction or macro is a member. */
160 unsigned long membership
;
163 /* These are the characters which may appears in the args field of an
164 instruction. They appear in the order in which the fields appear
165 when the instruction is used. Commas and parentheses in the args
166 string are ignored when assembling, and written into the output
169 Each of these characters corresponds to a mask field defined above.
171 "<" 5 bit shift amount (OP_*_SHAMT)
172 ">" shift amount between 32 and 63, stored after subtracting 32 (OP_*_SHAMT)
173 "a" 26 bit target address (OP_*_TARGET)
174 "b" 5 bit base register (OP_*_RS)
175 "c" 10 bit breakpoint code (OP_*_CODE)
176 "d" 5 bit destination register specifier (OP_*_RD)
177 "h" 5 bit prefx hint (OP_*_PREFX)
178 "i" 16 bit unsigned immediate (OP_*_IMMEDIATE)
179 "j" 16 bit signed immediate (OP_*_DELTA)
180 "k" 5 bit cache opcode in target register position (OP_*_CACHE)
181 "o" 16 bit signed offset (OP_*_DELTA)
182 "p" 16 bit PC relative branch target address (OP_*_DELTA)
183 "q" 10 bit extra breakpoint code (OP_*_CODE2)
184 "r" 5 bit same register used as both source and target (OP_*_RS)
185 "s" 5 bit source register specifier (OP_*_RS)
186 "t" 5 bit target register (OP_*_RT)
187 "u" 16 bit upper 16 bits of address (OP_*_IMMEDIATE)
188 "v" 5 bit same register used as both source and destination (OP_*_RS)
189 "w" 5 bit same register used as both target and destination (OP_*_RT)
190 "U" 5 bit same destination register in both OP_*_RD and OP_*_RT
191 (used by clo and clz)
192 "C" 25 bit coprocessor function code (OP_*_COPZ)
193 "B" 20 bit syscall/breakpoint function code (OP_*_CODE20)
194 "J" 19 bit wait function code (OP_*_CODE19)
195 "x" accept and ignore register name
196 "z" must be zero register
198 Floating point instructions:
199 "D" 5 bit destination register (OP_*_FD)
200 "M" 3 bit compare condition code (OP_*_CCC) (only used for mips4 and up)
201 "N" 3 bit branch condition code (OP_*_BCC) (only used for mips4 and up)
202 "S" 5 bit fs source 1 register (OP_*_FS)
203 "T" 5 bit ft source 2 register (OP_*_FT)
204 "R" 5 bit fr source 3 register (OP_*_FR)
205 "V" 5 bit same register used as floating source and destination (OP_*_FS)
206 "W" 5 bit same register used as floating target and destination (OP_*_FT)
208 Coprocessor instructions:
209 "E" 5 bit target register (OP_*_RT)
210 "G" 5 bit destination register (OP_*_RD)
211 "P" 5 bit performance-monitor register (OP_*_PERFREG)
212 "H" 3 bit sel field (OP_*_SEL)
215 "A" General 32 bit expression
217 "F" 64 bit floating point constant in .rdata
218 "L" 64 bit floating point constant in .lit8
219 "f" 32 bit floating point constant
220 "l" 32 bit floating point constant in .lit4
223 "()" parens surrounding optional value
224 "," separates operands
226 Characters used so far, for quick reference when adding more:
228 "ABCDEFGHIJLMNPRSTUVW"
229 "abcdfhijklopqrstuvwxz"
232 /* These are the bits which may be set in the pinfo field of an
233 instructions, if it is not equal to INSN_MACRO. */
235 /* Modifies the general purpose register in OP_*_RD. */
236 #define INSN_WRITE_GPR_D 0x00000001
237 /* Modifies the general purpose register in OP_*_RT. */
238 #define INSN_WRITE_GPR_T 0x00000002
239 /* Modifies general purpose register 31. */
240 #define INSN_WRITE_GPR_31 0x00000004
241 /* Modifies the floating point register in OP_*_FD. */
242 #define INSN_WRITE_FPR_D 0x00000008
243 /* Modifies the floating point register in OP_*_FS. */
244 #define INSN_WRITE_FPR_S 0x00000010
245 /* Modifies the floating point register in OP_*_FT. */
246 #define INSN_WRITE_FPR_T 0x00000020
247 /* Reads the general purpose register in OP_*_RS. */
248 #define INSN_READ_GPR_S 0x00000040
249 /* Reads the general purpose register in OP_*_RT. */
250 #define INSN_READ_GPR_T 0x00000080
251 /* Reads the floating point register in OP_*_FS. */
252 #define INSN_READ_FPR_S 0x00000100
253 /* Reads the floating point register in OP_*_FT. */
254 #define INSN_READ_FPR_T 0x00000200
255 /* Reads the floating point register in OP_*_FR. */
256 #define INSN_READ_FPR_R 0x00000400
257 /* Modifies coprocessor condition code. */
258 #define INSN_WRITE_COND_CODE 0x00000800
259 /* Reads coprocessor condition code. */
260 #define INSN_READ_COND_CODE 0x00001000
262 #define INSN_TLB 0x00002000
263 /* Reads coprocessor register other than floating point register. */
264 #define INSN_COP 0x00004000
265 /* Instruction loads value from memory, requiring delay. */
266 #define INSN_LOAD_MEMORY_DELAY 0x00008000
267 /* Instruction loads value from coprocessor, requiring delay. */
268 #define INSN_LOAD_COPROC_DELAY 0x00010000
269 /* Instruction has unconditional branch delay slot. */
270 #define INSN_UNCOND_BRANCH_DELAY 0x00020000
271 /* Instruction has conditional branch delay slot. */
272 #define INSN_COND_BRANCH_DELAY 0x00040000
273 /* Conditional branch likely: if branch not taken, insn nullified. */
274 #define INSN_COND_BRANCH_LIKELY 0x00080000
275 /* Moves to coprocessor register, requiring delay. */
276 #define INSN_COPROC_MOVE_DELAY 0x00100000
277 /* Loads coprocessor register from memory, requiring delay. */
278 #define INSN_COPROC_MEMORY_DELAY 0x00200000
279 /* Reads the HI register. */
280 #define INSN_READ_HI 0x00400000
281 /* Reads the LO register. */
282 #define INSN_READ_LO 0x00800000
283 /* Modifies the HI register. */
284 #define INSN_WRITE_HI 0x01000000
285 /* Modifies the LO register. */
286 #define INSN_WRITE_LO 0x02000000
287 /* Takes a trap (easier to keep out of delay slot). */
288 #define INSN_TRAP 0x04000000
289 /* Instruction stores value into memory. */
290 #define INSN_STORE_MEMORY 0x08000000
291 /* Instruction uses single precision floating point. */
292 #define FP_S 0x10000000
293 /* Instruction uses double precision floating point. */
294 #define FP_D 0x20000000
295 /* Instruction is part of the tx39's integer multiply family. */
296 #define INSN_MULT 0x40000000
297 /* Instruction synchronize shared memory. */
298 #define INSN_SYNC 0x80000000
300 /* Instruction is actually a macro. It should be ignored by the
301 disassembler, and requires special treatment by the assembler. */
302 #define INSN_MACRO 0xffffffff
304 /* Masks used to mark instructions to indicate which MIPS ISA level
305 they were introduced in. ISAs, as defined below, are logical
306 ORs of these bits, indicatingthat they support the instructions
307 defined at the given level. */
309 #define INSN_ISA1 0x00000010
310 #define INSN_ISA2 0x00000020
311 #define INSN_ISA3 0x00000040
312 #define INSN_ISA4 0x00000080
313 #define INSN_ISA5 0x00000100
314 #define INSN_ISA32 0x00000200
315 #define INSN_ISA64 0x00000400
317 /* Chip specific instructions. These are bitmasks. */
319 /* MIPS R4650 instruction. */
320 #define INSN_4650 0x00010000
321 /* LSI R4010 instruction. */
322 #define INSN_4010 0x00020000
323 /* NEC VR4100 instruction. */
324 #define INSN_4100 0x00040000
325 /* Toshiba R3900 instruction. */
326 #define INSN_3900 0x00080000
327 /* 32-bit code running on a ISA3+ CPU. */
328 #define INSN_GP32 0x00100000
330 /* MIPS ISA defines, use instead of hardcoding ISA level. */
332 #define ISA_UNKNOWN 0 /* Gas internal use. */
333 #define ISA_MIPS1 (INSN_ISA1)
334 #define ISA_MIPS2 (ISA_MIPS1 | INSN_ISA2)
335 #define ISA_MIPS3 (ISA_MIPS2 | INSN_ISA3)
336 #define ISA_MIPS4 (ISA_MIPS3 | INSN_ISA4)
337 #define ISA_MIPS5 (ISA_MIPS4 | INSN_ISA5)
338 #define ISA_MIPS32 (ISA_MIPS2 | INSN_ISA32)
339 #define ISA_MIPS64 (ISA_MIPS5 | INSN_ISA32 | INSN_ISA64)
341 /* CPU defines, use instead of hardcoding processor number. Keep this
342 in sync with bfd/archures.c in order for machine selection to work. */
343 #define CPU_UNKNOWN 0 /* Gas internal use. */
344 #define CPU_R2000 2000
345 #define CPU_R3000 3000
346 #define CPU_R3900 3900
347 #define CPU_R4000 4000
348 #define CPU_R4010 4010
349 #define CPU_VR4100 4100
350 #define CPU_R4111 4111
351 #define CPU_R4300 4300
352 #define CPU_R4400 4400
353 #define CPU_R4600 4600
354 #define CPU_R4650 4650
355 #define CPU_R5000 5000
356 #define CPU_R6000 6000
357 #define CPU_R8000 8000
358 #define CPU_R10000 10000
359 #define CPU_MIPS16 16
360 #define CPU_MIPS32 32
361 #define CPU_MIPS32_4K 3204113 /* 32, 04, octal 'K'. */
363 #define CPU_MIPS64 64
364 #define CPU_SB1 12310201 /* octal 'SB', 01. */
366 /* Test for membership in an ISA including chip specific ISAs.
367 INSN is pointer to an element of the opcode table; ISA is the
368 specified ISA to test against; and CPU is the CPU specific ISA
369 to test, or zero if no CPU specific ISA test is desired.
370 The gp32 arg is set when you need to force 32-bit register usage on
371 a machine with 64-bit registers; see the documentation under -mgp32
372 in the MIPS gas docs. */
374 #define OPCODE_IS_MEMBER(insn, isa, cpu, gp32) \
375 ((((insn)->membership & isa) != 0 \
376 && ((insn)->membership & INSN_GP32 ? gp32 : 1)) \
377 || (cpu == CPU_R4650 && ((insn)->membership & INSN_4650) != 0) \
378 || (cpu == CPU_R4010 && ((insn)->membership & INSN_4010) != 0) \
379 || ((cpu == CPU_VR4100 || cpu == CPU_R4111) \
380 && ((insn)->membership & INSN_4100) != 0) \
381 || (cpu == CPU_R3900 && ((insn)->membership & INSN_3900) != 0))
383 /* This is a list of macro expanded instructions.
385 _I appended means immediate
386 _A appended means address
387 _AB appended means address with base register
388 _D appended means 64 bit floating point constant
389 _S appended means 32 bit floating point constant. */
607 /* The order of overloaded instructions matters. Label arguments and
608 register arguments look the same. Instructions that can have either
609 for arguments must apear in the correct order in this table for the
610 assembler to pick the right one. In other words, entries with
611 immediate operands must apear after the same instruction with
614 Many instructions are short hand for other instructions (i.e., The
615 jal <register> instruction is short for jalr <register>). */
617 extern const struct mips_opcode mips_builtin_opcodes
[];
618 extern const int bfd_mips_num_builtin_opcodes
;
619 extern struct mips_opcode
*mips_opcodes
;
620 extern int bfd_mips_num_opcodes
;
621 #define NUMOPCODES bfd_mips_num_opcodes
624 /* The rest of this file adds definitions for the mips16 TinyRISC
627 /* These are the bitmasks and shift counts used for the different
628 fields in the instruction formats. Other than OP, no masks are
629 provided for the fixed portions of an instruction, since they are
632 The I format uses IMM11.
634 The RI format uses RX and IMM8.
636 The RR format uses RX, and RY.
638 The RRI format uses RX, RY, and IMM5.
640 The RRR format uses RX, RY, and RZ.
642 The RRI_A format uses RX, RY, and IMM4.
644 The SHIFT format uses RX, RY, and SHAMT.
646 The I8 format uses IMM8.
648 The I8_MOVR32 format uses RY and REGR32.
650 The IR_MOV32R format uses REG32R and MOV32Z.
652 The I64 format uses IMM8.
654 The RI64 format uses RY and IMM5.
657 #define MIPS16OP_MASK_OP 0x1f
658 #define MIPS16OP_SH_OP 11
659 #define MIPS16OP_MASK_IMM11 0x7ff
660 #define MIPS16OP_SH_IMM11 0
661 #define MIPS16OP_MASK_RX 0x7
662 #define MIPS16OP_SH_RX 8
663 #define MIPS16OP_MASK_IMM8 0xff
664 #define MIPS16OP_SH_IMM8 0
665 #define MIPS16OP_MASK_RY 0x7
666 #define MIPS16OP_SH_RY 5
667 #define MIPS16OP_MASK_IMM5 0x1f
668 #define MIPS16OP_SH_IMM5 0
669 #define MIPS16OP_MASK_RZ 0x7
670 #define MIPS16OP_SH_RZ 2
671 #define MIPS16OP_MASK_IMM4 0xf
672 #define MIPS16OP_SH_IMM4 0
673 #define MIPS16OP_MASK_REGR32 0x1f
674 #define MIPS16OP_SH_REGR32 0
675 #define MIPS16OP_MASK_REG32R 0x1f
676 #define MIPS16OP_SH_REG32R 3
677 #define MIPS16OP_EXTRACT_REG32R(i) ((((i) >> 5) & 7) | ((i) & 0x18))
678 #define MIPS16OP_MASK_MOVE32Z 0x7
679 #define MIPS16OP_SH_MOVE32Z 0
680 #define MIPS16OP_MASK_IMM6 0x3f
681 #define MIPS16OP_SH_IMM6 5
683 /* These are the characters which may appears in the args field of an
684 instruction. They appear in the order in which the fields appear
685 when the instruction is used. Commas and parentheses in the args
686 string are ignored when assembling, and written into the output
689 "y" 3 bit register (MIPS16OP_*_RY)
690 "x" 3 bit register (MIPS16OP_*_RX)
691 "z" 3 bit register (MIPS16OP_*_RZ)
692 "Z" 3 bit register (MIPS16OP_*_MOVE32Z)
693 "v" 3 bit same register as source and destination (MIPS16OP_*_RX)
694 "w" 3 bit same register as source and destination (MIPS16OP_*_RY)
695 "0" zero register ($0)
696 "S" stack pointer ($sp or $29)
698 "R" return address register ($ra or $31)
699 "X" 5 bit MIPS register (MIPS16OP_*_REGR32)
700 "Y" 5 bit MIPS register (MIPS16OP_*_REG32R)
701 "6" 6 bit unsigned break code (MIPS16OP_*_IMM6)
702 "a" 26 bit jump address
703 "e" 11 bit extension value
704 "l" register list for entry instruction
705 "L" register list for exit instruction
707 The remaining codes may be extended. Except as otherwise noted,
708 the full extended operand is a 16 bit signed value.
709 "<" 3 bit unsigned shift count * 0 (MIPS16OP_*_RZ) (full 5 bit unsigned)
710 ">" 3 bit unsigned shift count * 0 (MIPS16OP_*_RX) (full 5 bit unsigned)
711 "[" 3 bit unsigned shift count * 0 (MIPS16OP_*_RZ) (full 6 bit unsigned)
712 "]" 3 bit unsigned shift count * 0 (MIPS16OP_*_RX) (full 6 bit unsigned)
713 "4" 4 bit signed immediate * 0 (MIPS16OP_*_IMM4) (full 15 bit signed)
714 "5" 5 bit unsigned immediate * 0 (MIPS16OP_*_IMM5)
715 "H" 5 bit unsigned immediate * 2 (MIPS16OP_*_IMM5)
716 "W" 5 bit unsigned immediate * 4 (MIPS16OP_*_IMM5)
717 "D" 5 bit unsigned immediate * 8 (MIPS16OP_*_IMM5)
718 "j" 5 bit signed immediate * 0 (MIPS16OP_*_IMM5)
719 "8" 8 bit unsigned immediate * 0 (MIPS16OP_*_IMM8)
720 "V" 8 bit unsigned immediate * 4 (MIPS16OP_*_IMM8)
721 "C" 8 bit unsigned immediate * 8 (MIPS16OP_*_IMM8)
722 "U" 8 bit unsigned immediate * 0 (MIPS16OP_*_IMM8) (full 16 bit unsigned)
723 "k" 8 bit signed immediate * 0 (MIPS16OP_*_IMM8)
724 "K" 8 bit signed immediate * 8 (MIPS16OP_*_IMM8)
725 "p" 8 bit conditional branch address (MIPS16OP_*_IMM8)
726 "q" 11 bit branch address (MIPS16OP_*_IMM11)
727 "A" 8 bit PC relative address * 4 (MIPS16OP_*_IMM8)
728 "B" 5 bit PC relative address * 8 (MIPS16OP_*_IMM5)
729 "E" 5 bit PC relative address * 4 (MIPS16OP_*_IMM5)
732 /* For the mips16, we use the same opcode table format and a few of
733 the same flags. However, most of the flags are different. */
735 /* Modifies the register in MIPS16OP_*_RX. */
736 #define MIPS16_INSN_WRITE_X 0x00000001
737 /* Modifies the register in MIPS16OP_*_RY. */
738 #define MIPS16_INSN_WRITE_Y 0x00000002
739 /* Modifies the register in MIPS16OP_*_RZ. */
740 #define MIPS16_INSN_WRITE_Z 0x00000004
741 /* Modifies the T ($24) register. */
742 #define MIPS16_INSN_WRITE_T 0x00000008
743 /* Modifies the SP ($29) register. */
744 #define MIPS16_INSN_WRITE_SP 0x00000010
745 /* Modifies the RA ($31) register. */
746 #define MIPS16_INSN_WRITE_31 0x00000020
747 /* Modifies the general purpose register in MIPS16OP_*_REG32R. */
748 #define MIPS16_INSN_WRITE_GPR_Y 0x00000040
749 /* Reads the register in MIPS16OP_*_RX. */
750 #define MIPS16_INSN_READ_X 0x00000080
751 /* Reads the register in MIPS16OP_*_RY. */
752 #define MIPS16_INSN_READ_Y 0x00000100
753 /* Reads the register in MIPS16OP_*_MOVE32Z. */
754 #define MIPS16_INSN_READ_Z 0x00000200
755 /* Reads the T ($24) register. */
756 #define MIPS16_INSN_READ_T 0x00000400
757 /* Reads the SP ($29) register. */
758 #define MIPS16_INSN_READ_SP 0x00000800
759 /* Reads the RA ($31) register. */
760 #define MIPS16_INSN_READ_31 0x00001000
761 /* Reads the program counter. */
762 #define MIPS16_INSN_READ_PC 0x00002000
763 /* Reads the general purpose register in MIPS16OP_*_REGR32. */
764 #define MIPS16_INSN_READ_GPR_X 0x00004000
765 /* Is a branch insn. */
766 #define MIPS16_INSN_BRANCH 0x00010000
768 /* The following flags have the same value for the mips16 opcode
770 INSN_UNCOND_BRANCH_DELAY
771 INSN_COND_BRANCH_DELAY
772 INSN_COND_BRANCH_LIKELY (never used)
781 extern const struct mips_opcode mips16_opcodes
[];
782 extern const int bfd_mips16_num_opcodes
;
784 #endif /* _MIPS_H_ */