aboutsummaryrefslogtreecommitdiff
path: root/sim/arm/arminit.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-05-30 17:13:37 +0000
committerNick Clifton <nickc@redhat.com>2000-05-30 17:13:37 +0000
commitc1a72ffdd6aecb2880a7ea3a00234fd48142074c (patch)
tree856dd54c68fc6e81d5adcde3db2043fd1f859e26 /sim/arm/arminit.c
parentac73857d8010f466a881cca261aec00a13e7512d (diff)
downloadgdb-c1a72ffdd6aecb2880a7ea3a00234fd48142074c.zip
gdb-c1a72ffdd6aecb2880a7ea3a00234fd48142074c.tar.gz
gdb-c1a72ffdd6aecb2880a7ea3a00234fd48142074c.tar.bz2
Add support for v4 SystemMode.
Diffstat (limited to 'sim/arm/arminit.c')
-rw-r--r--sim/arm/arminit.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sim/arm/arminit.c b/sim/arm/arminit.c
index 3e75b47..0105c17 100644
--- a/sim/arm/arminit.c
+++ b/sim/arm/arminit.c
@@ -85,7 +85,8 @@ ARMul_NewState (void)
}
for (i = 0; i < 7; i++)
state->Spsr[i] = 0;
- state->Mode = 0;
+
+ state->Mode = USER26MODE;
state->CallDebug = FALSE;
state->Debug = FALSE;
@@ -156,18 +157,23 @@ void
ARMul_Reset (ARMul_State * state)
{
state->NextInstr = 0;
+
if (state->prog32Sig)
{
state->Reg[15] = 0;
state->Cpsr = INTBITS | SVC32MODE;
+ state->Mode = SVC32MODE;
}
else
{
state->Reg[15] = R15INTBITS | SVC26MODE;
state->Cpsr = INTBITS | SVC26MODE;
+ state->Mode = SVC26MODE;
}
+
ARMul_CPSRAltered (state);
state->Bank = SVCBANK;
+
FLUSHPIPE;
state->EndCondition = 0;