aboutsummaryrefslogtreecommitdiff
path: root/sim/mcore/interp.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-04-16 02:11:12 -0400
committerMike Frysinger <vapier@gentoo.org>2015-04-17 02:44:30 -0400
commit034685f9ce92cf6dfb6656745365b6a5904a8e84 (patch)
treec4b591263048d0a9d89af68c9abd8e69786ed2f7 /sim/mcore/interp.c
parent27b97b40bca216097d16d53fa9408a70cd281479 (diff)
downloadfsf-binutils-gdb-034685f9ce92cf6dfb6656745365b6a5904a8e84.zip
fsf-binutils-gdb-034685f9ce92cf6dfb6656745365b6a5904a8e84.tar.gz
fsf-binutils-gdb-034685f9ce92cf6dfb6656745365b6a5904a8e84.tar.bz2
sim: replace CIA_{GET,SET} with CPU_PC_{GET,SET}
The CIA_{GET,SET} macros serve the same function as CPU_PC_{GET,SET} except the latter adds a layer of indirection via the sim state. This lets models set up different functions at runtime and doesn't reach so directly into the arch-specific cpu state. It also doesn't make sense to have two sets of macros that do exactly the same thing, so lets standardize on the one that gets us more.
Diffstat (limited to 'sim/mcore/interp.c')
-rw-r--r--sim/mcore/interp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c
index fc1131b..54d628c 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;