Add special case handling when GDB set CPSR register
authorNick Clifton <nickc@redhat.com>
Tue, 23 May 2000 23:52:46 +0000 (23:52 +0000)
committerNick Clifton <nickc@redhat.com>
Tue, 23 May 2000 23:52:46 +0000 (23:52 +0000)
sim/arm/ChangeLog
sim/arm/wrapper.c

index bb55ddd8f10bc6d8f2789db6050d1ab09cf68cf3..9649c3999b83ee50242da366277b8c3131d9da53 100644 (file)
@@ -1,3 +1,8 @@
+2000-05-23  Nick Clifton  <nickc@cygnus.com>
+
+       * wrapper.c (sim_store_register): Special handling for CPSR
+       register.
+
 2000-03-11  Philip Blundell  <philb@gnu.org>
 
        * armemu.c (LoadSMult, LoadMult): Correct handling of aborts.
index 8417f40938e0765e33523deb87b9276054c8f76f..003dec6d5940b26e475bf59b12c39b70f636d1a3 100644 (file)
@@ -320,7 +320,13 @@ sim_store_register (sd, rn, memory, length)
      int length ATTRIBUTE_UNUSED;
 {
   init ();
-  ARMul_SetReg (state, state->Mode, rn, frommem (state, memory));
+  if (rn == 25)
+    {
+      state->Cpsr = frommem (state, memory);
+      ARMul_CPSRAltered (state);            
+    }
+  else
+    ARMul_SetReg (state, state->Mode, rn, frommem (state, memory));
   return -1;
 }