daily update
[external/binutils.git] / sim / arm / armvirt.c
index ce1e77d..969085d 100644 (file)
@@ -13,7 +13,7 @@
  
     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. */
+    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
 
 /* This file contains a complete ARMulator memory model, modelling a
 "virtual memory" system. A much simpler model can be found in armfast.c,
@@ -64,7 +64,8 @@ GetWord (ARMul_State * state, ARMword address, int check)
   ARMword **pagetable;
   ARMword *pageptr;
 
-  XScale_check_memacc (state, &address, 0);
+  if (check && state->is_XScale)
+    XScale_check_memacc (state, &address, 0);
 
   page = address >> PAGEBITS;
   offset = (address & OFFSETBITS) >> 2;
@@ -99,7 +100,8 @@ PutWord (ARMul_State * state, ARMword address, ARMword data, int check)
   ARMword **pagetable;
   ARMword *pageptr;
 
-  XScale_check_memacc (state, &address, 1);
+  if (check && state->is_XScale)
+    XScale_check_memacc (state, &address, 1);
 
   page = address >> PAGEBITS;
   offset = (address & OFFSETBITS) >> 2;
@@ -137,7 +139,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;