home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / gnu / djgpp / src / binutils.2 / include / opcode / mips.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-30  |  15.2 KB  |  376 lines

  1. /* Mips opcde list for GDB, the GNU debugger.
  2.    Copyright 1989, 1992 Free Software Foundation, Inc.
  3.    Contributed by Nobuyuki Hikichi(hikichi@sra.junet)
  4.    Made to work for little-endian machines, and debugged
  5.    by Per Bothner (bothner@cs.wisc.edu).
  6.    Many fixes contributed by Frank Yellin (fy@lucid.com).
  7.  
  8. This file is part of GDB.
  9.  
  10. GDB is free software; you can redistribute it and/or modify
  11. it under the terms of the GNU General Public License as published by
  12. the Free Software Foundation; either version 1, or (at your option)
  13. any later version.
  14.  
  15. GDB is distributed in the hope that it will be useful,
  16. but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18. GNU General Public License for more details.
  19.  
  20. You should have received a copy of the GNU General Public License
  21. along with GDB; see the file COPYING.  If not, write to
  22. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  23.  
  24. /* These are bit masks and shift counts to use to access the various
  25.    fields of an instruction.  To retrieve the X field of an
  26.    instruction, use the expression
  27.     (i >> OP_SH_X) & OP_MASK_X
  28.    To set the same field (to j), use
  29.     i = (i &~ (OP_MASK_X << OP_SH_X)) | (j << OP_SH_X)
  30.  
  31.    Make sure you use fields that are appropriate for the instruction,
  32.    of course.  
  33.  
  34.    The 'i' format uses OP, RS, RT and IMMEDIATE.  
  35.  
  36.    The 'j' format uses OP and TARGET.
  37.  
  38.    The 'r' format uses OP, RS, RT, RD, SHAMT and FUNCT.
  39.  
  40.    The 'b' format uses OP, RS, RT and DELTA.
  41.  
  42.    The floating point 'i' format uses OP, RS, RT and IMMEDIATE.
  43.  
  44.    The floating point 'r' format uses OP, FMT, FT, FS, FD and FUNCT.
  45.  
  46.    A breakpoint instruction uses OP, CODE and SPEC (10 bits of the
  47.    breakpoint instruction are not defined; Kane says the
  48.    breakpoint-code code field in BREAK is 20 bits; yet MIPS assemblers
  49.    and debuggers only use ten bits).  */
  50.  
  51. #define OP_MASK_OP        0x3f
  52. #define OP_SH_OP        26
  53. #define OP_MASK_RS        0x1f
  54. #define OP_SH_RS        21
  55. #define OP_MASK_FMT        0x1f
  56. #define OP_SH_FMT        21
  57. #define OP_MASK_CODE        0x3ff
  58. #define OP_SH_CODE        16
  59. #define OP_MASK_RT        0x1f
  60. #define OP_SH_RT        16
  61. #define OP_MASK_FT        0x1f
  62. #define OP_SH_FT        16
  63. #define OP_MASK_RD        0x1f
  64. #define OP_SH_RD        11
  65. #define OP_MASK_FS        0x1f
  66. #define OP_SH_FS        11
  67. #define OP_MASK_SHAMT        0x1f
  68. #define OP_SH_SHAMT        6
  69. #define OP_MASK_FD        0x1f
  70. #define OP_SH_FD        6
  71. #define OP_MASK_TARGET        0x3ffffff
  72. #define OP_SH_TARGET        0
  73. #define OP_MASK_IMMEDIATE    0xffff
  74. #define OP_SH_IMMEDIATE        0
  75. #define OP_MASK_DELTA        0xffff
  76. #define OP_SH_DELTA        0
  77. #define OP_MASK_FUNCT        0x3f
  78. #define OP_SH_FUNCT        0
  79. #define OP_MASK_SPEC        0x3f
  80. #define OP_SH_SPEC        0
  81. #define OP_MASK_COPZ        0x01ffffff
  82. #define OP_SH_COPZ        0
  83.  
  84. struct mips_opcode
  85. {
  86.   char *name;
  87.   unsigned long opcode;
  88.   unsigned long match;
  89.   char *args;
  90.   int bdelay; /* Nonzero if delayed branch.  */
  91. };
  92.  
  93. /* args format;
  94.  
  95.    "s" rs: source register specifier
  96.    "t" rt: target register
  97.    "i" unsigned immediate
  98.    "j" signed immediate
  99.    "a" target address
  100.    "b" branch target address
  101.    "c" branch condition
  102.    "d" rd: destination register specifier
  103.    "h" shamt: shift amount
  104.    "f" funct: function field
  105.    "B" breakpoint code
  106.    "C" coprocessor function code
  107.  
  108.   for fpu
  109.    "S" fs source 1 register
  110.    "T" ft source 2 register
  111.    "D" destination register
  112. */
  113.  
  114. #define one(x) ((unsigned)(x) << OP_SH_OP)
  115. #define op_func(x, y) (one(x) | y)
  116. #define op_cond(x, y) (one(x) | (y << OP_SH_RT))
  117. #define op_rs_func(x, y, z) (one(x) | (y << OP_SH_RS) | z)
  118. #define op_rs_b11(x, y, z) (one(x) | (y << OP_SH_FMT) | z)
  119. #define op_o16(x, y) (one(x) | (y << OP_SH_RT))
  120. #define op_bc(x, y, z) (one(x) | (y << OP_SH_RS) | (z << OP_SH_RT))
  121.  
  122. struct mips_opcode mips_opcodes[] = 
  123. {
  124. /* These first opcodes are special cases of the ones in the comments */
  125.   {"nop",    0,        0xffffffff,         /*sll*/    "", 0},
  126.   {"li",    op_bc(9,0,0),    op_bc(0x3f,31,0),    /*addiu*/    "t,j", 0},
  127.   {"li",    op_bc(13,0,0),  op_bc(0x3f,31,0),    /*ori*/    "t,i", 0},
  128.   {"move",    op_func(0, 33),    op_cond(0x3f,31)|0x7ff,/*addu*/    "d,s", 0},
  129.   {"b",        one(4),        0xffff0000,         /*beq*/    "b", 1},
  130.   {"b",   op_cond (1, 1), op_cond(0x3f, 0x1f)|(0x1f << OP_SH_RS), /*bgez*/   "b", 1},
  131.   {"bal", op_cond (1, 17),op_cond(0x3f, 0x1f)|(0x1f << OP_SH_RS), /*bgezal*/ "b", 1},
  132.  
  133.   {"sll",    op_func(0, 0),    op_func(0x3f, 0x3f),        "d,t,h", 0},
  134.   {"srl",    op_func(0, 2),    op_func(0x3f, 0x3f),        "d,t,h", 0},
  135.   {"sra",    op_func(0, 3),    op_func(0x3f, 0x3f),        "d,t,h", 0},
  136.   {"sllv",    op_func(0, 4),    op_func(0x3f, 0x7ff),        "d,t,s", 0},
  137.   {"srlv",    op_func(0, 6),    op_func(0x3f, 0x7ff),        "d,t,s", 0},
  138.   {"srav",    op_func(0, 7),    op_func(0x3f, 0x7ff),        "d,t,s", 0},
  139.   {"jr",    op_func(0, 8),    op_func(0x3f, 0x1fffff),    "s", 1},
  140.   {"jalr",    op_func(0, 9),    op_func(0x3f, 0x1f07ff),    "d,s", 1},
  141.   {"syscall",    op_func(0, 12),    op_func(0x3f, 0x3f),        "", 0},
  142.   {"break",    op_func(0, 13),    op_func(0x3f, 0x3f),        "B", 0},
  143.   {"mfhi",      op_func(0, 16), op_func(0x3f, 0x03ff07ff),      "d", 0},
  144.   {"mthi",      op_func(0, 17), op_func(0x3f, 0x1fffff),        "s", 0},
  145.   {"mflo",      op_func(0, 18), op_func(0x3f, 0x03ff07ff),      "d", 0},
  146.   {"mtlo",      op_func(0, 19), op_func(0x3f, 0x1fffff),        "s", 0},
  147.   {"mult",    op_func(0, 24),    op_func(0x3f, 0xffff),        "s,t", 0},
  148.   {"multu",    op_func(0, 25),    op_func(0x3f, 0xffff),        "s,t", 0},
  149.   {"div",    op_func(0, 26),    op_func(0x3f, 0xffff),        "s,t", 0},
  150.   {"divu",    op_func(0, 27),    op_func(0x3f, 0xffff),        "s,t", 0},
  151.   {"add",    op_func(0, 32),    op_func(0x3f, 0x7ff),        "d,s,t", 0},
  152.   {"addu",    op_func(0, 33),    op_func(0x3f, 0x7ff),        "d,s,t", 0},
  153.   {"sub",    op_func(0, 34),    op_func(0x3f, 0x7ff),        "d,s,t", 0},
  154.   {"subu",    op_func(0, 35),    op_func(0x3f, 0x7ff),        "d,s,t", 0},
  155.   {"and",    op_func(0, 36),    op_func(0x3f, 0x7ff),        "d,s,t", 0},
  156.   {"or",    op_func(0, 37),    op_func(0x3f, 0x7ff),        "d,s,t", 0},
  157.   {"xor",    op_func(0, 38),    op_func(0x3f, 0x7ff),        "d,s,t", 0},
  158.   {"nor",    op_func(0, 39),    op_func(0x3f, 0x7ff),        "d,s,t", 0},
  159.   {"slt",    op_func(0, 42),    op_func(0x3f, 0x7ff),        "d,s,t", 0},
  160.   {"sltu",    op_func(0, 43),    op_func(0x3f, 0x7ff),        "d,s,t", 0},
  161.  
  162.   {"bltz",    op_cond (1, 0),    op_cond(0x3f, 0x1f),        "s,b", 1},
  163.   {"bgez",    op_cond (1, 1),    op_cond(0x3f, 0x1f),        "s,b", 1},
  164.   {"bltzal",    op_cond (1, 16),op_cond(0x3f, 0x1f),        "s,b", 1},
  165.   {"bgezal",    op_cond (1, 17),op_cond(0x3f, 0x1f),        "s,b", 1},
  166.  
  167.  
  168.   {"j",        one(2),        one(0x3f),            "a", 1},
  169.   {"jal",    one(3),        one(0x3f),            "a", 1},
  170.   {"beq",    one(4),        one(0x3f),            "s,t,b", 1},
  171.   {"bne",    one(5),        one(0x3f),            "s,t,b", 1},
  172.   {"blez",    one(6),        one(0x3f) | 0x1f0000,        "s,b", 1},
  173.   {"bgtz",    one(7),        one(0x3f) | 0x1f0000,        "s,b", 1},
  174.   {"addi",    one(8),        one(0x3f),            "t,s,j", 0},
  175.   {"addiu",    one(9),        one(0x3f),            "t,s,j", 0},
  176.   {"slti",    one(10),    one(0x3f),            "t,s,j", 0},
  177.   {"sltiu",    one(11),    one(0x3f),            "t,s,j", 0},
  178.   {"andi",    one(12),    one(0x3f),            "t,s,i", 0},
  179.   {"ori",    one(13),    one(0x3f),            "t,s,i", 0},
  180.   {"xori",    one(14),    one(0x3f),            "t,s,i", 0},
  181.     /* rs field is don't care field? */
  182.   {"lui",    one(15),    one(0x3f),            "t,i", 0},
  183.  
  184. /* Coprocessor 0 instructions */
  185. /* `S' is not quite right for 2nd operand -- should be coproc reg, not
  186.    float reg.*/
  187.   {"mfc0",    op_rs_b11 (16, 0, 0),    op_rs_b11(0x3f, 0x1f, 0x7ff),    "t,S", 0},
  188.   {"cfc0",    op_rs_b11 (16, 2, 0),    op_rs_b11(0x3f, 0x1f, 0x7ff),    "t,S", 0},
  189.   {"mtc0",    op_rs_b11 (16, 4, 0),    op_rs_b11(0x3f, 0x1f, 0x7ff),    "t,S", 0},
  190.   {"ctc0",    op_rs_b11 (16, 6, 0),    op_rs_b11(0x3f, 0x1f, 0x7ff),    "t,S", 0},
  191.  
  192.   {"bc0f",    op_o16(16, 0x100),    op_o16(0x3f, 0x3ff),    "b", 1},
  193.   {"bc0f",    op_o16(16, 0x180),    op_o16(0x3f, 0x3ff),    "b", 1},
  194.   {"bc0t",    op_o16(16, 0x101),    op_o16(0x3f, 0x3ff),    "b", 1},
  195.   {"bc0t",    op_o16(16, 0x181),    op_o16(0x3f, 0x3ff),    "b", 1},
  196.  
  197.   {"tlbr",    op_rs_func(16, 0x10, 1), ~0, "", 0},
  198.   {"tlbwi",    op_rs_func(16, 0x10, 2), ~0, "", 0},
  199.   {"tlbwr",    op_rs_func(16, 0x10, 6), ~0, "", 0},
  200.   {"tlbp",    op_rs_func(16, 0x10, 8), ~0, "", 0},
  201.   {"rfe",    op_rs_func(16, 0x10, 16), ~0, "", 0},
  202.  
  203.   {"mfc1",    op_rs_b11 (17, 0, 0),    op_rs_b11(0x3f, 0x1f, 0),"t,S", 0},
  204.   {"cfc1",    op_rs_b11 (17, 2, 0),    op_rs_b11(0x3f, 0x1f, 0),"t,S", 0},
  205.   {"mtc1",    op_rs_b11 (17, 4, 0),    op_rs_b11(0x3f, 0x1f, 0),"t,S", 0},
  206.   {"ctc1",    op_rs_b11 (17, 6, 0),    op_rs_b11(0x3f, 0x1f, 0),"t,S", 0},
  207.  
  208.   {"bc1f",    op_o16(17, 0x100),    op_o16(0x3f, 0x3ff),    "b", 1},
  209.   {"bc1f",    op_o16(17, 0x180),    op_o16(0x3f, 0x3ff),    "b", 1},
  210.   {"bc1t",    op_o16(17, 0x101),    op_o16(0x3f, 0x3ff),    "b", 1},
  211.   {"bc1t",    op_o16(17, 0x181),    op_o16(0x3f, 0x3ff),    "b", 1},
  212.  
  213. /* fpu instruction */
  214.   {"add.s",    op_rs_func(17, 0x10, 0),
  215.             op_rs_func(0x3f, 0x1f, 0x3f),    "D,S,T", 0},
  216.   {"add.d",    op_rs_func(17, 0x11, 0),
  217.             op_rs_func(0x3f, 0x1f, 0x3f),    "D,S,T", 0},
  218.   {"sub.s",    op_rs_func(17, 0x10, 1),
  219.             op_rs_func(0x3f, 0x1f, 0x3f),    "D,S,T", 0},
  220.   {"sub.d",    op_rs_func(17, 0x11, 1),
  221.             op_rs_func(0x3f, 0x1f, 0x3f),    "D,S,T", 0},
  222.   {"mul.s",    op_rs_func(17, 0x10, 2),
  223.             op_rs_func(0x3f, 0x1f, 0x3f),    "D,S,T", 0},
  224.   {"mul.d",    op_rs_func(17, 0x11, 2),
  225.             op_rs_func(0x3f, 0x1f, 0x3f),    "D,S,T", 0},
  226.   {"div.s",    op_rs_func(17, 0x10, 3),
  227.             op_rs_func(0x3f, 0x1f, 0x3f),    "D,S,T", 0},
  228.   {"div.d",    op_rs_func(17, 0x11, 3),
  229.             op_rs_func(0x3f, 0x1f, 0x3f),    "D,S,T", 0},
  230.   {"abs.s",    op_rs_func(17, 0x10, 5),
  231.             op_rs_func(0x3f, 0x1f, 0x1f003f),    "D,S", 0},
  232.   {"abs.d",    op_rs_func(17, 0x11, 5),
  233.             op_rs_func(0x3f, 0x1f, 0x1f003f),    "D,S", 0},
  234.   {"mov.s",    op_rs_func(17, 0x10, 6),
  235.             op_rs_func(0x3f, 0x1f, 0x1f003f),    "D,S", 0},
  236.   {"mov.d",    op_rs_func(17, 0x11, 6),
  237.             op_rs_func(0x3f, 0x1f, 0x1f003f),    "D,S", 0},
  238.   {"neg.s",    op_rs_func(17, 0x10, 7),
  239.             op_rs_func(0x3f, 0x1f, 0x1f003f),    "D,S", 0},
  240.   {"neg.d",    op_rs_func(17, 0x11, 7),
  241.             op_rs_func(0x3f, 0x1f, 0x1f003f),    "D,S", 0},
  242.   {"cvt.s.s",    op_rs_func(17, 0x10, 32),
  243.             op_rs_func(0x3f, 0x1f, 0x1f003f),    "D,S", 0},
  244.   {"cvt.s.d",    op_rs_func(17, 0x11, 32),
  245.             op_rs_func(0x3f, 0x1f, 0x1f003f),    "D,S", 0},
  246.   {"cvt.s.w",    op_rs_func(17, 0x14, 32),
  247.             op_rs_func(0x3f, 0x1f, 0x1f003f),    "D,S", 0},
  248.   {"cvt.d.s",    op_rs_func(17, 0x10, 33),
  249.             op_rs_func(0x3f, 0x1f, 0x1f003f),    "D,S", 0},
  250.   {"cvt.d.d",    op_rs_func(17, 0x11, 33),
  251.             op_rs_func(0x3f, 0x1f, 0x1f003f),    "D,S", 0},
  252.   {"cvt.d.w",    op_rs_func(17, 0x14, 33),
  253.             op_rs_func(0x3f, 0x1f, 0x1f003f),    "D,S", 0},
  254.   {"cvt.w.s",    op_rs_func(17, 0x10, 36),
  255.             op_rs_func(0x3f, 0x1f, 0x1f003f),    "D,S", 0},
  256.   {"cvt.w.d",    op_rs_func(17, 0x11, 36),
  257.             op_rs_func(0x3f, 0x1f, 0x1f003f),    "D,S", 0},
  258.   {"c.f.s",    op_rs_func(17, 0x10, 48),
  259.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  260.   {"c.f.d",    op_rs_func(17, 0x11, 48),
  261.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  262.   {"c.un.s",    op_rs_func(17, 0x10, 49),
  263.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  264.   {"c.un.d",    op_rs_func(17, 0x11, 49),
  265.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  266.   {"c.eq.s",    op_rs_func(17, 0x10, 50),
  267.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  268.   {"c.eq.d",    op_rs_func(17, 0x11, 50),
  269.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  270.   {"c.ueq.s",    op_rs_func(17, 0x10, 51),
  271.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  272.   {"c.ueq.d",    op_rs_func(17, 0x11, 51),
  273.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  274.   {"c.olt.s",    op_rs_func(17, 0x10, 52),
  275.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  276.   {"c.olt.d",    op_rs_func(17, 0x11, 52),
  277.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  278.   {"c.ult.s",    op_rs_func(17, 0x10, 53),
  279.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  280.   {"c.ult.d",    op_rs_func(17, 0x11, 53),
  281.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  282.   {"c.ole.s",    op_rs_func(17, 0x10, 54),
  283.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  284.   {"c.ole.d",    op_rs_func(17, 0x11, 54),
  285.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  286.   {"c.ule.s",    op_rs_func(17, 0x10, 55),
  287.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  288.   {"c.ule.d",    op_rs_func(17, 0x11, 55),
  289.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  290.   {"c.sf.s",    op_rs_func(17, 0x10, 56),
  291.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  292.   {"c.sf.d",    op_rs_func(17, 0x11, 56),
  293.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  294.   {"c.ngle.s",    op_rs_func(17, 0x10, 57),
  295.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  296.   {"c.ngle.d",    op_rs_func(17, 0x11, 57),
  297.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  298.   {"c.seq.s",    op_rs_func(17, 0x10, 58),
  299.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  300.   {"c.seq.d",    op_rs_func(17, 0x11, 58),
  301.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  302.   {"c.ngl.s",    op_rs_func(17, 0x10, 59),
  303.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  304.   {"c.ngl.d",    op_rs_func(17, 0x11, 59),
  305.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  306.   {"c.lt.s",    op_rs_func(17, 0x10, 60),
  307.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  308.   {"c.lt.d",    op_rs_func(17, 0x11, 60),
  309.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  310.   {"c.nge.s",    op_rs_func(17, 0x10, 61),
  311.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  312.   {"c.nge.d",    op_rs_func(17, 0x11, 61),
  313.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  314.   {"c.le.s",    op_rs_func(17, 0x10, 62),
  315.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  316.   {"c.le.d",    op_rs_func(17, 0x11, 62),
  317.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  318.   {"c.ngt.s",    op_rs_func(17, 0x10, 63),
  319.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  320.   {"c.ngt.d",    op_rs_func(17, 0x11, 63),
  321.             op_rs_func(0x3f, 0x1f, 0x7ff),    "S,T", 0},
  322.  
  323. /* Coprocessor 2 instruction */
  324. /* `S' is not quite right for 2nd operand -- should be coproc reg, not
  325.    float reg.*/
  326.   {"mfc2",    op_rs_b11 (18, 0, 0),    op_rs_b11(0x3f, 0x1f, 0x7ff),    "t,S", 0},
  327.   {"cfc2",    op_rs_b11 (18, 2, 0),    op_rs_b11(0x3f, 0x1f, 0x7ff),    "t,S", 0},
  328.   {"mtc2",    op_rs_b11 (18, 4, 0),    op_rs_b11(0x3f, 0x1f, 0x7ff),    "t,S", 0},
  329.   {"ctc2",    op_rs_b11 (18, 6, 0),    op_rs_b11(0x3f, 0x1f, 0x7ff),    "t,S", 0},
  330.   {"bc2f",    op_o16(18, 0x100),    op_o16(0x3f, 0x3ff),    "b", 1},
  331.   {"bc2f",    op_o16(18, 0x180),    op_o16(0x3f, 0x3ff),    "b", 1},
  332.   {"bc2t",    op_o16(18, 0x101),    op_o16(0x3f, 0x3ff),    "b", 1},
  333.   {"bc2t",    op_o16(18, 0x181),    op_o16(0x3f, 0x3ff),    "b", 1},
  334.  
  335. /* Coprocessor 3 instruction */
  336. /* `S' is not quite right for 2nd operand -- should be coproc reg, not
  337.    float reg.*/
  338.   {"mfc3",    op_rs_b11 (19, 0, 0),    op_rs_b11(0x3f, 0x1f, 0x7ff),    "t,S", 0},
  339.   {"cfc3",    op_rs_b11 (19, 2, 0),    op_rs_b11(0x3f, 0x1f, 0x7ff),    "t,S", 0},
  340.   {"mtc3",    op_rs_b11 (19, 4, 0),    op_rs_b11(0x3f, 0x1f, 0x7ff),    "t,S", 0},
  341.   {"ctc3",    op_rs_b11 (19, 6, 0),    op_rs_b11(0x3f, 0x1f, 0x7ff),    "t,S", 0},
  342.   {"bc3f",    op_o16(19, 0x100),    op_o16(0x3f, 0x3ff),    "b", 1},
  343.   {"bc3f",    op_o16(19, 0x180),    op_o16(0x3f, 0x3ff),    "b", 1},
  344.   {"bc3t",    op_o16(19, 0x101),    op_o16(0x3f, 0x3ff),    "b", 1},
  345.   {"bc3t",    op_o16(19, 0x181),    op_o16(0x3f, 0x3ff),    "b", 1},
  346.  
  347.   {"lb",    one(32),    one(0x3f),        "t,j(s)", 0},
  348.   {"lh",    one(33),    one(0x3f),        "t,j(s)", 0},
  349.   {"lwl",    one(34),    one(0x3f),        "t,j(s)", 0},
  350.   {"lw",    one(35),    one(0x3f),        "t,j(s)", 0},
  351.   {"lbu",    one(36),    one(0x3f),        "t,j(s)", 0},
  352.   {"lhu",    one(37),    one(0x3f),        "t,j(s)", 0},
  353.   {"lwr",    one(38),    one(0x3f),        "t,j(s)", 0},
  354.   {"sb",    one(40),    one(0x3f),        "t,j(s)", 0},
  355.   {"sh",    one(41),    one(0x3f),        "t,j(s)", 0},
  356.   {"swl",    one(42),    one(0x3f),        "t,j(s)", 0},
  357.   {"swr",       one(46),        one(0x3f),              "t,j(s)", 0},
  358.   {"sw",    one(43),    one(0x3f),        "t,j(s)", 0},
  359. /* 'T' is not right for [sl]wc[023], but is better than 't'.  */
  360.   {"lwc0",    one(48),    one(0x3f),        "T,j(s)", 0},
  361. /* for fpu */
  362.   {"lwc1",    one(49),    one(0x3f),        "T,j(s)", 0},
  363.   {"lwc2",    one(50),    one(0x3f),        "T,j(s)", 0},
  364.   {"lwc3",    one(51),    one(0x3f),        "T,j(s)", 0},
  365.   {"swc0",    one(56),    one(0x3f),        "T,j(s)", 0},
  366. /* for fpu */
  367.   {"swc1",    one(57),    one(0x3f),        "T,j(s)", 0},
  368.   {"swc2",    one(58),    one(0x3f),        "T,j(s)", 0},
  369.   {"swc3",    one(59),    one(0x3f),        "T,j(s)", 0},
  370. /* General coprocessor instructions.  */
  371.   {"c0", op_o16(16, 0x200), op_o16(0x3f, 0x200), "C", 0},
  372.   {"c1", op_o16(17, 0x200), op_o16(0x3f, 0x200), "C", 0},
  373.   {"c2", op_o16(18, 0x200), op_o16(0x3f, 0x200), "C", 0},
  374.   {"c3", op_o16(19, 0x200), op_o16(0x3f, 0x200), "C", 0},
  375. };
  376.