diff options
author | Nick Clifton <nickc@redhat.com> | 2000-05-30 17:13:37 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2000-05-30 17:13:37 +0000 |
commit | c1a72ffdd6aecb2880a7ea3a00234fd48142074c (patch) | |
tree | 856dd54c68fc6e81d5adcde3db2043fd1f859e26 /sim/arm/armcopro.c | |
parent | ac73857d8010f466a881cca261aec00a13e7512d (diff) | |
download | gdb-c1a72ffdd6aecb2880a7ea3a00234fd48142074c.zip gdb-c1a72ffdd6aecb2880a7ea3a00234fd48142074c.tar.gz gdb-c1a72ffdd6aecb2880a7ea3a00234fd48142074c.tar.bz2 |
Add support for v4 SystemMode.
Diffstat (limited to 'sim/arm/armcopro.c')
-rw-r--r-- | sim/arm/armcopro.c | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/sim/arm/armcopro.c b/sim/arm/armcopro.c index 579446c..48be680 100644 --- a/sim/arm/armcopro.c +++ b/sim/arm/armcopro.c @@ -16,6 +16,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "armdefs.h" +#include "armemu.h" #include "ansidecl.h" extern unsigned ARMul_CoProInit (ARMul_State * state); @@ -79,15 +80,29 @@ MMUMCR (ARMul_State * state, unsigned type ATTRIBUTE_UNUSED, ARMword instr, ARMw int reg = BITS (16, 19) & 7; MMUReg[reg] = value; + if (reg == 1) { + ARMword p,d,l,b; + + p = state->prog32Sig; + d = state->data32Sig; + l = state->lateabtSig; + b = state->bigendSig; + state->prog32Sig = value >> 4 & 1; state->data32Sig = value >> 5 & 1; state->lateabtSig = value >> 6 & 1; state->bigendSig = value >> 7 & 1; - state->Emulate = TRUE; /* force ARMulator to notice these now ! */ + + if (p != state->prog32Sig + || d != state->data32Sig + || l != state->lateabtSig + || b != state->bigendSig) + state->Emulate = CHANGEMODE; /* Force ARMulator to notice these now. */ } - return (ARMul_DONE); + + return ARMul_DONE; } @@ -106,15 +121,30 @@ MMUWrite (ARMul_State * state, unsigned reg, ARMword value) { if (reg < 8) MMUReg[reg] = value; + if (reg == 1) { + ARMword p,d,l,b; + + p = state->prog32Sig; + d = state->data32Sig; + l = state->lateabtSig; + b = state->bigendSig; + state->prog32Sig = value >> 4 & 1; state->data32Sig = value >> 5 & 1; state->lateabtSig = value >> 6 & 1; state->bigendSig = value >> 7 & 1; - state->Emulate = TRUE; /* force ARMulator to notice these now ! */ + + + if (p != state->prog32Sig + || d != state->data32Sig + || l != state->lateabtSig + || b != state->bigendSig) + state->Emulate = CHANGEMODE; /* Force ARMulator to notice these now. */ } - return (TRUE); + + return TRUE; } |