sim: dv-pal: always use CPU_INDEX
authorMike Frysinger <vapier@gentoo.org>
Fri, 25 Dec 2015 05:09:48 +0000 (00:09 -0500)
committerMike Frysinger <vapier@gentoo.org>
Fri, 25 Dec 2015 05:13:43 +0000 (00:13 -0500)
Since the core always provides CPU_INDEX, use it.  The current code
doesn't actually use it even though it should since it doesn't include
the right headers.

sim/common/ChangeLog
sim/common/dv-pal.c

index 857485c674c22f0ac88ad428e2e83d5ed0635ced..0778130d42fecbd5f7858013cd5d6140a2576828 100644 (file)
@@ -1,3 +1,8 @@
+2015-12-25  Mike Frysinger  <vapier@gentoo.org>
+
+       * dv-pal.c: Include config.h and sim-main.h.
+       (hw_pal_io_read_buffer): Always call CPU_INDEX.
+
 2015-12-24  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-options.c (standard_options): Always enable load-lma and
index 97f01c8c0d4bf3b3b1a636f33382ad360de6f15e..d564e3ebc738f4cec9e0f81e87b3f40344dec173 100644 (file)
@@ -19,7 +19,8 @@
    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 "config.h"
+#include "sim-main.h"
 #include "hw-main.h"
 #include "sim-io.h"
 
@@ -349,11 +350,7 @@ hw_pal_io_read_buffer (struct hw *me,
     {
 
     case hw_pal_cpu_nr_register:
-#ifdef CPU_INDEX
       *byte = CPU_INDEX (hw_system_cpu (me));
-#else
-      *byte = 0;
-#endif
       HW_TRACE ((me, "read - cpu-nr %d\n", *byte));
       break;
 
This page took 0.026839 seconds and 4 git commands to generate.