diff --git a/sim/tic80/ChangeLog b/sim/tic80/ChangeLog index ba68c04b4b..5b92c84bc7 100644 --- a/sim/tic80/ChangeLog +++ b/sim/tic80/ChangeLog @@ -1,3 +1,8 @@ +Fri Aug 8 21:52:27 1997 Mark Alexander + + * sim-calls.c (sim_store_register): Allow accumulators + other than A0 to be modified. Correct error message. + Thu May 29 14:02:40 1997 Andrew Cagney * misc.c (tic80_trace_fpu3, tic80_trace_fpu2, tic80_trace_fpu1, diff --git a/sim/tic80/sim-calls.c b/sim/tic80/sim-calls.c index db1558e86c..8f609ee584 100644 --- a/sim/tic80/sim-calls.c +++ b/sim/tic80/sim-calls.c @@ -202,10 +202,10 @@ sim_store_register (SIM_DESC sd, int regnr, unsigned char *buf) STATE_CPU (sd, 0)->cia.ip = T2H_4 (*(unsigned32*)buf); else if (regnr == NPC_REGNUM) STATE_CPU (sd, 0)->cia.dp = T2H_4 (*(unsigned32*)buf); - else if (regnr == A0_REGNUM && regnr <= An_REGNUM) + else if (regnr >= A0_REGNUM && regnr <= An_REGNUM) STATE_CPU (sd, 0)->acc[regnr - A0_REGNUM] = T2H_8 (*(unsigned64*)buf); else - sim_io_error (sd, "sim_fetch_register - unknown register nr %d", regnr); + sim_io_error (sd, "sim_store_register - unknown register nr %d", regnr); return; }