diff options
Diffstat (limited to 'sim/arm/armemu.c')
-rw-r--r-- | sim/arm/armemu.c | 27 |
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)) |