]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/mips/m16run.c
sim: overhaul & unify endian settings management
[thirdparty/binutils-gdb.git] / sim / mips / m16run.c
index 8a5d6070cba2cfa631d99d9b0eb7d823b2dbff5e..a04e3eed3bf3868b4a24d8feec66020d9c611d53 100644 (file)
@@ -4,7 +4,7 @@
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
+    the Free Software Foundation; either version 3 of the License, or
     (at your option) any later version.
 
     This program is distributed in the hope that it will be useful,
     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, write to the Free Software
-    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+    along with this program; if not, see <http://www.gnu.org/licenses/>.
  
     */
 
+/* This must come before any other includes.  */
+#include "defs.h"
+
 #include "sim-main.h"
 #include "m16_idecode.h"
 #include "m32_idecode.h"
@@ -34,7 +36,7 @@ sim_engine_run (SIM_DESC sd,
                int siggnal) /* ignore */
 {
   sim_cpu *cpu = STATE_CPU (sd, next_cpu_nr);
-  address_word cia = CIA_GET (cpu);
+  address_word cia = CPU_PC_GET (cpu);
 
   while (1)
     {
@@ -65,9 +67,9 @@ sim_engine_run (SIM_DESC sd,
       /* process any events */
       if (sim_events_tick (sd))
         {
-          CIA_SET (CPU, cia);
+          CPU_PC_SET (CPU, cia);
           sim_events_process (sd);
-         cia = CIA_GET (CPU);
+         cia = CPU_PC_GET (CPU);
         }
 
     }