aboutsummaryrefslogtreecommitdiff
path: root/sim/tic80/sim-calls.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1997-04-29 08:41:15 +0000
committerAndrew Cagney <cagney@redhat.com>1997-04-29 08:41:15 +0000
commitd5e2c74e384a36eee9c317b736118b36395813fb (patch)
tree2ae8e2d5afe8deaa3a5aa1412e56df8a960c0c62 /sim/tic80/sim-calls.c
parentc889a1eb873d3e87d2fe38b83c7d27a2915eb792 (diff)
downloadgdb-d5e2c74e384a36eee9c317b736118b36395813fb.zip
gdb-d5e2c74e384a36eee9c317b736118b36395813fb.tar.gz
gdb-d5e2c74e384a36eee9c317b736118b36395813fb.tar.bz2
Numerous fixes.
Diffstat (limited to 'sim/tic80/sim-calls.c')
-rw-r--r--sim/tic80/sim-calls.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sim/tic80/sim-calls.c b/sim/tic80/sim-calls.c
index b86c826..83d1948 100644
--- a/sim/tic80/sim-calls.c
+++ b/sim/tic80/sim-calls.c
@@ -85,11 +85,18 @@ sim_open (SIM_OPEN_KIND kind, char **argv)
engine_init(&simulation);
+#define TIC80_MEM_START 0x2000000
+#define TIC80_MEM_SIZE 0x100000
+
/* external memory */
sim_core_attach(&simulation,
attach_raw_memory,
access_read_write_exec,
- 0, 0x2000000, 0x100000, NULL, NULL);
+ 0, TIC80_MEM_START, TIC80_MEM_SIZE, NULL, NULL);
+ sim_core_attach(&simulation,
+ attach_raw_memory,
+ access_read_write_exec,
+ 0, 0, TIC80_MEM_SIZE, NULL, NULL);
/* FIXME: for now */
return (SIM_DESC) &simulation;
@@ -216,6 +223,7 @@ sim_create_inferior (SIM_DESC sd,
STATE_CPU (sd, 0)->cia.ip = STATE_START_ADDR(sd);
STATE_CPU (sd, 0)->cia.dp = (STATE_START_ADDR(sd)
+ sizeof (instruction_word));
+ STATE_CPU (sd, 0)->reg[1] = TIC80_MEM_START + TIC80_MEM_SIZE - 16;
return SIM_RC_OK;
}