MIPS16/opcodes: Fix and clarify MIPS16e commentary
[binutils-gdb.git] / opcodes / mips16-opc.c
index f23b8d68de00877d2d8ab448325c8683ae91be2a..0fcefc6d24ad46e641e63a493b63083256562606 100644 (file)
@@ -61,7 +61,7 @@ decode_mips16_operand (char type, bfd_boolean extended_p)
     case 'Z': MAPPED_REG (3, 0, GP, reg_m16_map);
 
     case 'a': JUMP (26, 0, 2);
-    case 'e': UINT (11, 0);
+    case 'e': HINT (11, 0);
     case 'i': JALX (26, 0, 2);
     case 'l': SPECIAL (6, 5, ENTRY_EXIT_LIST);
     case 'm': SPECIAL (7, 0, SAVE_RESTORE_LIST);
@@ -76,7 +76,6 @@ decode_mips16_operand (char type, bfd_boolean extended_p)
     switch (type)
       {
       case '<': UINT (5, 0);
-      case '>': UINT (5, 0);
       case '[': UINT (6, 0);
       case ']': UINT (6, 0);
 
@@ -105,7 +104,6 @@ decode_mips16_operand (char type, bfd_boolean extended_p)
     switch (type)
       {
       case '<': INT_ADJ (3, 2, 8, 0, FALSE);
-      case '>': INT_ADJ (3, 8, 8, 0, FALSE);
       case '[': INT_ADJ (3, 2, 8, 0, FALSE);
       case ']': INT_ADJ (3, 8, 8, 0, FALSE);
 
@@ -181,7 +179,7 @@ decode_mips16_operand (char type, bfd_boolean extended_p)
 
 const struct mips_opcode mips16_opcodes[] =
 {
-/* name,    args,      match,  mask,           pinfo,                  pinfo2, membership */
+/* name,    args,      match,  mask,           pinfo,                  pinfo2, membership,     ase,    exclusions */
 {"nop",            "",         0x6500, 0xffff,         0,                      RD_16,          I1,     0,      0 }, /* move $0,$Z */
 {"la",     "x,A",      0x0800, 0xf800,         WR_1,                   RD_PC,          I1,     0,      0 },
 {"abs",            "x,w",      0, (int) M_ABS,         INSN_MACRO,             0,              I1,     0,      0 },
@@ -286,9 +284,9 @@ const struct mips_opcode mips16_opcodes[] =
 {"jr",     "R",        0xe820, 0xffff,         UBD,                    RD_31,          I1,     0,      0 },
 {"j",      "x",        0xe800, 0xf8ff,         RD_1|UBD,               0,              I1,     0,      0 },
 {"j",      "R",        0xe820, 0xffff,         UBD,                    RD_31,          I1,     0,      0 },
-/* MIPS16e compact branches.  We keep them near the ordinary branches
-   so that we easily find them when converting a normal branch to a
-   compact one.  */
+/* MIPS16e compact jumps.  We keep them near the ordinary jumps
+   so that we easily find them when converting a normal jump
+   to a compact one.  */
 {"jalrc",   "x",       0xe8c0, 0xf8ff,         RD_1|WR_31|NODS,        UBR,            I32,    0,      0 },
 {"jalrc",   "R,x",     0xe8c0, 0xf8ff,         RD_2|WR_31|NODS,        UBR,            I32,    0,      0 },
 {"jrc",            "x",        0xe880, 0xf8ff,         RD_1|NODS,              UBR,            I32,    0,      0 },
@@ -348,7 +346,7 @@ const struct mips_opcode mips16_opcodes[] =
 {"sw",     "x,V(S)",   0xd000, 0xf800,         RD_1,                   RD_SP,          I1,     0,      0 },
 {"sw",     "R,V(S)",   0x6200, 0xff00,         0,                      RD_31|RD_SP,    I1,     0,      0 },
 {"xor",            "x,y",      0xe80e, 0xf81f,         MOD_1|RD_2,     0,              I1,     0,      0 },
-  /* MIPS16e additions */
+  /* MIPS16e additions; see above for compact jumps.  */
 {"restore", "M",       0x6400, 0xff80,         WR_31|NODS,             MOD_SP,         I32,    0,      0 },
 {"save",    "m",       0x6480, 0xff80,         NODS,                   RD_31|MOD_SP,   I32,    0,      0 },
 {"sdbbp",   "6",       0xe801, 0xf81f,         TRAP,                   0,              I32,    0,      0 },