Fixes for gdb.xml/tdesc-regs.exp.
[deliverable/binutils-gdb.git] / sim / arm / armvirt.c
index 26fd905ac3685fd8184be4aaa1587ac07836ec11..4f95ed838f6854a8061b60273b0f3e3145d2d8af 100644 (file)
@@ -1,29 +1,27 @@
 /*  armvirt.c -- ARMulator virtual memory interace:  ARM6 Instruction Emulator.
     Copyright (C) 1994 Advanced RISC Machines Ltd.
+
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
+    the Free Software Foundation; either version 3 of the License, or
     (at your option) any later version.
+
     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.
+
     You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+    along with this program; if not, see <http://www.gnu.org/licenses/>. */
 
 /* This file contains a complete ARMulator memory model, modelling a
-"virtual memory" system. A much simpler model can be found in armfast.c,
-and that model goes faster too, but has a fixed amount of memory. This
-model's memory has 64K pages, allocated on demand from a 64K entry page
-table. The routines PutWord and GetWord implement this. Pages are never
-freed as they might be needed again. A single area of memory may be
-defined to generate aborts. */
-
-#include "armopts.h"
+   "virtual memory" system. A much simpler model can be found in armfast.c,
+   and that model goes faster too, but has a fixed amount of memory. This
+   model's memory has 64K pages, allocated on demand from a 64K entry page
+   table. The routines PutWord and GetWord implement this. Pages are never
+   freed as they might be needed again. A single area of memory may be
+   defined to generate aborts.  */
+
 #include "armos.h"
 #include "armdefs.h"
 #include "ansidecl.h"
@@ -64,7 +62,7 @@ GetWord (ARMul_State * state, ARMword address, int check)
   ARMword **pagetable;
   ARMword *pageptr;
 
-  if (check)
+  if (check && state->is_XScale)
     XScale_check_memacc (state, &address, 0);
 
   page = address >> PAGEBITS;
@@ -100,7 +98,7 @@ PutWord (ARMul_State * state, ARMword address, ARMword data, int check)
   ARMword **pagetable;
   ARMword *pageptr;
 
-  if (check)
+  if (check && state->is_XScale)
     XScale_check_memacc (state, &address, 1);
 
   page = address >> PAGEBITS;
@@ -139,7 +137,7 @@ ARMul_MemoryInit (ARMul_State * state, unsigned long initmemsize)
   if (initmemsize)
     state->MemSize = initmemsize;
 
-  pagetable = (ARMword **) malloc (sizeof (ARMword) * NUMPAGES);
+  pagetable = (ARMword **) malloc (sizeof (ARMword *) * NUMPAGES);
 
   if (pagetable == NULL)
     return FALSE;
@@ -218,13 +216,6 @@ ARMword ARMul_LoadInstrS (ARMul_State * state, ARMword address, ARMword isize)
 {
   state->NumScycles++;
 
-#ifdef HOURGLASS
-  if ((state->NumScycles & HOURGLASS_RATE) == 0)
-    {
-      HOURGLASS;
-    }
-#endif
-
   return ARMul_ReLoadInstr (state, address, isize);
 }
 
This page took 0.024737 seconds and 4 git commands to generate.