Commit Graph

75 Commits

Author SHA1 Message Date
David Edelsohn
463372706f * Makefile.in (SIM_OBJS): Add sim-load.o.
* compile.c (sim_kind, myname): New static locals.
	(sim_open): Set sim_kind, myname.
	(sim_load): Return SIM_RC.  New arg abfd.  Update test for h8300h.
	Call sim_load_file to load file into simulator.  Set start address
	from bfd.
	(sim_create_inferior): Return SIM_RC.  Delete arg start_address.
1997-04-17 10:14:28 +00:00
Andrew Cagney
08db4a658e Get configure to define RETSIGTYPE 1997-04-07 05:58:59 +00:00
David Edelsohn
14b71cd185 * compile.c (sim_open): New arg `kind'. 1997-04-02 23:33:56 +00:00
David Edelsohn
fbda74b1c1 * aclocal.m4: Check for stdlib.h, string.h, strings.h, unistd.h.
(sim-debug): Allow arguments.  Define WITH_DEBUG in addition to
	-DDEBUG.
	* configure: Regenerated to track ../common/aclocal.m4 changes.
1997-04-02 23:17:50 +00:00
Andrew Cagney
a35e91c3c7 New file common/sim-config.c sets/checks simulator configuration options.
Update common/aclocal.m4 to better work with sim-config.[hc].
1997-04-02 05:04:25 +00:00
Andrew Cagney
a77aa7ec4b * configure: Re-generate.
* Make-common.in (CSEARCH): Do not include the gdb directory in
        the search path.
        * Make-common.in (SIM_ENDIAN, SIM_HOSTENDIAN, SIM_INLINE,
        SIM_WARNING): Drop, requiring the simulator specific Makefile.in
        to explicitly incorporate these.

        * aclocal.m4 (--enable-sim-alignment); New option. Strongly
        specify the alignment restrictions of the target architecture -
        without this option all alignment restrictions are accomodated.
        (--enable-sim-assert): New option.  Conditionally compile in
        assertion statements.
        (--enable-sim-float): New option. Strongly specify the target's
        floating point support.
        (--enable-sim-hardware): New option.  Specify the hardware devices
        included in the simulation.
        (--enable-sim-packages): New option.  Specify the hardware
        packages included in the simulation.
        (--enable-sim-regparm): New option.  Specify that parameters be
        passed in registers instead of on the stack.
        (--enable-sim-reserved-bits): New option. Specify that reserved
        bits within an instruction are are correctly set.
        (--enable-sim-smp): New option. Specify the level of SMP support
        to be included in the simulator.
        (--enable-sim-stdcall): New option.  Specify an alternative
        function call convention.
        (--enable-sim-xor-endian): New option.  Configure xor-endian
        support used by some targets to implement bi-endian support.
1997-03-17 15:29:29 +00:00
Michael Meissner
601fb8aea6 Regenerate simulator configure scripts; Remove d10v traps 1-3, Make 15 the system call trap, keeping 0 temporarily 1997-03-14 16:21:57 +00:00
David Edelsohn
1520d7e9b9 * compile.c (sim_open): New SIM_DESC result. Argument is now in
argv form.
	(other sim_*): New SIM_DESC argument.
1997-03-13 20:49:39 +00:00
David Edelsohn
19c5af72af * Makefile.in (@COMMON_MAKEFILE_FRAG): Use
COMMON_{PRE,POST}_CONFIG_FRAG instead.
	* configure.in: sinclude ../common/aclocal.m4.
	* configure: Regenerated.
1997-02-04 21:42:27 +00:00
Stu Grossman
ae0d7848d8 * ../common/aclocal.m4 (COMMON_MAKEFILE_FRAG): Quote a couple of $'s in
comments and single quotes.  Fixes a problem found on hpux.
1997-01-24 18:44:29 +00:00
Stu Grossman
a695143eae * configure: Remove targ-vals.def when doing distclean. (Change
is actually in ../common/aclocal.m4.)
1997-01-24 00:44:03 +00:00
Stu Grossman
2757866e9e * configure: Remove Make-common.in from dependencies. (Actually in
../common/aclocal.m4).
1997-01-24 00:04:57 +00:00
Stu Grossman
295dbbe44c * configure configure.in Makefile.in: Update to new configure
scheme which is more compatible with WinGDB builds.
	* configure.in:  Improve comment on how to run autoconf.
	* configure:  Re-run autoconf to get new ../common/aclocal.m4.
	* Makefile.in:  Use autoconf substitution to install common
	makefile fragment.
1997-01-23 22:09:52 +00:00
David Edelsohn
899232aba0 * Makefile.in: Delete stuff moved to ../common/Make-common.in.
(SIM_OBJS): Define.
	* configure.in: Simplify using macros in ../common/aclocal.m4.
	* configure: Regenerated.
	* inst.h (enum sim_state): Define.
	(cpu_state_type): New member `state'.  Set it whenever `exception'
	is set.
	* compile.c (sim_callback): New global.
	(sim_set_simcache_size): Renamed from sim_csize.
	(sim_resume, case O_SLEEP): Add right way to decode r0 but #if 0 out
	'cus it can't work.  Change main loop exit test to use cpu.state.
	(sim_trace): New function.
	(sim_stop_reason): Add right way to set results, but #if 0 out.
	(sim_size): New function.
	(sim_info): Redirect calls to printf_filtered through callback.
	(sim_set_callbacks): Record callback.
	* run.c: Deleted, using one in ../common now.
	* tconfig.in: New file.
1996-11-20 09:47:57 +00:00
Jeff Law
9745c59321 * compile.c (sim_resume): Fix all rotate-by-2-bits insns. 1996-07-10 04:15:17 +00:00
Jeff Law
25b344a4a2 No longer need to sanitize away h8s stuff. 1996-07-05 18:59:31 +00:00
Jeff Law
7647e0dd79 * run.c (main): Don't "load" sections which don't have
SEC_LOAD set.
        * compile.c (sim_resume, case "O_NOT"): Use ONOT instead
        of OSHIFTS.
        (ONOT): Define.
        (sim_resume, shift/rotate cases): Add support for shift/rotate
        by two bits.
        (OSHIFTS): Corresponding changes.
Handling more H8/S ops.
1996-07-03 05:10:47 +00:00
Jeff Law
171f4664be * compile.c (sim_resume): Handle "ldm.l" and "stm.l".
HMSE H8/S.
1996-07-02 07:37:50 +00:00
Jason Molenda
445289655a * Makefile.in (bindir, libdir, datadir, mandir, infodir, includedir,
INSTALL_PROGRAM, INSTALL_DATA): Use autoconf-set values.
        (docdir): Removed.
        * configure.in (AC_PREREQ): autoconf 2.5 or higher.
        (AC_PROG_INSTALL): Added.
        * configure: Rebuilt.
1996-06-26 03:22:34 +00:00
Jeff Law
88ea21e50c * compile.c (sim_load): Treat the H8/S like the H8/300H for now.
* run.c (main): Treat the H8/S like the H8/300H for now.

More sanitize H8/S stuff.
1996-06-18 23:33:49 +00:00
Jeff Law
7e1e013fd9 * compile.c (sim_resume): Correctly handle divu.
More bugfixing.  HMSE
1996-05-23 04:25:43 +00:00
Jeff Law
132fdcb974 * compile.c (sim_load): Re-allocate memory for the simulator
here.
HMSE.
1996-04-12 22:42:03 +00:00
Jeff Law
9b1271617b * compile.c (sim_resume): Fix and simplify overflow and carry
handling for 32bit ALU insns.
1996-04-12 15:38:08 +00:00
Jeff Law
50d45d1b2f * compile.c (sim_resume): Fix overflow checks for ALU insns.
So that int-compare.c passes.
1996-04-09 05:57:15 +00:00
Jeff Law
e24146ec95 * compile.c (decode): Use "bit" to hold L_3 immediates instead
of holding them in "abs".  Handle ABS8MEM memory references aka
        8-bit area.  Replace ABSMOV references with ABS8MEM.
So we've got a chance of simulating something like btst #0,@40:8 correctly.
hmse.
1996-04-06 00:21:35 +00:00
David Edelsohn
5d06fa80b2 (sim_resume, shift insns): Fix setting of overflow flag for shal. 1996-03-11 23:25:53 +00:00
David Edelsohn
e10bb7b3e9 * run.c (main): Print error message if argument is invalid.
(usage): Improve text.
1996-03-11 21:59:47 +00:00
David Edelsohn
741fd619cb (main): Print error message if argument is invalid.
(usage): Improve text.
1996-03-11 21:59:22 +00:00
David Edelsohn
4dfb4ffcd1 * compile.c: #include "wait.h".
(sim_resume, sleep insn): Check program exit status in r0.
1996-03-11 19:30:53 +00:00
David Edelsohn
e656ecf90c * compile.c (sim_resume): Watch for calls to abort.
* run.c: #include <signal.h>.
	(main): Abort if program got SIGILL.
1996-03-11 17:54:45 +00:00
Ian Lance Taylor
fe7ec1d0a2 * Makefile.in (install): Don't install in $(tooldir). 1995-09-08 18:33:23 +00:00
Ian Lance Taylor
247d4fb1af mention new config.in file 1995-09-08 16:34:48 +00:00
Ian Lance Taylor
0743b4ac29 * configure.in: Call AC_CONFIG_HEADER. Don't try to use
bfd/hosts/*.h file or bfd/config/*.mh file.  Call AC_PROG_CC and
	AC_PROG_RANLIB.  Substitute in values for CFLAGS, HDEFINES and AR.
	Call AC_CHECK_HEADERS for stdlib.h and time.h.  Touch stamp.h if
	creating config.h.
	* configure: Rebuild.
	* Makefile.in (AR): Define as @AR@.
	(CC): New variable, defined as @CC@.
	(CFLAGS): Define as @CFLAGS@.
	(RANLIB): Define as @RANLIB@.
	(HDEFINES, TDEFINES): New variables.
	(@host_makefile_frag@): Remove.
	(compile.o, run.o): Depend upon config.h.
	(mostlyclean): Make the same as clean, not distclean.
	(clean): Remove config.log.
	(distclean): Remove config.h and stamp-h.
	(Makefile): Don't depend upon @frags@.  Just rebuild Makefile when
	invoking config.status.
	(config.h, stamp-h): New targets.
	* compile.c: Include "config.h".  Don't include <sys/times.h>.
	Include <time.h> and <stdlib.h> if they exist.  Don't include
	"sysdep.h".
	(get_now): Remove unused local b.
	* run.c: Include "config.h".  Include <stdlib.h> if it exists.
	Don't include "sysdep.h".
	* writecode.c: Don't include "bfd.h" or "sysdep.h".  Include
	<stdio.h>.
1995-09-08 16:26:41 +00:00
J.T. Conklin
8b40f60829 * h8300.mt: Removed. 1995-07-05 23:16:38 +00:00
J.T. Conklin
1ffd292be6 * Makefile.in, configure.in: converted to autoconf.
* configure: New file, generated with autconf 2.4.
1995-07-05 22:54:10 +00:00
Stan Shebs
94d1ac891b * compile.c (sim_do_command): New function. 1995-07-01 00:00:12 +00:00
Steve Chamberlain
7478904c77 * compile.c (get_now): Don't do if win32.
(sim_resume): Poll in win32 too.
1995-06-20 23:21:23 +00:00
Jim Wilson
4cea100d33 Correct typo in all simulator configure.in files other than SH: ../bfd
should be ../../bfd.
1995-05-24 23:38:06 +00:00
J.T. Conklin
057af5c96c * run.c: parse arguments with getopt(). 1995-03-27 18:49:58 +00:00
Ian Lance Taylor
f7ce03e552 fix configury 1995-02-28 22:34:21 +00:00
David Edelsohn
3a1d485df5 * compile.c: #include "bfd.h".
(sim_*): Set result type to void where there isn't one.
	(sim_resume, default case): Set cpu.exception to SIGILL.
	(sim_trace): Delete.
	(sim_set_pc): Delete.
	(sim_info): Delete printf_fn arg, all callers changed.
	Call printf_filtered.
	(set_h8300h): New arg `flag', all callers changed.
	(sim_close): New function.
	(sim_load): New function.
	(sim_create_inferior): Renamed from sim_set_args, all callers changed.
	* run.c: #include <varargs.h>, "remote-sim.h".
	(printf_filtered): New function.
1994-05-18 20:55:12 +00:00
David Edelsohn
0693d363df * compile.c (decode): Fix typo (16 bit branches).
(*): Some white space clean up.
1994-05-14 01:36:52 +00:00
David Edelsohn
a415cf0a77 * Makefile.in (CSEARCH): Add -I$(srcdir)/../../gdb
* compile.c: #include "remote-sim.h".
(sim_resume): New arg siggnal.
(sim_write): Use SIM_ADDR for type of arg addr.  Always return a value.
(sim_read): Ditto.
(sim_store_register): Result is type int.
(sim_fetch_register): Ditto.
(sim_stop_reason): Renamed from sim_stop_signal.
(sim_set_pc): Use SIM_ADDR for type of arg pc.
(sim_info): int result, new arg printf_fn.
(sim_kill): int result.
(sim_open): int result, new arg name.
* run.c (main): Use sim_set_pc to set pc.  Update call to sim_info.
1993-10-26 17:01:03 +00:00
David Edelsohn
7db9345b40 (sim_stop_signal): Result is now enum sim_stop. 1993-10-23 22:03:52 +00:00
Steve Chamberlain
28655f000c * compile.c (sim_set_pc): Write to the pc direcly.
(sim_store_register): Now value is passed by reference. (sim_read,
	sim_write): Return number of bytes copied.
1993-10-07 23:25:14 +00:00
Fred Fish
b5ed6e32c2 Remove '.Sanitize' from explicit list of Things-to-lose. It is now implicitly
added to the list by Sanitize, unless Sanitize knows it needs to keep it.
1993-08-02 23:29:32 +00:00
Steve Chamberlain
73e77bc3da Deleted. 1993-07-30 17:46:09 +00:00
Fred Fish
775d4a4096 Add .Sanitize to Things-to-lose list. 1993-07-30 16:46:19 +00:00
David Edelsohn
f853f4ca53 Fix bit instructions (was setting destination reg and not carry). 1993-07-16 20:26:05 +00:00
David Edelsohn
56390ce8d4 * compile.c: Reset HMODE back to zero (accidently set it to 1). 1993-07-15 17:04:39 +00:00