2005-01-14 Andrew Cagney <cagney@gnu.org>
[deliverable/binutils-gdb.git] / opcodes / mips-opc.c
index 61a2ebd79a5488a16ef3b59bba16433f0ad68c28..523aef06aab9d6d3f5795d1d1ad7044694e91c99 100644 (file)
@@ -4,7 +4,8 @@
    Contributed by Ralph Campbell and OSF
    Commented and modified by Ian Lance Taylor, Cygnus Support
    Extended for MIPS32 support by Anders Norlander, and by SiByte, Inc.
-   MIPS-3D and MDMX support added by Broadcom Corporation (SiByte).
+   MIPS-3D, MDMX, and MIPS32 Release 2 support added by Broadcom
+   Corporation (SiByte).
 
 This file is part of GDB, GAS, and the GNU binutils.
 
@@ -85,6 +86,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  *
 #define I5     INSN_ISA5
 #define I32    INSN_ISA32
 #define I64     INSN_ISA64
+#define I33    INSN_ISA32R2
+#define I65    INSN_ISA64R2
 
 /* MIPS64 MIPS-3D ASE support.  */
 #define I16     INSN_MIPS16
@@ -137,8 +140,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
 /* name,    args,      match,      mask,       pinfo,                  membership */
 {"pref",    "k,o(b)",   0xcc000000, 0xfc000000, RD_b,                  I4|I32|G3       },
 {"prefx",   "h,t(b)",  0x4c00000f, 0xfc0007ff, RD_b|RD_t,              I4      },
-{"nop",     "",         0x00000000, 0xffffffff, 0,                     I1      },
-{"ssnop",   "",         0x00000040, 0xffffffff, 0,                     I32|N55 },
+{"nop",     "",         0x00000000, 0xffffffff, 0,                     I1      }, /* sll */
+{"ssnop",   "",         0x00000040, 0xffffffff, 0,                     I32|N55 }, /* sll */
+{"ehb",     "",         0x000000c0, 0xffffffff, 0,                     I33     }, /* sll */
 {"li",      "t,j",      0x24000000, 0xffe00000, WR_t,                  I1      }, /* addiu */
 {"li",     "t,i",      0x34000000, 0xffe00000, WR_t,                   I1      }, /* ori */
 {"li",      "t,I",     0,    (int) M_LI,       INSN_MACRO,             I1      },
@@ -205,10 +209,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"bc1t",    "N,p",      0x45010000, 0xffe30000, CBD|RD_CC|FP_S,        I4|I32  },
 {"bc1tl",   "p",       0x45030000, 0xffff0000, CBL|RD_CC|FP_S,         I2|T3   },
 {"bc1tl",   "N,p",      0x45030000, 0xffe30000, CBL|RD_CC|FP_S,        I4|I32  },
-{"bc2f",    "p",       0x49000000, 0xffff0000, CBD|RD_CC,              I1      },
-{"bc2fl",   "p",       0x49020000, 0xffff0000, CBL|RD_CC,              I2|T3   },
-{"bc2t",    "p",       0x49010000, 0xffff0000, CBD|RD_CC,              I1      },
-{"bc2tl",   "p",       0x49030000, 0xffff0000, CBL|RD_CC,              I2|T3   },
+/* bc2* are at the bottom of the table.  */
 {"bc3f",    "p",       0x4d000000, 0xffff0000, CBD|RD_CC,              I1      },
 {"bc3fl",   "p",       0x4d020000, 0xffff0000, CBL|RD_CC,              I2|T3   },
 {"bc3t",    "p",       0x4d010000, 0xffff0000, CBD|RD_CC,              I1      },
@@ -270,7 +271,6 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"bnel",    "s,t,p",   0x54000000, 0xfc000000, CBL|RD_s|RD_t,          I2|T3   },
 {"bnel",    "s,I,p",   0,    (int) M_BNEL_I,   INSN_MACRO,             I2|T3   },
 {"break",   "",                0x0000000d, 0xffffffff, TRAP,                   I1      },
-{"break",   "B",        0x0000000d, 0xfc00003f, TRAP,                  I32     },
 {"break",   "c",       0x0000000d, 0xfc00ffff, TRAP,                   I1      },
 {"break",   "c,q",     0x0000000d, 0xfc00003f, TRAP,                   I1      },
 {"c.f.d",   "S,T",     0x46200030, 0xffe007ff, RD_S|RD_T|WR_CC|FP_D,   I1      },
@@ -440,14 +440,14 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"cfc0",    "t,G",     0x40400000, 0xffe007ff, LCD|WR_t|RD_C0,         I1      },
 {"cfc1",    "t,G",     0x44400000, 0xffe007ff, LCD|WR_t|RD_C1|FP_S,    I1      },
 {"cfc1",    "t,S",     0x44400000, 0xffe007ff, LCD|WR_t|RD_C1|FP_S,    I1      },
-{"cfc2",    "t,G",     0x48400000, 0xffe007ff, LCD|WR_t|RD_C2,         I1      },
+/* cfc2 is at the bottom of the table.  */
 {"cfc3",    "t,G",     0x4c400000, 0xffe007ff, LCD|WR_t|RD_C3,         I1      },
 {"clo",     "U,s",      0x70000021, 0xfc0007ff, WR_d|WR_t|RD_s,        I32|N55 },
 {"clz",     "U,s",      0x70000020, 0xfc0007ff, WR_d|WR_t|RD_s,        I32|N55 },
 {"ctc0",    "t,G",     0x40c00000, 0xffe007ff, COD|RD_t|WR_CC,         I1      },
 {"ctc1",    "t,G",     0x44c00000, 0xffe007ff, COD|RD_t|WR_CC|FP_S,    I1      },
 {"ctc1",    "t,S",     0x44c00000, 0xffe007ff, COD|RD_t|WR_CC|FP_S,    I1      },
-{"ctc2",    "t,G",     0x48c00000, 0xffe007ff, COD|RD_t|WR_CC,         I1      },
+/* ctc2 is at the bottom of the table.  */
 {"ctc3",    "t,G",     0x4cc00000, 0xffe007ff, COD|RD_t|WR_CC,         I1      },
 {"cvt.d.l", "D,S",     0x46a00021, 0xffff003f, WR_D|RD_S|FP_D,         I3      },
 {"cvt.d.s", "D,S",     0x46000021, 0xffff003f, WR_D|RD_S|FP_D|FP_S,    I1      },
@@ -478,6 +478,10 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"dctr",    "o(b)",    0xbc050000, 0xfc1f0000, RD_b,                   I3      },
 {"dctw",    "o(b)",    0xbc090000, 0xfc1f0000, RD_b,                   I3      },
 {"deret",   "",         0x4200001f, 0xffffffff, 0,                     I32|G2  },
+{"dext",    "t,r,I,+I",        0,    (int) M_DEXT,     INSN_MACRO,             I65     },
+{"dext",    "t,r,+A,+C", 0x7c000003, 0xfc00003f, WR_t|RD_s,                    I65     },
+{"dextm",   "t,r,+A,+G", 0x7c000001, 0xfc00003f, WR_t|RD_s,                    I65     },
+{"dextu",   "t,r,+E,+H", 0x7c000002, 0xfc00003f, WR_t|RD_s,                    I65     },
 /* For ddiv, see the comments about div.  */
 {"ddiv",    "z,s,t",    0x0000001e, 0xfc00ffff, RD_s|RD_t|WR_HILO,      I3      },
 {"ddiv",    "d,v,t",   0,    (int) M_DDIV_3,   INSN_MACRO,             I3      },
@@ -486,6 +490,12 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"ddivu",   "z,s,t",    0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HILO,      I3      },
 {"ddivu",   "d,v,t",   0,    (int) M_DDIVU_3,  INSN_MACRO,             I3      },
 {"ddivu",   "d,v,I",   0,    (int) M_DDIVU_3I, INSN_MACRO,             I3      },
+{"di",      "",                0x41606000, 0xffffffff, WR_t|WR_C0,             I33     },
+{"di",      "t",       0x41606000, 0xffe0ffff, WR_t|WR_C0,             I33     },
+{"dins",    "t,r,I,+I",        0,    (int) M_DINS,     INSN_MACRO,             I65     },
+{"dins",    "t,r,+A,+B", 0x7c000007, 0xfc00003f, WR_t|RD_s,                    I65     },
+{"dinsm",   "t,r,+A,+F", 0x7c000005, 0xfc00003f, WR_t|RD_s,                    I65     },
+{"dinsu",   "t,r,+E,+F", 0x7c000006, 0xfc00003f, WR_t|RD_s,                    I65     },
 /* The MIPS assembler treats the div opcode with two operands as
    though the first operand appeared twice (the first operand is both
    a source and a destination).  To get the div machine instruction,
@@ -503,6 +513,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"divu",    "d,v,t",   0,    (int) M_DIVU_3,   INSN_MACRO,             I1      },
 {"divu",    "d,v,I",   0,    (int) M_DIVU_3I,  INSN_MACRO,             I1      },
 {"dla",     "t,A(b)",  0,    (int) M_DLA_AB,   INSN_MACRO,             I3      },
+{"dlca",    "t,A(b)",  0,    (int) M_DLCA_AB,  INSN_MACRO,             I3      },
 {"dli",     "t,j",      0x24000000, 0xffe00000, WR_t,                  I3      }, /* addiu */
 {"dli",            "t,i",      0x34000000, 0xffe00000, WR_t,                   I3      }, /* ori */
 {"dli",     "t,I",     0,    (int) M_DLI,      INSN_MACRO,             I3      },
@@ -516,17 +527,17 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"dmaccus", "d,s,t",   0x00000469, 0xfc0007ff, RD_s|RD_t|WR_LO|WR_d,   N412    },
 {"dmadd16", "s,t",      0x00000029, 0xfc00ffff, RD_s|RD_t|MOD_LO,       N411    },
 {"dmfc0",   "t,G",     0x40200000, 0xffe007ff, LCD|WR_t|RD_C0,         I3      },
+{"dmfc0",   "t,+D",     0x40200000, 0xffe007f8, LCD|WR_t|RD_C0,        I64     },
 {"dmfc0",   "t,G,H",    0x40200000, 0xffe007f8, LCD|WR_t|RD_C0,        I64     },
 {"dmtc0",   "t,G",     0x40a00000, 0xffe007ff, COD|RD_t|WR_C0|WR_CC,   I3      },
+{"dmtc0",   "t,+D",     0x40a00000, 0xffe007f8, COD|RD_t|WR_C0|WR_CC,   I64     },
 {"dmtc0",   "t,G,H",    0x40a00000, 0xffe007f8, COD|RD_t|WR_C0|WR_CC,   I64     },
 {"dmfc1",   "t,S",     0x44200000, 0xffe007ff, LCD|WR_t|RD_S|FP_S,     I3      },
 {"dmfc1",   "t,G",      0x44200000, 0xffe007ff, LCD|WR_t|RD_S|FP_S,     I3      },
 {"dmtc1",   "t,S",     0x44a00000, 0xffe007ff, COD|RD_t|WR_S|FP_S,     I3      },
 {"dmtc1",   "t,G",      0x44a00000, 0xffe007ff, COD|RD_t|WR_S|FP_S,     I3      },
-{"dmfc2",   "t,G",      0x48200000, 0xffe007ff, LCD|WR_t|RD_C2,        I3      },
-{"dmfc2",   "t,G,H",    0x48200000, 0xffe007f8, LCD|WR_t|RD_C2,        I64     },
-{"dmtc2",   "t,G",      0x48a00000, 0xffe007ff, COD|RD_t|WR_C2|WR_CC,   I3      },
-{"dmtc2",   "t,G,H",    0x48a00000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC,   I64     },
+/* dmfc2 is at the bottom of the table.  */
+/* dmtc2 is at the bottom of the table.  */
 {"dmfc3",   "t,G",      0x4c200000, 0xffe007ff, LCD|WR_t|RD_C3,        I3      },
 {"dmfc3",   "t,G,H",    0x4c200000, 0xffe007f8, LCD|WR_t|RD_C3,        I64     },
 {"dmtc3",   "t,G",      0x4ca00000, 0xffe007ff, COD|RD_t|WR_C3|WR_CC,   I3      },
@@ -552,9 +563,17 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"drol",    "d,v,I",   0,    (int) M_DROL_I,   INSN_MACRO,             I3      },
 {"dror",    "d,v,t",   0,    (int) M_DROR,     INSN_MACRO,             I3      },
 {"dror",    "d,v,I",   0,    (int) M_DROR_I,   INSN_MACRO,             I3      },
-{"dror",    "d,w,<",   0x0020003a, 0xffe0003f, WR_d|RD_t,              N5      },
-{"drorv",   "d,t,s",   0x00000056, 0xfc0007ff, RD_t|RD_s|WR_d,         N5      },
-{"dror32",  "d,w,<",   0x0020003e, 0xffe0003f, WR_d|RD_t,              N5      },
+{"dror",    "d,w,<",   0x0020003a, 0xffe0003f, WR_d|RD_t,              N5|I65  },
+{"drorv",   "d,t,s",   0x00000056, 0xfc0007ff, RD_t|RD_s|WR_d,         N5|I65  },
+{"dror32",  "d,w,<",   0x0020003e, 0xffe0003f, WR_d|RD_t,              N5|I65  },
+{"drotl",   "d,v,t",   0,    (int) M_DROL,     INSN_MACRO,             I65     },
+{"drotl",   "d,v,I",   0,    (int) M_DROL_I,   INSN_MACRO,             I65     },
+{"drotr",   "d,v,t",   0,    (int) M_DROR,     INSN_MACRO,             I65     },
+{"drotr",   "d,v,I",   0,    (int) M_DROR_I,   INSN_MACRO,             I65     },
+{"drotrv",  "d,t,s",   0x00000056, 0xfc0007ff, RD_t|RD_s|WR_d,         I65     },
+{"drotr32", "d,w,<",   0x0020003e, 0xffe0003f, WR_d|RD_t,              I65     },
+{"dsbh",    "d,w",     0x7c0000a4, 0xffe007ff, WR_d|RD_t,              I65     },
+{"dshd",    "d,w",     0x7c000164, 0xffe007ff, WR_d|RD_t,              I65     },
 {"dsllv",   "d,t,s",   0x00000014, 0xfc0007ff, WR_d|RD_t|RD_s,         I3      },
 {"dsll32",  "d,w,<",   0x0000003c, 0xffe0003f, WR_d|RD_t,              I3      },
 {"dsll",    "d,w,s",   0x00000014, 0xfc0007ff, WR_d|RD_t|RD_s,         I3      }, /* dsllv */
@@ -574,7 +593,10 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"dsub",    "d,v,I",   0,    (int) M_DSUB_I,   INSN_MACRO,             I3      },
 {"dsubu",   "d,v,t",   0x0000002f, 0xfc0007ff, WR_d|RD_s|RD_t,         I3      },
 {"dsubu",   "d,v,I",   0,    (int) M_DSUBU_I,  INSN_MACRO,             I3      },
+{"ei",      "",                0x41606020, 0xffffffff, WR_t|WR_C0,             I33     },
+{"ei",      "t",       0x41606020, 0xffe0ffff, WR_t|WR_C0,             I33     },
 {"eret",    "",         0x42000018, 0xffffffff, 0,                     I3|I32  },
+{"ext",     "t,r,+A,+C", 0x7c000000, 0xfc00003f, WR_t|RD_s,                    I33     },
 {"floor.l.d", "D,S",   0x4620000b, 0xffff003f, WR_D|RD_S|FP_D,         I3      },
 {"floor.l.s", "D,S",   0x4600000b, 0xffff003f, WR_D|RD_S|FP_S,         I3      },
 {"floor.w.d", "D,S",   0x4620000f, 0xffff003f, WR_D|RD_S|FP_D,         I2      },
@@ -583,7 +605,9 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"flushd",  "",                0xbc020000, 0xffffffff, 0,                      L1      },
 {"flushid", "",                0xbc030000, 0xffffffff, 0,                      L1      },
 {"hibernate","",        0x42000023, 0xffffffff,        0,                      V1      },
+{"ins",     "t,r,+A,+B", 0x7c000004, 0xfc00003f, WR_t|RD_s,                    I33     },
 {"jr",      "s",       0x00000008, 0xfc1fffff, UBD|RD_s,               I1      },
+{"jr.hb",   "s",       0x00000408, 0xfc1fffff, UBD|RD_s,               I33     },
 {"j",       "s",       0x00000008, 0xfc1fffff, UBD|RD_s,               I1      }, /* jr */
 /* SVR4 PIC code requires special handling for j, so it must be a
    macro.  */
@@ -594,6 +618,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"j",       "a",       0x08000000, 0xfc000000, UBD,                    I1      },
 {"jalr",    "s",       0x0000f809, 0xfc1fffff, UBD|RD_s|WR_d,          I1      },
 {"jalr",    "d,s",     0x00000009, 0xfc1f07ff, UBD|RD_s|WR_d,          I1      },
+{"jalr.hb", "s",       0x0000fc09, 0xfc1fffff, UBD|RD_s|WR_d,          I33     },
+{"jalr.hb", "d,s",     0x00000409, 0xfc1f07ff, UBD|RD_s|WR_d,          I33     },
 /* SVR4 PIC code requires special handling for jal, so it must be a
    macro.  */
 {"jal",     "d,s",     0,     (int) M_JAL_2,   INSN_MACRO,             I1      },
@@ -609,6 +635,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"lb",      "t,A(b)",  0,    (int) M_LB_AB,    INSN_MACRO,             I1      },
 {"lbu",     "t,o(b)",  0x90000000, 0xfc000000, LDD|RD_b|WR_t,          I1      },
 {"lbu",     "t,A(b)",  0,    (int) M_LBU_AB,   INSN_MACRO,             I1      },
+{"lca",     "t,A(b)",  0,    (int) M_LCA_AB,   INSN_MACRO,             I1      },
 {"ld",     "t,o(b)",   0xdc000000, 0xfc000000, WR_t|RD_b,              I3      },
 {"ld",      "t,o(b)",  0,    (int) M_LD_OB,    INSN_MACRO,             I1      },
 {"ld",      "t,A(b)",  0,    (int) M_LD_AB,    INSN_MACRO,             I1      },
@@ -702,11 +729,14 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"mfpc",    "t,P",     0x4000c801, 0xffe0ffc1, LCD|WR_t|RD_C0,         M1|N5   },
 {"mfps",    "t,P",     0x4000c800, 0xffe0ffc1, LCD|WR_t|RD_C0,         M1|N5   },
 {"mfc0",    "t,G",     0x40000000, 0xffe007ff, LCD|WR_t|RD_C0,         I1      },
+{"mfc0",    "t,+D",     0x40000000, 0xffe007f8, LCD|WR_t|RD_C0,        I32     },
 {"mfc0",    "t,G,H",    0x40000000, 0xffe007f8, LCD|WR_t|RD_C0,        I32     },
 {"mfc1",    "t,S",     0x44000000, 0xffe007ff, LCD|WR_t|RD_S|FP_S,     I1      },
 {"mfc1",    "t,G",     0x44000000, 0xffe007ff, LCD|WR_t|RD_S|FP_S,     I1      },
-{"mfc2",    "t,G",     0x48000000, 0xffe007ff, LCD|WR_t|RD_C2,         I1      },
-{"mfc2",    "t,G,H",    0x48000000, 0xffe007f8, LCD|WR_t|RD_C2,        I32     },
+{"mfhc1",   "t,S",     0x44600000, 0xffe007ff, LCD|WR_t|RD_S|FP_S,     I33     },
+{"mfhc1",   "t,G",     0x44600000, 0xffe007ff, LCD|WR_t|RD_S|FP_S,     I33     },
+/* mfc2 is at the bottom of the table.  */
+/* mfhc2 is at the bottom of the table.  */
 {"mfc3",    "t,G",     0x4c000000, 0xffe007ff, LCD|WR_t|RD_C3,         I1      },
 {"mfc3",    "t,G,H",    0x4c000000, 0xffe007f8, LCD|WR_t|RD_C3,        I32     },
 {"mfdr",    "t,G",     0x7000003d, 0xffe007ff, LCD|WR_t|RD_C0,         N5      },
@@ -762,11 +792,14 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"mtpc",    "t,P",     0x4080c801, 0xffe0ffc1, COD|RD_t|WR_C0,         M1|N5   },
 {"mtps",    "t,P",     0x4080c800, 0xffe0ffc1, COD|RD_t|WR_C0,         M1|N5   },
 {"mtc0",    "t,G",     0x40800000, 0xffe007ff, COD|RD_t|WR_C0|WR_CC,   I1      },
+{"mtc0",    "t,+D",     0x40800000, 0xffe007f8, COD|RD_t|WR_C0|WR_CC,   I32     },
 {"mtc0",    "t,G,H",    0x40800000, 0xffe007f8, COD|RD_t|WR_C0|WR_CC,   I32     },
 {"mtc1",    "t,S",     0x44800000, 0xffe007ff, COD|RD_t|WR_S|FP_S,     I1      },
 {"mtc1",    "t,G",     0x44800000, 0xffe007ff, COD|RD_t|WR_S|FP_S,     I1      },
-{"mtc2",    "t,G",     0x48800000, 0xffe007ff, COD|RD_t|WR_C2|WR_CC,   I1      },
-{"mtc2",    "t,G,H",    0x48800000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC,   I32     },
+{"mthc1",   "t,S",     0x44e00000, 0xffe007ff, COD|RD_t|WR_S|FP_S,     I33     },
+{"mthc1",   "t,G",     0x44e00000, 0xffe007ff, COD|RD_t|WR_S|FP_S,     I33     },
+/* mtc2 is at the bottom of the table.  */
+/* mthc2 is at the bottom of the table.  */
 {"mtc3",    "t,G",     0x4c800000, 0xffe007ff, COD|RD_t|WR_C3|WR_CC,   I1      },
 {"mtc3",    "t,G,H",    0x4c800000, 0xffe007f8, COD|RD_t|WR_C3|WR_CC,   I32     },
 {"mtdr",    "t,G",     0x7080003d, 0xffe007ff, COD|RD_t|WR_C0,         N5      },
@@ -890,6 +923,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"remu",    "z,s,t",    0x0000001b, 0xfc00ffff, RD_s|RD_t|WR_HILO,      I1     },
 {"remu",    "d,v,t",   0,    (int) M_REMU_3,   INSN_MACRO,             I1      },
 {"remu",    "d,v,I",   0,    (int) M_REMU_3I,  INSN_MACRO,             I1      },
+{"rdhwr",   "t,K",     0x7c00003b, 0xffe007ff, WR_t,                   I33     },
+{"rdpgpr",  "d,w",     0x41400000, 0xffe007ff, WR_d,                   I33     },
 {"rfe",     "",                0x42000010, 0xffffffff, 0,                      I1|T3   },
 {"rnas.qh", "X,Q",     0x78200025, 0xfc20f83f, WR_D|RD_MACC|RD_T|FP_D, MX      },
 {"rnau.ob", "X,Q",     0x78000021, 0xfc20f83f, WR_D|RD_MACC|RD_T|FP_D, MX|SB1  },
@@ -901,8 +936,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"rol",     "d,v,I",   0,    (int) M_ROL_I,    INSN_MACRO,             I1      },
 {"ror",     "d,v,t",   0,    (int) M_ROR,      INSN_MACRO,             I1      },
 {"ror",     "d,v,I",   0,    (int) M_ROR_I,    INSN_MACRO,             I1      },
-{"ror",            "d,w,<",    0x00200002, 0xffe0003f, WR_d|RD_t,              N5      },
-{"rorv",    "d,t,s",   0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d,         N5      },
+{"ror",            "d,w,<",    0x00200002, 0xffe0003f, WR_d|RD_t,              N5|I33  },
+{"rorv",    "d,t,s",   0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d,         N5|I33  },
+{"rotl",    "d,v,t",   0,    (int) M_ROL,      INSN_MACRO,             I33     },
+{"rotl",    "d,v,I",   0,    (int) M_ROL_I,    INSN_MACRO,             I33     },
+{"rotr",    "d,v,t",   0,    (int) M_ROR,      INSN_MACRO,             I33     },
+{"rotr",    "d,v,I",   0,    (int) M_ROR_I,    INSN_MACRO,             I33     },
+{"rotrv",   "d,t,s",   0x00000046, 0xfc0007ff, RD_t|RD_s|WR_d,         I33     },
 {"round.l.d", "D,S",   0x46200008, 0xffff003f, WR_D|RD_S|FP_D,         I3      },
 {"round.l.s", "D,S",   0x46000008, 0xffff003f, WR_D|RD_S|FP_S,         I3      },
 {"round.w.d", "D,S",   0x4620000c, 0xffff003f, WR_D|RD_S|FP_D,         I2      },
@@ -950,6 +990,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"sdr",     "t,o(b)",  0xb4000000, 0xfc000000, SM|RD_t|RD_b,           I3      },
 {"sdr",     "t,A(b)",  0,    (int) M_SDR_AB,   INSN_MACRO,             I3      },
 {"sdxc1",   "S,t(b)",   0x4c000009, 0xfc0007ff, SM|RD_S|RD_t|RD_b,     I4      },
+{"seb",     "d,w",     0x7c000420, 0xffe007ff, WR_d|RD_t,              I33     },
+{"seh",     "d,w",     0x7c000620, 0xffe007ff, WR_d|RD_t,              I33     },
 {"selsl",   "d,v,t",   0x00000005, 0xfc0007ff, WR_d|RD_s|RD_t,         L1      },
 {"selsr",   "d,v,t",   0x00000001, 0xfc0007ff, WR_d|RD_s|RD_t,         L1      },
 {"seq",     "d,v,t",   0,    (int) M_SEQ,      INSN_MACRO,             I1      },
@@ -1057,6 +1099,7 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"sync",    "",                0x0000000f, 0xffffffff, INSN_SYNC,              I2|G1   },
 {"sync.p",  "",                0x0000040f, 0xffffffff, INSN_SYNC,              I2      },
 {"sync.l",  "",                0x0000000f, 0xffffffff, INSN_SYNC,              I2      },
+{"synci",   "o(b)",    0x041f0000, 0xfc1f0000, SM|RD_b,                I33     },
 {"syscall", "",                0x0000000c, 0xffffffff, TRAP,                   I1      },
 {"syscall", "B",       0x0000000c, 0xfc00003f, TRAP,                   I1      },
 {"teqi",    "s,j",     0x040c0000, 0xfc1f0000, RD_s|TRAP,              I2      },
@@ -1125,6 +1168,8 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"wait",    "J",        0x42000020, 0xfe00003f, TRAP,                  I32|N55 },
 {"waiti",   "",                0x42000020, 0xffffffff, TRAP,                   L1      },
 {"wb",             "o(b)",     0xbc040000, 0xfc1f0000, SM|RD_b,                L1      },
+{"wrpgpr",  "d,w",     0x41c00000, 0xffe007ff, RD_t,                   I33     },
+{"wsbh",    "d,w",     0x7c0000a0, 0xffe007ff, WR_d|RD_t,              I33     },
 {"xor",     "d,v,t",   0x00000026, 0xfc0007ff, WR_d|RD_s|RD_t,         I1      },
 {"xor",     "t,r,I",   0,    (int) M_XOR_I,    INSN_MACRO,             I1      },
 {"xor.ob",  "X,Y,Q",   0x7800000d, 0xfc20003f, WR_D|RD_S|RD_T|FP_D,    MX|SB1  },
@@ -1134,6 +1179,25 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"xor.qh",  "X,Y,Q",   0x7820000d, 0xfc20003f, WR_D|RD_S|RD_T|FP_D,    MX      },
 {"xori",    "t,r,i",   0x38000000, 0xfc000000, WR_t|RD_s,              I1      },
 
+/* Coprocessor 2 move/branch operations overlap with VR5400 .ob format
+   instructions so they are here for the latters to take precedence.  */
+{"bc2f",    "p",       0x49000000, 0xffff0000, CBD|RD_CC,              I1      },
+{"bc2fl",   "p",       0x49020000, 0xffff0000, CBL|RD_CC,              I2|T3   },
+{"bc2t",    "p",       0x49010000, 0xffff0000, CBD|RD_CC,              I1      },
+{"bc2tl",   "p",       0x49030000, 0xffff0000, CBL|RD_CC,              I2|T3   },
+{"cfc2",    "t,G",     0x48400000, 0xffe007ff, LCD|WR_t|RD_C2,         I1      },
+{"ctc2",    "t,G",     0x48c00000, 0xffe007ff, COD|RD_t|WR_CC,         I1      },
+{"dmfc2",   "t,G",     0x48200000, 0xffe007ff, LCD|WR_t|RD_C2,         I3      },
+{"dmfc2",   "t,G,H",   0x48200000, 0xffe007f8, LCD|WR_t|RD_C2,         I64     },
+{"dmtc2",   "t,G",     0x48a00000, 0xffe007ff, COD|RD_t|WR_C2|WR_CC,   I3      },
+{"dmtc2",   "t,G,H",   0x48a00000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC,   I64     },
+{"mfc2",    "t,G",     0x48000000, 0xffe007ff, LCD|WR_t|RD_C2,         I1      },
+{"mfc2",    "t,G,H",   0x48000000, 0xffe007f8, LCD|WR_t|RD_C2,         I32     },
+{"mfhc2",   "t,i",     0x48600000, 0xffe00000, LCD|WR_t|RD_C2,         I33     },
+{"mtc2",    "t,G",     0x48800000, 0xffe007ff, COD|RD_t|WR_C2|WR_CC,   I1      },
+{"mtc2",    "t,G,H",   0x48800000, 0xffe007f8, COD|RD_t|WR_C2|WR_CC,   I32     },
+{"mthc2",   "t,i",     0x48e00000, 0xffe00000, COD|RD_t|WR_C2|WR_CC,   I33     },
+
 /* No hazard protection on coprocessor instructions--they shouldn't
    change the state of the processor and if they do it's up to the
    user to put in nops as necessary.  These are at the end so that the
This page took 0.027204 seconds and 4 git commands to generate.