sim: always enable callback memory
authorMike Frysinger <vapier@gentoo.org>
Fri, 25 Dec 2015 05:23:50 +0000 (00:23 -0500)
committerMike Frysinger <vapier@gentoo.org>
Fri, 25 Dec 2015 05:28:07 +0000 (00:28 -0500)
We enable WITH_CALLBACK_MEMORY everywhere and don't provide a way to
turn it off, and no target does so.  Make it unconditional for all
to keep things simple.

sim/common/ChangeLog
sim/common/sim-config.h
sim/common/sim-core.c
sim/common/sim-n-core.h

index 0778130d42fecbd5f7858013cd5d6140a2576828..0a6cb159a61eaa6a45bb0c3846fe879bb2750118 100644 (file)
@@ -1,3 +1,10 @@
+2015-12-25  Mike Frysinger  <vapier@gentoo.org>
+
+       * sim-config.h (WITH_CALLBACK_MEMORY): Delete.
+       * sim-core.c (sim_core_write_buffer): Likewise.
+       * sim-n-core.h (sim_core_read_aligned_N): Likewise.
+       (sim_core_write_aligned_N): Likewise.
+
 2015-12-25  Mike Frysinger  <vapier@gentoo.org>
 
        * dv-pal.c: Include config.h and sim-main.h.
index d34ae88129fc26428ebee3153a35122947cd3e5d..599b84c09c80d47274de55336e9b04e8052b9205 100644 (file)
@@ -394,11 +394,6 @@ extern char *simulator_sysroot;
    x86) in eliminating a function call for the most common
    (raw_memory) case. */
 
-#ifndef WITH_CALLBACK_MEMORY
-#define WITH_CALLBACK_MEMORY           1
-#endif
-
-
 
 /* Alignment:
 
index 724a036fe70bb873ea83ea2bd9a67eeaf3ebae62..a5e3cdbb280a1baefdd3e5bb8df631be26f88253 100644 (file)
@@ -576,8 +576,7 @@ sim_core_write_buffer (SIM_DESC sd,
       if (mapping == NULL)
        break;
 #if (WITH_DEVICES)
-      if (WITH_CALLBACK_MEMORY
-         && mapping->device != NULL)
+      if (mapping->device != NULL)
        {
          int nr_bytes = len - count;
          sim_cia cia = cpu ? CPU_PC_GET (cpu) : NULL_CIA;
@@ -597,8 +596,7 @@ sim_core_write_buffer (SIM_DESC sd,
        }
 #endif
 #if (WITH_HW)
-      if (WITH_CALLBACK_MEMORY
-         && mapping->device != NULL)
+      if (mapping->device != NULL)
        {
          int nr_bytes = len - count;
          if (raddr + nr_bytes - 1 > mapping->bound)
index a8eebe27421934e1969996b949ea6e5e9f117741..f57e8f842131ab229479a13607f8c1ea5123fca1 100644 (file)
@@ -165,7 +165,7 @@ sim_core_read_aligned_N(sim_cpu *cpu,
   do
     {
 #if (WITH_DEVICES)
-      if (WITH_CALLBACK_MEMORY && mapping->device != NULL)
+      if (mapping->device != NULL)
        {
          unsigned_M data;
          if (device_io_read_buffer (mapping->device, &data, mapping->space, addr, N, CPU_STATE (cpu), cpu, cia) != N)
@@ -176,7 +176,7 @@ sim_core_read_aligned_N(sim_cpu *cpu,
        }
 #endif
 #if (WITH_HW)
-      if (WITH_CALLBACK_MEMORY && mapping->device != NULL)
+      if (mapping->device != NULL)
        {
          unsigned_M data;
          sim_cpu_hw_io_read_buffer (cpu, cia, mapping->device, &data, mapping->space, addr, N);
@@ -296,7 +296,7 @@ sim_core_write_aligned_N(sim_cpu *cpu,
   do
     {
 #if (WITH_DEVICES)
-      if (WITH_CALLBACK_MEMORY && mapping->device != NULL)
+      if (mapping->device != NULL)
        {
          unsigned_M data = H2T_M (val);
          if (device_io_write_buffer (mapping->device, &data, mapping->space, addr, N, CPU_STATE (cpu), cpu, cia) != N)
@@ -306,7 +306,7 @@ sim_core_write_aligned_N(sim_cpu *cpu,
        }
 #endif
 #if (WITH_HW)
-      if (WITH_CALLBACK_MEMORY && mapping->device != NULL)
+      if (mapping->device != NULL)
        {
          unsigned_M data = H2T_M (val);
          sim_cpu_hw_io_write_buffer (cpu, cia, mapping->device, &data, mapping->space, addr, N);