binutils/
[deliverable/binutils-gdb.git] / opcodes / mips-opc.c
index 34f131e478c40f46e2ac95bb8f6091fb0d82c5a9..7c2ef2bd316375915ad8616e54f78c4704c2054a 100644 (file)
@@ -1,27 +1,28 @@
 /* mips-opc.c -- MIPS opcode list.
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
-   2003, 2004, 2005 Free Software Foundation, Inc.
+   2003, 2004, 2005, 2007  Free Software Foundation, Inc.
    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, MDMX, and MIPS32 Release 2 support added by Broadcom
    Corporation (SiByte).
 
-This file is part of GDB, GAS, and the GNU binutils.
+   This file is part of the GNU opcodes library.
 
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
+   This library is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
 
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
-the GNU General Public License for more details.
+   It is distributed in the hope that it will be useful, but WITHOUT
+   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+   or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+   License for more details.
 
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING.  If not, write to the Free
-Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
+   You should have received a copy of the GNU General Public License
+   along with this file; see the file COPYING.  If not, write to the
+   Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
+   MA 02110-1301, USA.  */
 
 #include <stdio.h>
 #include "sysdep.h"
@@ -148,6 +149,7 @@ Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, US
 #define MOD_a  WR_a|RD_a
 #define DSP_VOLA       INSN_TRAP
 #define D32    INSN_DSP
+#define D33    INSN_DSPR2
 #define D64    INSN_DSP64
 
 /* MIPS MT ASE support.  */
@@ -764,11 +766,13 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"madd",    "s,t",      0x0000001c, 0xfc00ffff, RD_s|RD_t|WR_HILO,           0,                L1      },
 {"madd",    "s,t",      0x70000000, 0xfc00ffff, RD_s|RD_t|MOD_HILO,          0,                I32|N55 },
 {"madd",    "s,t",      0x70000000, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M,      0,                G1      },
+{"madd",    "7,s,t",   0x70000000, 0xfc00e7ff, MOD_a|RD_s|RD_t,             0,         D33     },
 {"madd",    "d,s,t",    0x70000000, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, 0,                G1      },
 {"maddp",   "s,t",      0x70000441, 0xfc00ffff,        RD_s|RD_t|MOD_HILO,          0,         SMT     },
 {"maddu",   "s,t",      0x0000001d, 0xfc00ffff, RD_s|RD_t|WR_HILO,           0,                L1      },
 {"maddu",   "s,t",      0x70000001, 0xfc00ffff, RD_s|RD_t|MOD_HILO,          0,                I32|N55 },
 {"maddu",   "s,t",      0x70000001, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M,      0,                G1      },
+{"maddu",   "7,s,t",   0x70000001, 0xfc00e7ff, MOD_a|RD_s|RD_t,             0,         D33     },
 {"maddu",   "d,s,t",    0x70000001, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, 0,                G1      },
 {"madd16",  "s,t",      0x00000028, 0xfc00ffff, RD_s|RD_t|MOD_HILO,    0,              N411    },
 {"max.ob",  "X,Y,Q",   0x78000007, 0xfc20003f, WR_D|RD_S|RD_T|FP_D,    0,              MX|SB1  },
@@ -857,8 +861,10 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"msub.ps", "D,R,S,T", 0x4c00002e, 0xfc00003f, RD_R|RD_S|RD_T|WR_D|FP_D, 0,            I5|I33  },
 {"msub",    "s,t",      0x0000001e, 0xfc00ffff, RD_s|RD_t|WR_HILO,     0,              L1      },
 {"msub",    "s,t",      0x70000004, 0xfc00ffff, RD_s|RD_t|MOD_HILO,     0,             I32|N55 },
+{"msub",    "7,s,t",   0x70000004, 0xfc00e7ff, MOD_a|RD_s|RD_t,        0,              D33     },
 {"msubu",   "s,t",      0x0000001f, 0xfc00ffff, RD_s|RD_t|WR_HILO,     0,              L1      },
 {"msubu",   "s,t",      0x70000005, 0xfc00ffff, RD_s|RD_t|MOD_HILO,     0,             I32|N55 },
+{"msubu",   "7,s,t",   0x70000005, 0xfc00e7ff, MOD_a|RD_s|RD_t,        0,              D33     },
 {"mtpc",    "t,P",     0x4080c801, 0xffe0ffc1, COD|RD_t|WR_C0,         0,              M1|N5   },
 {"mtps",    "t,P",     0x4080c800, 0xffe0ffc1, COD|RD_t|WR_C0,         0,              M1|N5   },
 {"mtc0",    "t,G",     0x40800000, 0xffe007ff, COD|RD_t|WR_C0|WR_CC,   0,              I1      },
@@ -939,9 +945,11 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"mulsl.ob", "S,k",    0x4bc00432, 0xffe007ff, WR_CC|RD_S|RD_T,        0,              N54     },
 {"mulsl.qh", "Y,Q",    0x78200432, 0xfc2007ff, RD_S|RD_T|FP_D,         WR_MACC,        MX      },
 {"mult",    "s,t",      0x00000018, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0,             I1      },
+{"mult",    "7,s,t",   0x00000018, 0xfc00e7ff, WR_a|RD_s|RD_t,         0,              D33     },
 {"mult",    "d,s,t",    0x00000018, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, 0,                G1      },
 {"multp",   "s,t",     0x00000459, 0xfc00ffff, RD_s|RD_t|MOD_HILO,     0,              SMT     },
 {"multu",   "s,t",      0x00000019, 0xfc00ffff, RD_s|RD_t|WR_HILO|IS_M, 0,             I1      },
+{"multu",   "7,s,t",   0x00000019, 0xfc00e7ff, WR_a|RD_s|RD_t,         0,              D33     },
 {"multu",   "d,s,t",    0x00000019, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d|IS_M, 0,                G1      },
 {"mulu",    "d,s,t",   0x00000059, 0xfc0007ff, RD_s|RD_t|WR_HILO|WR_d, 0,              N5      },
 {"neg",     "d,w",     0x00000022, 0xffe007ff, WR_d|RD_t,              0,              I1      }, /* sub 0 */
@@ -1631,6 +1639,54 @@ const struct mips_opcode mips_builtin_opcodes[] =
 {"subu_s.qb", "d,s,t", 0x7c000150, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D32     },
 {"wrdsp",   "s",       0x7c1ffcf8, 0xfc1fffff, RD_s|DSP_VOLA,          0,              D32     },
 {"wrdsp",   "s,8",     0x7c0004f8, 0xfc1e07ff, RD_s|DSP_VOLA,          0,              D32     },
+/* MIPS DSP ASE Rev2 */
+{"absq_s.qb", "d,t",   0x7c000052, 0xffe007ff, WR_d|RD_t,              0,              D33     },
+{"addu.ph", "d,s,t",   0x7c000210, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"addu_s.ph", "d,s,t", 0x7c000310, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"adduh.qb", "d,s,t",  0x7c000018, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"adduh_r.qb", "d,s,t",        0x7c000098, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"append",  "t,s,h",   0x7c000031, 0xfc0007ff, WR_t|RD_t|RD_s,         0,              D33     },
+{"balign",  "t,s,I",   0,    (int) M_BALIGN,   INSN_MACRO,             0,              D33     },
+{"balign",  "t,s,2",   0x7c000431, 0xfc00e7ff, WR_t|RD_t|RD_s,         0,              D33     },
+{"cmpgdu.eq.qb", "d,s,t", 0x7c000611, 0xfc0007ff, WR_d|RD_s|RD_t,       0,              D33    },
+{"cmpgdu.lt.qb", "d,s,t", 0x7c000651, 0xfc0007ff, WR_d|RD_s|RD_t,       0,              D33    },
+{"cmpgdu.le.qb", "d,s,t", 0x7c000691, 0xfc0007ff, WR_d|RD_s|RD_t,       0,              D33    },
+{"dpa.w.ph", "7,s,t",  0x7c000030, 0xfc00e7ff, MOD_a|RD_s|RD_t,        0,              D33     },
+{"dps.w.ph", "7,s,t",  0x7c000070, 0xfc00e7ff, MOD_a|RD_s|RD_t,        0,              D33     },
+{"mul.ph",  "d,s,t",   0x7c000318, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0,              D33     },
+{"mul_s.ph", "d,s,t",  0x7c000398, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0,              D33     },
+{"mulq_rs.w", "d,s,t", 0x7c0005d8, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0,              D33     },
+{"mulq_s.ph", "d,s,t", 0x7c000790, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0,              D33     },
+{"mulq_s.w", "d,s,t",  0x7c000598, 0xfc0007ff, WR_d|RD_s|RD_t|WR_HILO, 0,              D33     },
+{"mulsa.w.ph", "7,s,t",        0x7c0000b0, 0xfc00e7ff, MOD_a|RD_s|RD_t,        0,              D33     },
+{"precr.qb.ph", "d,s,t", 0x7c000351, 0xfc0007ff, WR_d|RD_s|RD_t,        0,              D33    },
+{"precr_sra.ph.w", "t,s,h", 0x7c000791, 0xfc0007ff, WR_t|RD_t|RD_s,     0,              D33    },
+{"precr_sra_r.ph.w", "t,s,h", 0x7c0007d1, 0xfc0007ff, WR_t|RD_t|RD_s,   0,              D33    },
+{"prepend", "t,s,h",   0x7c000071, 0xfc0007ff, WR_t|RD_t|RD_s,         0,              D33     },
+{"shra.qb", "d,t,3",   0x7c000113, 0xff0007ff, WR_d|RD_t,              0,              D33     },
+{"shra_r.qb", "d,t,3", 0x7c000153, 0xff0007ff, WR_d|RD_t,              0,              D33     },
+{"shrav.qb", "d,t,s",  0x7c000193, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"shrav_r.qb", "d,t,s",        0x7c0001d3, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"shrl.ph", "d,t,4",   0x7c000653, 0xfe0007ff, WR_d|RD_t,              0,              D33     },
+{"shrlv.ph", "d,t,s",  0x7c0006d3, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"subu.ph", "d,s,t",   0x7c000250, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"subu_s.ph", "d,s,t", 0x7c000350, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"subuh.qb", "d,s,t",  0x7c000058, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"subuh_r.qb", "d,s,t",        0x7c0000d8, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"addqh.ph", "d,s,t",  0x7c000218, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"addqh_r.ph", "d,s,t",        0x7c000298, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"addqh.w", "d,s,t",   0x7c000418, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"addqh_r.w", "d,s,t", 0x7c000498, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"subqh.ph", "d,s,t",  0x7c000258, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"subqh_r.ph", "d,s,t",        0x7c0002d8, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"subqh.w", "d,s,t",   0x7c000458, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"subqh_r.w", "d,s,t", 0x7c0004d8, 0xfc0007ff, WR_d|RD_s|RD_t,         0,              D33     },
+{"dpax.w.ph", "7,s,t", 0x7c000230, 0xfc00e7ff, MOD_a|RD_s|RD_t,        0,              D33     },
+{"dpsx.w.ph", "7,s,t", 0x7c000270, 0xfc00e7ff, MOD_a|RD_s|RD_t,        0,              D33     },
+{"dpaqx_s.w.ph", "7,s,t", 0x7c000630, 0xfc00e7ff, MOD_a|RD_s|RD_t,     0,              D33     },
+{"dpaqx_sa.w.ph", "7,s,t", 0x7c0006b0, 0xfc00e7ff, MOD_a|RD_s|RD_t,    0,              D33     },
+{"dpsqx_s.w.ph", "7,s,t", 0x7c000670, 0xfc00e7ff, MOD_a|RD_s|RD_t,     0,              D33     },
+{"dpsqx_sa.w.ph", "7,s,t", 0x7c0006f0, 0xfc00e7ff, MOD_a|RD_s|RD_t,    0,              D33     },
 /* Move bc0* after mftr and mttr to avoid opcode collision.  */
 {"bc0f",    "p",       0x41000000, 0xffff0000, CBD|RD_CC,              0,              I1      },
 {"bc0fl",   "p",       0x41020000, 0xffff0000, CBL|RD_CC,              0,              I2|T3   },
This page took 0.029066 seconds and 4 git commands to generate.