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.
This commit is contained in:
Mike Frysinger
2015-04-16 02:11:12 -04:00
parent 27b97b40bc
commit 034685f9ce
64 changed files with 184 additions and 116 deletions

View File

@@ -531,7 +531,7 @@ sim_core_read_buffer (SIM_DESC sd,
if (mapping->device != NULL)
{
int nr_bytes = len - count;
sim_cia cia = cpu ? CIA_GET (cpu) : NULL_CIA;
sim_cia cia = cpu ? CPU_PC_GET (cpu) : NULL_CIA;
if (raddr + nr_bytes - 1> mapping->bound)
nr_bytes = mapping->bound - raddr + 1;
if (device_io_read_buffer (mapping->device,
@@ -598,7 +598,7 @@ sim_core_write_buffer (SIM_DESC sd,
&& mapping->device != NULL)
{
int nr_bytes = len - count;
sim_cia cia = cpu ? CIA_GET (cpu) : NULL_CIA;
sim_cia cia = cpu ? CPU_PC_GET (cpu) : NULL_CIA;
if (raddr + nr_bytes - 1 > mapping->bound)
nr_bytes = mapping->bound - raddr + 1;
if (device_io_write_buffer (mapping->device,