diff options
author | David Carlton <carlton@bactrian.org> | 2004-01-26 19:11:55 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2004-01-26 19:11:55 +0000 |
commit | 02f7156281e8b99504f335f55b29aa6ae307488b (patch) | |
tree | 83f502bee114165d0ca14a4ac612c2d8ae172e13 /sim/common/sim-core.c | |
parent | fcc929ef86456cb1cda90b1391209eed2446943d (diff) | |
download | gdb-cvs/carlton_dictionary-branch.tar.gz |
2004-01-26 David Carlton <carlton@kealia.com>cvs/carlton_dictionary-branchcarlton_dictionary-branch
* Merge with mainline; tag is carlton_dictionary-20040126-merge.
Diffstat (limited to 'sim/common/sim-core.c')
-rw-r--r-- | sim/common/sim-core.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sim/common/sim-core.c b/sim/common/sim-core.c index 586c25e4fa7..65c28d733b1 100644 --- a/sim/common/sim-core.c +++ b/sim/common/sim-core.c @@ -801,6 +801,25 @@ sim_core_xor_write_buffer (SIM_DESC sd, } #endif +#if EXTERN_SIM_CORE_P +void * +sim_core_trans_addr (SIM_DESC sd, + sim_cpu *cpu, + unsigned map, + address_word addr) +{ + sim_core_common *core = (cpu == NULL ? &STATE_CORE (sd)->common : &CPU_CORE (cpu)->common); + sim_core_mapping *mapping = + sim_core_find_mapping (core, map, + addr, /*nr-bytes*/1, + write_transfer, + 0 /*dont-abort*/, NULL, NULL_CIA); + if (mapping == NULL) + return NULL; + return sim_core_translate(mapping, addr); +} +#endif + /* define the read/write 1/2/4/8/16/word functions */ |