aboutsummaryrefslogtreecommitdiff
path: root/sim/mips/dsp.c
diff options
context:
space:
mode:
authorChao-ying Fu <fu@mips.com>2005-12-14 23:07:56 +0000
committerChao-ying Fu <fu@mips.com>2005-12-14 23:07:56 +0000
commit40a5538e9498da85e4df900c7f4e19bcf6f98760 (patch)
tree31d390e51bb74f9599afb9178984dda056ac9967 /sim/mips/dsp.c
parentdcf6ef0cc3332e75ceadd8f08bf88ddee09178f7 (diff)
downloadgdb-40a5538e9498da85e4df900c7f4e19bcf6f98760.zip
gdb-40a5538e9498da85e4df900c7f4e19bcf6f98760.tar.gz
gdb-40a5538e9498da85e4df900c7f4e19bcf6f98760.tar.bz2
* Makefile.in (SIM_OBJS): Add dsp.o.
(dsp.o): New dependency. (IGEN_INCLUDE): Add dsp.igen. * configure.ac (mipsisa32r2*-*-*, mipsisa32*-*-*, mipsisa64r2*-*-*, mipsisa64*-*-*): Add dsp to sim_igen_machine. * configure: Regenerate. * mips.igen: Add dsp model and include dsp.igen. (MFHI, MFLO, MTHI, MTLO): Remove mips32, mips32r2, mips64, mips64r2, because these instructions are extended in DSP ASE. * sim-main.h (LAST_EMBED_REGNUM): Change from 89 to 96 because of adding 6 DSP accumulator registers and 1 DSP control register. (AC0LOIDX, AC0HIIDX, AC1LOIDX, AC1HIIDX, AC2LOIDX, AC2HIIDX, AC3LOIDX, AC3HIIDX, DSPLO, DSPHI, DSPCRIDX, DSPCR, DSPCR_POS_SHIFT, DSPCR_POS_MASK, DSPCR_POS_SMASK, DSPCR_SCOUNT_SHIFT, DSPCR_SCOUNT_MASK, DSPCR_SCOUNT_SMASK, DSPCR_CARRY_SHIFT, DSPCR_CARRY_MASK, DSPCR_CARRY_SMASK, DSPCR_CARRY, DSPCR_EFI_SHIFT, DSPCR_EFI_MASK, DSPCR_EFI_SMASK, DSPCR_EFI, DSPCR_OUFLAG_SHIFT, DSPCR_OUFLAG_MASK, DSPCR_OUFLAG_SMASK, DSPCR_OUFLAG4, DSPCR_OUFLAG5, DSPCR_OUFLAG6, DSPCR_OUFLAG7, DSPCR_CCOND_SHIFT, DSPCR_CCOND_MASK, DSPCR_CCOND_SMASK): New define. (DSPLO_REGNUM, DSPHI_REGNUM): New array for DSP accumulators. * dsp.c, dsp.igen: New files for MIPS DSP ASE.
Diffstat (limited to 'sim/mips/dsp.c')
-rw-r--r--sim/mips/dsp.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/sim/mips/dsp.c b/sim/mips/dsp.c
new file mode 100644
index 0000000..b829d77
--- /dev/null
+++ b/sim/mips/dsp.c
@@ -0,0 +1,37 @@
+/* Simulation code for the MIPS DSP ASE.
+ Copyright (C) 2005 Free Software Foundation, Inc.
+ Contributed by MIPS Technologies, Inc. Written by Chao-ying Fu.
+
+This file is part of GDB, the GNU debugger.
+
+This program 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 2, or (at your option)
+any later version.
+
+This program 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 program; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "sim-main.h"
+
+int DSPLO_REGNUM[4] =
+{
+ AC0LOIDX,
+ AC1LOIDX,
+ AC2LOIDX,
+ AC3LOIDX,
+};
+
+int DSPHI_REGNUM[4] =
+{
+ AC0HIIDX,
+ AC1HIIDX,
+ AC2HIIDX,
+ AC3HIIDX,
+};