diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-04-16 02:07:33 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-04-16 02:13:50 -0400 |
commit | 4c0cab1e212bd0f25879b00393bbb60e114ac724 (patch) | |
tree | a4018b90256be14afda4bd7669b03a108a6af772 /sim/mcore/interp.c | |
parent | 04be4e9eda6742d82fced4a3fc88b01f6cadc183 (diff) | |
download | fsf-binutils-gdb-4c0cab1e212bd0f25879b00393bbb60e114ac724.zip fsf-binutils-gdb-4c0cab1e212bd0f25879b00393bbb60e114ac724.tar.gz fsf-binutils-gdb-4c0cab1e212bd0f25879b00393bbb60e114ac724.tar.bz2 |
sim: avr/mcore/moxie: fill out sim-cpu pc fetch/store helpers
This makes the common sim-cpu logic work.
Diffstat (limited to 'sim/mcore/interp.c')
-rw-r--r-- | sim/mcore/interp.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sim/mcore/interp.c b/sim/mcore/interp.c index b99988c..fc1131b 100644 --- a/sim/mcore/interp.c +++ b/sim/mcore/interp.c @@ -1779,6 +1779,18 @@ sim_info (SIM_DESC sd, int verbose) #endif } +static sim_cia +mcore_pc_get (sim_cpu *cpu) +{ + return cpu->pc; +} + +static void +mcore_pc_set (sim_cpu *cpu, sim_cia pc) +{ + cpu->pc = pc; +} + static void free_state (SIM_DESC sd) { @@ -1856,6 +1868,10 @@ sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char **argv) for (i = 0; i < MAX_NR_PROCESSORS; ++i) { SIM_CPU *cpu = STATE_CPU (sd, i); + + CPU_PC_FETCH (cpu) = mcore_pc_get; + CPU_PC_STORE (cpu) = mcore_pc_set; + set_initial_gprs (cpu); /* Reset the GPR registers. */ } |