]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Detect installation of SWI vector by running program as well as loading program.
authorNick Clifton <nickc@redhat.com>
Thu, 1 Feb 2001 00:14:40 +0000 (00:14 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 1 Feb 2001 00:14:40 +0000 (00:14 +0000)
sim/arm/ChangeLog
sim/arm/armos.c
sim/arm/armos.h
sim/arm/armvirt.c
sim/arm/wrapper.c

index 9180bd5672c891f1e97f660c1835a34e83f5bd28..b4ffb90e991d3352582e6978fdf0e4c76c2834a2 100644 (file)
@@ -1,3 +1,12 @@
+2001-01-31  Nick Clifton  <nickc@redhat.com>
+
+       * armvirt.c (PutWord): Detect installation of SWI vector.
+       (SWI_vector_installed): Define.
+       * armos.c (ARMul_OsInit): Reset SWI_vector_installed.
+       * armos.h (SWI_vector_installed): Declare.
+       * wrapper.c (SWI_vector_installed): Remove definition.
+       (sim_write): Remove check of SWI vector installation
+
 2000-12-18  Nick Clifton  <nickc@redhat.com>
 
        * armemu.c (ARMul_Emulate26): Fix test for StoreDouble
index dd0ce23ecd59e33a5e56cc1bb0806a169ff1ea25..789a35d7153193604f2dc6b10c31583478c7df09 100644 (file)
@@ -171,6 +171,8 @@ ARMul_OSInit (ARMul_State * state)
   for (i = ARMul_ResetV; i <= ARMFIQV; i += 4)
     ARMul_WriteWord (state, i, instr); /* write hardware vectors */
   
+  SWI_vector_installed = 0;
+
   for (i = ARMul_ResetV; i <= ARMFIQV + 4; i += 4)
     {
       ARMul_WriteWord (state, ADDRSOFTVECTORS + i, SOFTVECTORCODE + i * 4);
@@ -628,8 +630,6 @@ ARMul_OSHandleSWI (ARMul_State * state, ARMword number)
     default:
       {
        /* If there is a SWI vector installed use it.  */
-       extern int SWI_vector_installed;
-
        if (state->is_XScale && saved_number != -1)
          number = saved_number;
            
index 1010b4f8d151bb7f9e55fb4afdd03e62243b1323..d943735d33ebfce591fcc66100063f40c1cb5313 100644 (file)
@@ -93,3 +93,5 @@
 
 extern unsigned long fpecode[];
 extern unsigned long fpesize;
+
+extern int SWI_vector_installed;
index f9ac453a36306ed49a857056434e04681d95be63..b9a018b997a2e61da7a48228eb816a38971d2473 100644 (file)
@@ -49,6 +49,8 @@ defined to generate aborts. */
 #define PAGEBITS 16
 #define OFFSETBITS 0xffff
 
+int SWI_vector_installed = FALSE;
+
 /***************************************************************************\
 *        Get a Word from Virtual Memory, maybe allocating the page          *
 \***************************************************************************/
@@ -111,6 +113,9 @@ PutWord (ARMul_State * state, ARMword address, ARMword data)
       *(pagetable + page) = pageptr;
     }
 
+  if (address == 0x8)
+    SWI_vector_installed = TRUE;
+
   *(pageptr + offset) = data;
 }
 
index f6c4b05c6e6d38270adf97a295e99226a947ac1a..f2e582364e748868b7d3a1b0e15926f4026c4af4 100644 (file)
@@ -114,8 +114,6 @@ ARMul_Debug (ARMul_State * state ATTRIBUTE_UNUSED, ARMword pc ATTRIBUTE_UNUSED,
   return 0;
 }
 
-int SWI_vector_installed = FALSE;
-
 int
 sim_write (sd, addr, buffer, size)
      SIM_DESC sd ATTRIBUTE_UNUSED;
@@ -127,9 +125,6 @@ sim_write (sd, addr, buffer, size)
 
   init ();
 
-  if ((addr <= 0x8) && ((addr + size) >= 0x8))
-    SWI_vector_installed = TRUE;
-
   for (i = 0; i < size; i++)
     ARMul_WriteByte (state, addr + i, buffer[i]);