This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ARM sim: ldm may switch to/from Thumb mode too


I'm checking this in, approved by Nick Clifton:

Index: sim/arm/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>
	* armemu.c (LoadSMult): Use WriteR15() to discard the least
	significant bits of PC.

Index: sim/arm/armemu.c
===================================================================
RCS file: /cvs/src/src/sim/arm/armemu.c,v
retrieving revision 1.9
diff -u -r1.9 armemu.c
--- sim/arm/armemu.c	2000/07/04 06:35:36	1.9
+++ sim/arm/armemu.c	2000/07/04 06:36:33
@@ -3544,7 +3544,7 @@
 	  state->Cpsr = GETSPSR (state->Bank);
 	  ARMul_CPSRAltered (state);
 	}
-      state->Reg[15] = PC;
+      WriteR15 (state, PC);
 #else
       if (state->Mode == USER26MODE || state->Mode == USER32MODE)
 	{			/* protect bits in user mode */
@@ -3555,8 +3555,8 @@
 	}
       else
 	ARMul_R15Altered (state);
-#endif
       FLUSHPIPE;
+#endif
     }
 
   if (!BIT (15) && state->Mode != USER26MODE && state->Mode != USER32MODE)

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]