aboutsummaryrefslogtreecommitdiff
path: root/sim/d10v
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-10-22 05:26:27 +0000
committerAndrew Cagney <cagney@redhat.com>1997-10-22 05:26:27 +0000
commit9e03a68f136a021e7bfa9afb18ca4f170e949f80 (patch)
tree78c37915fae5528e6e3cba233bbecbd7c368fa39 /sim/d10v
parent2328ef1c9815f27863ca176608f87cd4c2ba3665 (diff)
downloadfsf-binutils-gdb-9e03a68f136a021e7bfa9afb18ca4f170e949f80.zip
fsf-binutils-gdb-9e03a68f136a021e7bfa9afb18ca4f170e949f80.tar.gz
fsf-binutils-gdb-9e03a68f136a021e7bfa9afb18ca4f170e949f80.tar.bz2
Add LMA_P and DO_WRITE arguments to sim/common/sim-load.c:sim_load_file().
Update all simulators. Clarify behavour of sim_load in remote-sim.h
Diffstat (limited to 'sim/d10v')
-rw-r--r--sim/d10v/ChangeLog8
-rw-r--r--sim/d10v/interp.c23
2 files changed, 29 insertions, 2 deletions
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
index 3ee29c9..bee6a0c 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -1,3 +1,11 @@
+Wed Oct 22 14:43:00 1997 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * interp.c (sim_write_phys): New function, write to physical
+ instead of virtual memory.
+
+ * wrapper.c (sim_load): Pass lma_p and sim_write_phys to
+ sim_load_file.
+
Mon Oct 13 10:55:07 1997 Fred Fish <cygnus.com>
* simops.c (OP_6A01): Change OP_POSTDEC to OP_POSTINC and move
diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c
index 5dfb100..76bb438 100644
--- a/sim/d10v/interp.c
+++ b/sim/d10v/interp.c
@@ -432,6 +432,16 @@ xfer_mem (addr, buffer, size, write)
}
+static int
+sim_write_phys (sd, addr, buffer, size)
+ SIM_DESC sd;
+ SIM_ADDR addr;
+ unsigned char *buffer;
+ int size;
+{
+ return xfer_mem( addr, buffer, size, 1);
+}
+
int
sim_write (sd, addr, buffer, size)
SIM_DESC sd;
@@ -439,6 +449,7 @@ sim_write (sd, addr, buffer, size)
unsigned char *buffer;
int size;
{
+ /* FIXME: this should be performing a virtual transfer */
return xfer_mem( addr, buffer, size, 1);
}
@@ -449,6 +460,7 @@ sim_read (sd, addr, buffer, size)
unsigned char *buffer;
int size;
{
+ /* FIXME: this should be performing a virtual transfer */
return xfer_mem( addr, buffer, size, 0);
}
@@ -600,6 +612,9 @@ pc_addr()
return 0;
}
+ /* Discard upper bit(s) of PC in case IMAP1 selects unified memory. */
+ pc &= (1 << UMEM_SIZE) - 1;
+
return State.umem[imap & 0xff] + pc;
}
@@ -664,7 +679,10 @@ sim_resume (sd, step, siggnal)
{
RPT_C -= 1;
if (RPT_C == 0)
- State.RP = 0;
+ {
+ State.RP = 0;
+ PC++;
+ }
else
PC = RPT_S;
}
@@ -926,7 +944,8 @@ sim_load (sd, prog, abfd, from_tty)
if (prog_bfd != NULL && prog_bfd_was_opened_p)
bfd_close (prog_bfd);
prog_bfd = sim_load_file (sd, myname, d10v_callback, prog, abfd,
- sim_kind == SIM_OPEN_DEBUG);
+ sim_kind == SIM_OPEN_DEBUG,
+ 0, sim_write_phys);
if (prog_bfd == NULL)
return SIM_RC_FAIL;
prog_bfd_was_opened_p = abfd == NULL;