summaryrefslogtreecommitdiff
path: root/sim/mcore
diff options
context:
space:
mode:
Diffstat (limited to 'sim/mcore')
-rw-r--r--sim/mcore/ChangeLog8
-rw-r--r--sim/mcore/interp.c8
-rw-r--r--sim/mcore/sim-main.h3
3 files changed, 12 insertions, 7 deletions
diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog
index a00954ceb94..89f17d8a37e 100644
--- a/sim/mcore/ChangeLog
+++ b/sim/mcore/ChangeLog
@@ -1,3 +1,11 @@
+2015-04-17 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (set_initial_gprs): Change CIA_SET to CPU_PC_SET.
+ (sim_resume): Change CIA_GET to CPU_PC_GET and CIA_SET to
+ CPU_PC_SET.
+ (sim_create_inferior): Change CIA_SET to CPU_PC_SET.
+ * sim-main.h (CIA_GET, CIA_SET): Delete.
+
2015-04-16 Mike Frysinger <vapier@gentoo.org>
* interp.c (mcore_pc_get, mcore_pc_set): New functions.
diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c
index fc1131bdda8..54d628c27da 100644
--- a/sim/mcore/interp.c
+++ b/sim/mcore/interp.c
@@ -397,7 +397,7 @@ set_initial_gprs (SIM_CPU *scpu)
init_pointers ();
/* Set up machine just out of reset. */
- CIA_SET (scpu, 0);
+ CPU_PC_SET (scpu, 0);
cpu.sr = 0;
memsize = cpu.asregs.msize / (1024 * 1024);
@@ -716,7 +716,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
word WLhash;
cpu.asregs.exception = step ? SIGTRAP: 0;
- pc = CIA_GET (scpu);
+ pc = CPU_PC_GET (scpu);
/* Fetch the initial instructions that we'll decode. */
ibuf = rlat (pc & 0xFFFFFFFC);
@@ -1648,7 +1648,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
while (!cpu.asregs.exception);
/* Hide away the things we've cached while executing. */
- CIA_SET (scpu, pc);
+ CPU_PC_SET (scpu, pc);
cpu.asregs.insts += insts; /* instructions done ... */
cpu.asregs.cycles += insts; /* and each takes a cycle */
cpu.asregs.cycles += bonus_cycles; /* and extra cycles for branches */
@@ -1905,7 +1905,7 @@ sim_create_inferior (SIM_DESC sd, struct bfd *prog_bfd, char **argv, char **env)
issue_messages = l;
hi_stack = cpu.asregs.msize - 4;
- CIA_SET (scpu, bfd_get_start_address (prog_bfd));
+ CPU_PC_SET (scpu, bfd_get_start_address (prog_bfd));
/* Calculate the argument and environment strings. */
s_length = 0;
diff --git a/sim/mcore/sim-main.h b/sim/mcore/sim-main.h
index 80b467a1172..f7000593fe9 100644
--- a/sim/mcore/sim-main.h
+++ b/sim/mcore/sim-main.h
@@ -30,9 +30,6 @@ typedef struct _sim_cpu SIM_CPU;
#include "sim-base.h"
#include "bfd.h"
-#define CIA_GET(cpu) (cpu)->pc
-#define CIA_SET(cpu,val) (cpu)->pc = (val)
-
struct _sim_cpu {
word pc;