aboutsummaryrefslogtreecommitdiff
path: root/sim/d10v/interp.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-05-28 15:49:52 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2002-05-28 15:49:52 +0000
commit1aa5e64f43701efe72b2701463a58ff84f48df74 (patch)
tree07adf3d8646d2f415f05d441bc417b2bc3f88d4e /sim/d10v/interp.c
parent697f244d5b0b161224f7a84abb7bb59fd798afd5 (diff)
downloadgdb-1aa5e64f43701efe72b2701463a58ff84f48df74.zip
gdb-1aa5e64f43701efe72b2701463a58ff84f48df74.tar.gz
gdb-1aa5e64f43701efe72b2701463a58ff84f48df74.tar.bz2
2002-05-28 Elena Zannoni <ezannoni@redhat.com>
* interp.c (sim_create_inferior): Add comment. From Alan Matsuoka <alanm@redhat.com>: From 2001-04-27 Jason Eckhardt <jle@cygnus.com>: * simops.c (OP_4400): Output "mvf0f" instead of "mf0f". (OP_4401): Output "mvf0t" instead of "mf0t". (OP_460B): Do not output a flag register. (OP_4609): Do not output a flag register.
Diffstat (limited to 'sim/d10v/interp.c')
-rw-r--r--sim/d10v/interp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c
index 338305c..0b02d8a 100644
--- a/sim/d10v/interp.c
+++ b/sim/d10v/interp.c
@@ -1202,6 +1202,14 @@ sim_create_inferior (sd, abfd, argv, env)
/* reset all state information */
memset (&State.regs, 0, (int)&State.mem - (int)&State.regs);
+ /* There was a hack here to copy the values of argc and argv into r0
+ and r1. The values were also saved into some high memory that
+ won't be overwritten by the stack (0x7C00). The reason for doing
+ this was to allow the 'run' program to accept arguments. Without
+ the hack, this is not possible anymore. If the simulator is run
+ from the debugger, arguments cannot be passed in, so this makes
+ no difference. */
+
/* set PC */
if (abfd != NULL)
start_address = bfd_get_start_address (abfd);