Add the operand encoding types for the new Armv8.2-a back-ported instructions. These...
[deliverable/binutils-gdb.git] / sim / common / sim-memopt.c
index 142f3a634dd33b956637ebaa144e58374fd83191..36ca853f1430ff260e36b17f6aa8564e7432e38d 100644 (file)
@@ -1,6 +1,5 @@
 /* Simulator memory option handling.
-   Copyright (C) 1996-1999, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 1996-2017 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
 This file is part of GDB, the GNU debugger.
@@ -18,7 +17,7 @@ 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, see <http://www.gnu.org/licenses/>.  */
 
-#include "cconfig.h"
+#include "config.h"
 
 #include "sim-main.h"
 #include "sim-assert.h"
@@ -184,7 +183,7 @@ do_memopt_add (SIM_DESC sd,
       if (mmap_next_fd >= 0)
        {
          /* Some kernels will SIGBUS the application if mmap'd file
-            is not large enough.  */ 
+            is not large enough.  */
          if (s.st_size < bytes)
            {
              sim_io_error (sd,
@@ -196,12 +195,12 @@ do_memopt_add (SIM_DESC sd,
          if (free_buffer == 0 || free_buffer == (char*)-1) /* MAP_FAILED */
            {
              sim_io_error (sd, "Error, cannot mmap file (%s).\n",
-                           strerror(errno));
+                           strerror (errno));
            }
        }
-#endif 
+#endif
 
-      /* Need heap allocation? */ 
+      /* Need heap allocation? */
       if (free_buffer == NULL)
        {
          /* If filling with non-zero value, do not use clearing allocator. */
@@ -283,7 +282,7 @@ do_memopt_delete (SIM_DESC sd,
        munmap ((*entry)->buffer, (*entry)->munmap_length);
       else
 #endif
-       zfree ((*entry)->buffer);
+       free ((*entry)->buffer);
     }
 
   /* delete it and its aliases */
@@ -294,7 +293,7 @@ do_memopt_delete (SIM_DESC sd,
       sim_memopt *dead = alias;
       alias = alias->alias;
       sim_core_detach (sd, NULL, dead->level, dead->space, dead->addr);
-      zfree (dead);
+      free (dead);
     }
   return SIM_RC_OK;
 }
@@ -385,7 +384,7 @@ memory_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt,
          parse_addr (arg, &level, &space, &addr);
          return do_memopt_delete (sd, level, space, addr);
        }
-    
+
     case OPTION_MEMORY_REGION:
       {
        char *chp = arg;
@@ -500,7 +499,7 @@ memory_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt,
        if (mmap_next_fd < 0)
          {
            sim_io_eprintf (sd, "Cannot open file `%s': %s\n",
-                           arg, strerror(errno));
+                           arg, strerror (errno));
            return SIM_RC_FAIL;
          }
 
@@ -630,7 +629,7 @@ sim_memory_uninstall (SIM_DESC sd)
            munmap ((*entry)->buffer, (*entry)->munmap_length);
          else
 #endif
-           zfree ((*entry)->buffer);
+           free ((*entry)->buffer);
        }
 
       /* delete it and its aliases */
@@ -644,7 +643,7 @@ sim_memory_uninstall (SIM_DESC sd)
          sim_memopt *dead = alias;
          alias = alias->alias;
          sim_core_detach (sd, NULL, dead->level, dead->space, dead->addr);
-         zfree (dead);
+         free (dead);
        }
     }
 }
This page took 0.024261 seconds and 4 git commands to generate.