aboutsummaryrefslogtreecommitdiff
path: root/sim/arm/armemu.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-03-27 17:13:33 +0000
committerNick Clifton <nickc@redhat.com>2003-03-27 17:13:33 +0000
commit0f026fd00cb8fec25a722afb2acd44aadfc046ef (patch)
treec03e941a65a5e0931ed86c13fb0bdb13a33f3146 /sim/arm/armemu.c
parent378bfd1b7a2a1afc6553da2ae148a3908cf6d147 (diff)
downloadgdb-0f026fd00cb8fec25a722afb2acd44aadfc046ef.zip
gdb-0f026fd00cb8fec25a722afb2acd44aadfc046ef.tar.gz
gdb-0f026fd00cb8fec25a722afb2acd44aadfc046ef.tar.bz2
Add iWMMXt support to ARM simulator
Diffstat (limited to 'sim/arm/armemu.c')
-rw-r--r--sim/arm/armemu.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/sim/arm/armemu.c b/sim/arm/armemu.c
index 44943c4..53fc992 100644
--- a/sim/arm/armemu.c
+++ b/sim/arm/armemu.c
@@ -19,6 +19,9 @@
#include "armdefs.h"
#include "armemu.h"
#include "armos.h"
+#ifdef __IWMMXT__
+#include "iwmmxt.h"
+#endif
static ARMword GetDPRegRHS (ARMul_State *, ARMword);
static ARMword GetDPSRegRHS (ARMul_State *, ARMword);
@@ -380,6 +383,20 @@ ARMul_Emulate26 (ARMul_State * state)
if (instr == 0)
abort ();
#endif
+#ifdef __IWMMXT__
+#if 0
+ {
+ static ARMword old_sp = -1;
+
+ if (old_sp != state->Reg[13])
+ {
+ old_sp = state->Reg[13];
+ fprintf (stderr, "pc: %08x: SP set to %08x%s\n",
+ pc & ~1, old_sp, (old_sp % 8) ? " [UNALIGNED!]" : "");
+ }
+ }
+#endif
+#endif
if (state->Exception)
{
@@ -492,6 +509,12 @@ ARMul_Emulate26 (ARMul_State * state)
else if ((instr & 0xFC70F000) == 0xF450F000)
/* The PLD instruction. Ignored. */
goto donext;
+#ifdef __IWMMXT__
+ else if ( ((instr & 0xfe500f00) == 0xfc100100)
+ || ((instr & 0xfe500f00) == 0xfc000100))
+ /* wldrw and wstrw are unconditional. */
+ goto mainswitch;
+#endif
else
/* UNDEFINED in v5, UNPREDICTABLE in v3, v4, non executed in v1, v2. */
ARMul_UndefInstr (state, instr);
@@ -689,6 +712,10 @@ check_PMUintr:
goto donext;
}
}
+#ifdef __IWMMXT__
+ if (ARMul_HandleIwmmxt (state, instr))
+ goto donext;
+#endif
}
switch ((int) BITS (20, 27))