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]

ARM sim: alias SYSTEMBANK to USERBANK


There is a possibility that SYSTEMBANK would not be properly converted
to USERBANK in certain cases.  Let's make sure this doesn't happen.
I'm checking this in, approved by Nick Clifton.

Index: sim/arm/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* armdefs.h (SYSTEMBANK): Define as USERBANK.
	* armsupp.c (ARMul_SwitchMode): Remove SYSTEMBANK cases.

Index: sim/arm/armdefs.h
===================================================================
RCS file: /cvs/src/src/sim/arm/armdefs.h,v
retrieving revision 1.3
diff -u -r1.3 armdefs.h
--- sim/arm/armdefs.h	2000/05/30 17:13:37	1.3
+++ sim/arm/armdefs.h	2000/07/04 05:13:21
@@ -226,7 +226,7 @@
 #define ABORTBANK 4
 #define UNDEFBANK 5
 #define DUMMYBANK 6
-#define SYSTEMBANK 7
+#define SYSTEMBANK USERBANK
 
 #define BANK_CAN_ACCESS_SPSR(bank)  \
   ((bank) != USERBANK && (bank) != SYSTEMBANK && (bank) != DUMMYBANK)
Index: sim/arm/armsupp.c
===================================================================
RCS file: /cvs/src/src/sim/arm/armsupp.c,v
retrieving revision 1.3
diff -u -r1.3 armsupp.c
--- sim/arm/armsupp.c	2000/05/30 17:13:37	1.3
+++ sim/arm/armsupp.c	2000/07/04 05:13:21
@@ -369,10 +369,6 @@
     {				/* really need to do it */
       switch (oldbank)
 	{			/* save away the old registers */
-	case SYSTEMBANK:
-	  /* The System mode uses the USER bank.  */
-	  oldbank = USERBANK;
-	  /* Fall through.  */
 	case USERBANK:
 	case IRQBANK:
 	case SVCBANK:
@@ -398,9 +394,6 @@
       
       switch (newbank)
 	{			/* restore the new registers */
-	case SYSTEMBANK:
-	  newbank = USERBANK;
-	  /* Fall through.  */
 	case USERBANK:
 	case IRQBANK:
 	case SVCBANK:

-- 
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]