aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-core.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2003-12-19 11:44:01 +0000
committerNick Clifton <nickc@redhat.com>2003-12-19 11:44:01 +0000
commit6edf0760c5c65c9f0582c5d8036bfa058f2cd6c2 (patch)
tree475a1c15199a9a645d40a11faddc392816d6e35c /sim/common/sim-core.c
parentc4bf77942dea9cad22426964bf32c46cbc443705 (diff)
downloadbinutils-6edf0760c5c65c9f0582c5d8036bfa058f2cd6c2.zip
binutils-6edf0760c5c65c9f0582c5d8036bfa058f2cd6c2.tar.gz
binutils-6edf0760c5c65c9f0582c5d8036bfa058f2cd6c2.tar.bz2
Add support for m32r-linux target, including a RELA ABI and PIC.
Diffstat (limited to 'sim/common/sim-core.c')
-rw-r--r--sim/common/sim-core.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sim/common/sim-core.c b/sim/common/sim-core.c
index 586c25e..65c28d7 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 */