Add file sim-hload.c - generic load for hardware only simulators.
Review each simulators sim_open, sim_load, sim_create_inferior so that
they more closely match required behavour.
that image properties such as endianness can be checked.
More strongly document the expected behavour of each of the sim_*
interfaces.
Add default endian argument to simulator config macro
SIM_AC_OPTION_ENDIAN. Use in sim_config.
o Provide poll_quit callback to simulators
so that they can poll for SIGINT on
clueless OS's.
o Add sim_stop to simulators so that clients
can request a halt (eg gdbtk's STOP button)
Works for PPC!
o Re-arange remote-sim.c so that the
hard work is moved from gdbsim_resume()
to gdbsim_wait() (where it should be).
* d10v_sim.h (exec_bfd): Rename to prog_bfd.
* interp.c: #include bfd.h.
(myname, sim_kind, start_address): New static locals.
(prog_bfd_was_opened_p, prog_bfd): New static locals.
(decode_pc): Update to use prog_bfd.
(sim_open): Set sim_kind, myname. Ignore -E arg.
(sim_close): Close prog_bfd if simulator opened it.
(sim_create_inferior): Return SIM_RC. Delete arg start_address.
(sim_load): Return SIM_RC. New arg abfd. Set start address from bfd.
Call sim_load_file to load file into simulator.
* simops.c (trace_input_func): exec_bfd renamed to prog_bfd.
* interp.c (sim_size): Now allocates unified memory for imap segments
0,1,2, and 127. Initializes imap0 and imap1 to 0x1000. Initializes dmap to 0.
(sim_write): Just call xfer_mem().
(sim_read): Just call xfer_mem().
(xfer_mem): New function. Does appropriate memory mapping and copies bytes.
(dmem_addr): New function. Reads dmap register and translates data
addresses to local addresses.
(pc_addr): New function. Reads imap register and computes local address
corresponding to contents of the PC.
(sim_resume): Change to use pc_addr().
(sim_create_inferior): Change reinitialization code. Also reinitializes
imap[01] and dmap.
(sim_fetch_register): Add fake registers 32,33,34 for imap0, imap1, and dmap.
(sim_store_register): Add fake registers 32,33,34 for imap0, imap1, and dmap.
* simops.c (MEMPTR): Redefine to use dmem_addr().
(OP_5F00): Replace references to STate.imem with dmem_addr().
* d10v-sim.h (State): Remove mem_min and mem_max. Add umem[128].
(RB,SW,RW,SLW,RLW): Redefine to use dmem_addr().
(IMAP0,IMAP1,DMAP,SET_IMAP,SET_IMAP1,SET_DMAP): Define.