sim: drop configure scripts for simple ports
[binutils-gdb.git] / sim / lm32 / dv-lm32cpu.c
index 7087f0b133f1b4feb9eb15614950d4371e1f7551..2f702bd72295383332dc0de22fd2031555d24d4f 100644 (file)
@@ -1,7 +1,7 @@
 /*  Lattice Mico32 CPU model.
     Contributed by Jon Beniston <jon@beniston.com>
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -18,6 +18,9 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+/* This must come before any other includes.  */
+#include "defs.h"
+
 #include "hw-main.h"
 #include "sim-main.h"
 
@@ -137,7 +140,7 @@ deliver_lm32cpu_interrupt (struct hw *me, void *data)
   struct lm32cpu *controller = hw_data (me);
   SIM_DESC sd = hw_system (me);
   sim_cpu *cpu = STATE_CPU (sd, 0);    /* NB: fix CPU 0.  */
-  address_word cia = CIA_GET (cpu);
+  address_word cia = CPU_PC_GET (cpu);
   int interrupt = (int) data;
 
 
@@ -192,7 +195,7 @@ lm32cpu_port_event (struct hw *me,
   struct lm32cpu *controller = hw_data (me);
   SIM_DESC sd = hw_system (me);
   sim_cpu *cpu = STATE_CPU (sd, 0);    /* NB: fix CPU 0.  */
-  address_word cia = CIA_GET (cpu);
+  address_word cia = CPU_PC_GET (cpu);
 
 
   HW_TRACE ((me, "interrupt event on port %d, level %d", my_port, level));