mips32: Add support for mips32 DSP instruction set.
Add support for mips32 DSP and DSP revision 2 ASE.
More details about the mips32 DSP(r2) ASE:
http://www.mips.com/media/files/MD00566-2B-MIPSDSP-QRC-01.00.pdf
Applied patch provided by Maja Gagic <maja.gagic@rt-rk.com>
git-svn-id: svn://svn.valgrind.org/vex/trunk@2732 8f6e269a-dfd6-0310-a8e1-e2731360e62c
diff --git a/priv/main_main.c b/priv/main_main.c
index a2920fe..05ca8fa 100644
--- a/priv/main_main.c
+++ b/priv/main_main.c
@@ -1418,8 +1418,45 @@
static const HChar* show_hwcaps_mips32 ( UInt hwcaps )
{
- if (hwcaps == 0x00010000) return "MIPS-baseline";
- if (hwcaps == 0x00020000) return "Broadcom-baseline";
+ /* MIPS baseline. */
+ if (hwcaps && VEX_PRID_COMP_MIPS == VEX_PRID_COMP_MIPS) {
+ /* MIPS baseline with dspr2. */
+ if (hwcaps && VEX_MIPS_ASE_DSP2P == VEX_MIPS_ASE_DSP2P) {
+ return "MIPS-baseline-dspr2";
+ }
+ /* MIPS baseline with dsp. */
+ if (hwcaps && VEX_MIPS_ASE_DSP == VEX_MIPS_ASE_DSP) {
+ return "MIPS-baseline-dsp";
+ }
+ return "MIPS-baseline";
+ }
+
+ /* Broadcom baseline. */
+ if (hwcaps && VEX_PRID_COMP_BROADCOM == VEX_PRID_COMP_BROADCOM) {
+ /* Broadcom baseline with dspr2. */
+ if (hwcaps && VEX_MIPS_ASE_DSP2P == VEX_MIPS_ASE_DSP2P) {
+ return "Broadcom-baseline-dspr2";
+ }
+ /* Broadcom baseline with dsp. */
+ if (hwcaps && VEX_MIPS_ASE_DSP == VEX_MIPS_ASE_DSP) {
+ return "Broadcom-baseline-dsp";
+ }
+ return "Broadcom-baseline";
+ }
+
+ /* Netlogic baseline. */
+ if (hwcaps && VEX_PRID_COMP_NETLOGIC == VEX_PRID_COMP_NETLOGIC) {
+ /* Netlogic baseline with dspr2. */
+ if (hwcaps && VEX_MIPS_ASE_DSP2P == VEX_MIPS_ASE_DSP2P) {
+ return "Netlogic-baseline-dspr2";
+ }
+ /* Netlogic baseline with dsp. */
+ if (hwcaps && VEX_MIPS_ASE_DSP == VEX_MIPS_ASE_DSP) {
+ return "Netlogic-baseline-dsp";
+ }
+ return "Netlogic-baseline";
+ }
+
return NULL;
}