Commit Graph

60 Commits

Author SHA1 Message Date
Ben Elliston e3e473dacc 2001-07-05 Ben Elliston <bje@redhat.com>
* Make-common.in (srccgen): Remove.
	(CGEN_CPU_DIR): Define.
	(CGEN_READ_SCM): Redefine without $(srccgen).
	(CGEN_ARCH_SCM): Ditto.
	(CGEN_CPU_SCM): Ditto.
	(CGEN_DECODE_SCM): Ditto.
	(CGEN_DESC_SCM): Ditto.

	* $arch/Makefile.in: Use $(CGEN_CPU_DIR) where applicable.
2001-07-05 13:51:26 +00:00
Alexandre Oliva b6f6b44d62 * Make-common.in (sim-io.o): Depend on targ-vals.h. 2000-12-27 17:47:20 +00:00
Ben Elliston c79688eb6e 2000-12-05 Ben Elliston <bje@redhat.com>
* Make-common.in (cgen-defs): New target.
	(cgen-decode): Pass $(EXTRAFILES).
2000-12-05 00:56:44 +00:00
Elena Zannoni e4f5c43e77 2000-10-26 Ben Elliston <bje@redhat.com>
* cgen.sh: Handle an isa argument between cpu and mach. Default to
        `all'. Pass `-i' options to cgen applications.
        * Make-common.in (cgen-arch, cgen-cpu, cgen-decode, cgen-cpu-decode,
        cgen-desc): Pass $(isa) to cgen.sh.
2000-10-26 16:21:34 +00:00
Frank Ch. Eigler 604259a086 * Contribute CGEN simulator build support code.
* Patch was posted by bje@redhat.com.
2000-08-21 15:52:39 +00:00
Jason Molenda c2c6d25f0d import gdb-1999-09-21 1999-09-22 03:28:34 +00:00
Stan Shebs d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Jason Molenda 43ff13b418 import gdb-1999-07-05 snapshot 1999-07-05 17:58:44 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Doug Evans b61e2e146a * cgen-defs.h: New file, old cgen-sim.h.
* cgen-sim.h: Simple header that includes others.
	* sim-arange.c: New file.
	* sim-arange.h: New file.
	* sim-basics.h: Include it.
	* Make-common.in (SIM_NEW_COMMON_OBJS): Add sim-arange.o.
	(sim-arange.o): Add rule for.
	* sim-cpu.h (sim_cpu_msg_prefix): Add prototype.
	(sim_io_eprintf_cpu): Add prototype.
	* sim-inline.h (HAVE_INLINE): Define if GNUC.
	(INLINE2): New macro.
	(EXTERN_INLINE): New macro.
	* sim-module.c (sim_post_argv_init): Initialize cpu backlink
	before calling module init fns.
	* sim-profile.h (OPTION_PROFILE_*): Move into enum.
	(profile_init): New function.
	(profile_options): New option --profile-range.
	(profile_option_handler): Handle --profile-range.
	(profile_print_insn): Qualify address range specific section titles.
	(profile_print_addr_ranges): New function.
	(profile_info): Print address ranges if specified.
	(profile_install): Set profile_init init fn.
	* sim-profile.h (PROFILE_DATA): New member `range'.
	* sim-trace.c (trace_init): New function.
	(trace_options): New option --trace-range.
	(trace_option_handler): Handle --trace-range.
	(trace_install): Set trace_init init fn.
	* sim-trace.h (TRACE_DATA): New member `range'.
	* sim-utils.c (sim_cpu_msg_prefix): New function.
	(sim_io_eprintf_cpu): New function.
	* cgen-engine.h (PC_IN_TRACE_RANGE_P): New macro.
	(PC_IN_PROFILE_RANGE_P): New macro.
	* cgen-trace.c (trace_insn_init): Set current_insn to NULL.
	(trace_insn_fini): New arg abuf.  All callers updated.
	Exit early if trace_insn not called.  Check ARGBUF_PROFILE_P before
	printing cycle counts.
	* cgen-trace.h (trace_insn_fini): Update prototype.
	(TRACE_RESULT_P): New macro.
	(TRACE_INSN_INIT,TRACE_INSN_FINI): New arg abuf.  All callers updated.
	(TRACE_INSN): Check ARGBUF_TRACE_P.
	(TRACE_EXTRACT,TRACE_RESULT): New arg abuf.  All callers updated.
	* cgen-types.h (SIM_INLINE): Delete.
	(SIM_HAVE_MODEL,SIM_HAVE_ADDR_RANGE): Define.
	* cgen-utils.c: Don't include cgen-engine.h
	* genmloop.sh (@cpu@_fill_argbuf): New function.
	(@cpu@_fill_argbuf_tp): New function.
	(@cpu@_emit_before,@cpu@_emit_after): New functions.
	(@cpu@_pbb_begin): Prefix cti_sc,insn_count with '_'.
	(SET_CTI_VPC,SET_INSN_COUNT): Update.
	(@cpu@_pbb_before): Check ARGBUF_PROFILE_P before calling
	doing profiling.  Update call to TRACE_INSN_INIT,TRACE_INSN_FINI.
	(@cpu@_pbb_after): Check ARGBUF_PROFILE_P before calling
	doing profiling. Update call to TRACE_INSN_FINI.
1998-12-05 07:56:13 +00:00
Frank Ch. Eigler 92fa45795d * Personal prototype "gx" translation-based JIT engine for M32R.
[ChangeLog]
start-sanitize-gxsim
1998-11-13  Frank Ch. Eigler  <fche@elastic.org>
	* configure.in: Added "--enable-sim-gx" option.
	* configure: Regenerated.
end-sanitize-gxsim
[common/ChangeLog]
1998-11-13  Frank Ch. Eigler  <fche@elastic.org>
start-sanitize-gxsim
	* Make-common.im: Build sim-gx.o and sim-gx-run.o.
	* sim-gx.c: New file: target-independent gx routines.
	* sim-gx.h: Declarations for gx structs and routines.
	* sim-gx-run.c: New file: target-independent gx driver.
	* sim-base.h: Add gx block vector to state struct.
end-sanitize-gxsim
	* aclocal.m4: Add tests for dlopen family.
1998-11-14 04:35:47 +00:00
Andrew Cagney b9a9cde40b Unify (well almost) --enable-build-warnings configuration option
across GDB and SIM directories.
1998-10-28 02:01:32 +00:00
Andrew Cagney 05f6bf9cea Memory corruption problems - hw-event list wasn't correct
unlinking/freeing events.  Couldn't handle the removal of a hw-event
that just been scheduled.
1998-06-04 06:33:02 +00:00
Andrew Cagney 48f83b1a2e Make hw-main.h the main header file for H/W devices. Like sim-main.h
Update dv-*.c
Replace *_callback with more correct. *_method. Update dv-*.c
1998-05-25 11:06:29 +00:00
Andrew Cagney 69be0d4cb8 Split out hw-alloc code. Add constructor and destructor for hw-alloc. 1998-05-25 08:18:03 +00:00
Andrew Cagney 39e953a722 Split out hw-event code. Clean up interface. Update all users. 1998-05-25 07:37:30 +00:00
Andrew Cagney 1e1dcdf0d9 De-sanitize simulator hw. 1998-05-25 06:20:43 +00:00
Andrew Cagney f872d0d643 Only enable H/W on some mips targets.
Move common hw-obj to Make-common
Pacify GCC
1998-05-22 05:23:04 +00:00
Joyce Janczyn 6cad239558 Run ranlib on installed copy of libsim.a. 1998-05-15 20:06:08 +00:00
Joyce Janczyn 08bae91baa Install libsim.a $(exec_prefix)/lib/lib[target]-sim.a as part of install-sim. 1998-05-15 19:05:28 +00:00
Tom Tromey fc4198bbb5 * configure: Regenerated to track ../common/aclocal.m4 changes.
* config.in: Ditto.
	* acconfig.h: New file.
	* Make-common.in (top_builddir): New macro.
	(INTL_LIB): Removed.
	(INTLLIBS): New macro.
	(INTLDEPS): Likewise.
	(LIBDEPS): Use INTLDEPS.
	(EXTRA_LIBS): Use INTLLIBS.
	* aclocal.m4 (SIM_AC_COMMON): Call CY_GNU_GETTEXT.
	(CY_WITH_NLS, CY_GNU_GETTEXT, AM_PATH_PROG_WITH_TEST,
	AM_LC_MESSAGES): New macros from GNU gettext.
1998-04-24 20:51:56 +00:00
Michael Meissner 3618a6e972 Add intl support 1998-04-22 18:19:01 +00:00
Andrew Cagney 278bda4050 Cleanup INLINE support for simulators using common framework.
Make IGEN responsible for co-ordinating inlining of generated files.
By default, aclocal.m4 disabled all inlining.
1998-04-04 12:33:11 +00:00
Stu Grossman 63330b2e2e * Make-common.in: Get SHELL from configure.
* (stamp-tvals sim-inline.c):  Use $(SHELL) when invoking
	move-if-change.  Fixes NT native build problem.
	* Makefile.in (nltvals.def):   Use $(SHELL) when invoking
	move-if-change.  Fixes NT native build problem.
	* configure:  Regenerate with autoconf 2.12.1 to fix shell issues for
	NT native builds.
1998-03-24 17:48:58 +00:00
Doug Evans 84c6d152d1 * dv-sockser.c, dv-sockser.h: New files.
* Make-common.in (dv-sockser.o): Add rule for.
	* aclocal.m4: Check for fcntl.h.
	* config.h: Add HAVE_FCNTL_H.

	* sim-break.c (remove_breakpoint): Fix thinko.

	* sim-hload.c (sim_load): Provide default value of SIM_HANDLES_LMA.
	Use SIM_HANDLES_LMA for lma_p arg to sim_load_file.
1998-03-15 02:43:00 +00:00
Andrew Cagney 0e701ac37b Add generic sim-info.c:sim_info() function using module mechanism.
Clean up compile probs in mips/vr5400.
1998-02-28 02:51:06 +00:00
Doug Evans 6cd37f1563 * Make-common.in (check): Run `make check' in testsuite dir. 1998-02-25 15:15:09 +00:00
Doug Evans 462cfbc4eb * aclocal.m4: Recognize --enable-maintainer-mode.
*/configure: Regenerated.
1998-01-20 06:37:00 +00:00
Doug Evans 4a44afd5c7 * Make-common.in (cgen-run.o,cgen-scache.o): Delete cgen-scache.h dep. 1998-01-20 03:57:14 +00:00
Doug Evans 36de6f40d4 sanitize keep-cygnus cgen generation 1998-01-20 02:36:21 +00:00
Doug Evans 189e2694ad * Make-common.in (cgen-{arch,cpu,decode}): New targets.
* cgen.sh: New file.
	* cgen-scache.h: Deleted.
	* cgen-scache.c: Only compile contents if WITH_SCACHE.
	(scache_init): Use runtime computed size of SCACHE.
	(scache_flush): Likewise.
	* cgen-mem.h (GETIMEMU[QHSD]I): Declare.
	([GS]ETT{QI,UQI,HI,UHI,SI,USI,DI,UDI}): Declare.
	* cgen-sim.h: Scache support moved here.
	(PC): Redo definition.
	(ARGBUF,SCACHE,PARALLEL_EXEC): Provide forward decls.
	(DECODE): Add parallel execution support.
	Only include semantic label members if using switch.
	(SWITCH,CASE,BREAK,DEFAULT,ENDSWITCH): Portable computed goto support.
	(CGEN_CPU): Delete members exec_state, halt_sigrc, halt_jmp_buf.
	(IADDR,CIA,SEM_ARG,EX_FN_NAME,SEM_FN_NAME,RECORD_IADDR,SEM_ARGBUF,
	SEM_NEXT_PC,SEM_BRANCH_VIA_{CACHE,ADDR},SEM_NEW_PC_ADDR): Moved here
	from cgen-types.h.
	(engine_{stop,run,resume,halt,signal}): Delete decls.
	* cgen-types.h (CGEN_{XCAT3,CAT3}): Delete.
	(argbuf,scache): Delete forward decls.
	(STATE): Delete decl.
	* cgen-utils.c: Don't include decode.h, mem-ops.h, sem-ops.h.
	Include cgen-mem.h, cgen-ops.h.
	(engine_halt,engine_signal): Delete.
	({ex,exc,sem,semc}_illegal): Delete.
	(sim_disassemble_insn): Result of extract fn is in bits.
	* genmloop.sh: Rewrite.
1998-01-19 21:14:14 +00:00
Doug Evans 22469a10e8 * Make-common.in (SIM_ENVIRONMENT): New variable.
(CONFIG_CFLAGS): Add it.
	* aclocal.m4 (SIM_AC_OPTION_ENVIRONMENT): Handle
	--enable-sim-environment option.
	* configure: Regenerated.
	* sim-config.h (environment support): Rewrite.
	* sim-config.c (current_environment): Define as enum, unconditionally.
	(current_alignment): Define unconditionally.
	(config_environment_to_a): Update.
	(config_alignment_to_a): Fix type of argument.  Define unconditionally.
	(sim_config): Handle environment and alignment determination
	unconditionally.  Delete sanity checks of current_environment,
	unnecessary.
	(print_sim_config): Update.
	* sim-options.c (STANDARD_OPTIONS enum): Add OPTION_ENVIRONMENT.
	(standard_options): Add --environment.
	(standard_option_handler): Likewise.
1997-12-04 02:04:42 +00:00
Andrew Cagney aaa11abe42 Clarify meaning of sim_signalled's SIGRC argument. Document that this
isn't possible in sim-reason.c and just return the target SIGRC
instead.

For simulators that rely on sim-reason.c, replace SIG* with SIM_SIG*.

Hack nrun.c so that when it is executed (ARGV[0]) as `step' instead
of `run' it single steps the simulator.  Allows testing of single step
without full GDB.
1997-11-22 12:52:44 +00:00
Doug Evans 1ebc7e0e24 * sim-signal.c, sim-signal.h: New files.
* Make-common.in (sim-signal.o): Add rule for.
	(SIM_NEW_COMMON_OBJS): Add sim-signal.o.
	* sim-abort.c: Don't include <signal.h>.
	* sim-basics.h: #include "sim-signal.h".
	* sim-break.c: Don't include <signal.h>.
	(sim_handle_breakpoint): Replace SIGTRAP with SIM_SIGTRAP.
	* sim-core.c: Don't include <signal.h>.
	(SIGBUS): Delete definition.
	(sim_core_signal): Replace SIGSEGV,SIGBUS with SIM_SIGSEGV,SIM_SIGBUS.
	* sim-engine.c: Don't include <signal.h>.
	(sim_engine_abort): Replace SIGABRT with SIM_SIGABRT.
	* sim-reason.c (sim_stop_reason): Call sim_signal_to_host.
	* sim-resume.c: Don't include <signal.h>.
	(SIGTRAP): Delete definition.
	(has_stepped): Replace SIGTRAP with SIM_SIGTRAP.
	* sim-stop.c: Don't include <signal.h>.
	(control_c_simulation): Replace SIGINT with SIM_SIGINT.
	* sim-watch.c: Don't include <signal.h>.
	(handle_watchpoint): Replace SIGINT with SIM_SIGINT.
1997-11-19 08:00:37 +00:00
Doug Evans e5ce1670c1 * Make-common.in (SIM_NEW_COMMON_OBJS): New variable.
* sim-base.h (CIA_ADDR): Provide default definition.
1997-11-18 23:55:33 +00:00
Doug Evans 38377b3a48 * Make-common.in (srccom): New variable. 1997-11-18 07:14:20 +00:00
Doug Evans f7abc1ca0c * Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.
(LIB_OBJS): Add syscall.o.
	(gentmap): Pass $(NL_TARGET) to $(CC).
	(syscall.o): Add rule for.
	(sim_main_headers): Add $(SIM_EXTRA_DEPS).
	(sim-bits.o): Depend on $(sim-n-bits_h).
	(sim-load.o): Depend on callback.h.

	* Make-common.in (cgen-*.o): Update dependencies, mem-ops.h renamed to
	cgen-mem.h, sem-ops.h renamed to cgen-ops.h.
	* cgen-mem.h, cgen-ops.h: New files.

	* aclocal.m4 (--enable-sim-scache): Pass -DWITH_SCACHE=0 for "=no".

	* Makefile.in (nltvals.def): Depend on gennltvals.sh.
	Rewrite build rule.
	* callback.c: #include string.h or strings.h.
	#include sys/types.h and sys/stat.h.
	(cb_init_syscall_map,cb_init_errno_map,cb_init_open_map): Declare.
	(enosys): New function.
	(os_get_errno,os_open): Update.
	(os_stat,os_fstat): New functions.
	(os_init): Initialize syscall_map, errno_map, open_map.
	(default_callback): Add entries for os_stat, os_fstat, syscall_map,
	errno_map, open_map, signal_map, stat_map.
	(cb_read_target_syscall_maps): New function.
	(cb_target_to_host_syscall): New function.
	(cb_host_to_target_errno): Renamed from host_to_target_errno.
	(cb_target_to_host_open): Renamed from target_to_host_open.
	(store): New function.
	(cb_host_to_target_stat): New function.
	* gentmap.c (sys_tdefs): New global.
	(gen_targ_vals_h): Output target syscall numbers.
	(gen_targ_map_c): Update.  Output target syscall translation map.
	* gentvals.sh: New first argument `target'.  Preface table with
	#ifdef NL_TARGET_$target if non-null target passed.
	* gennltvals.sh: New file.
	* nltvals.def: Regenerated.
1997-11-17 23:09:08 +00:00
Doug Evans 5dcf955d46 * Make-common.in (BUILT_SRC_FROM_COMMON): Remove files no longer
built this way.
	(sim-config.o): Remove non-existent $(sim-nconfig_h) dependency.
	(clean): Don't delete $(BUILT_SRC_FROM_COMMON) if building in
	source tree.
1997-11-12 20:29:53 +00:00
Andrew Cagney 7456a10d9b * sim-alu.h (ALU64_HAD_OVERFLOW): Define.
(ALU64_SUB): Define.
* Make-common.in (all): Build SIM_EXTRA_ALL first.
(.gdbinit): Remove dependencies, generate once per build.
1997-10-14 09:39:05 +00:00
Stu Grossman b9d580a4b0 * Make-common.in: New files sim-break.c, sim-break.h.
* sim-base.h:  Add point to breakpoint list to sim_state_base.
	* sim-break.c sim-break.h:  New modules that implement intrinsic
	breakpoint support.
	* sim-module.c:  Add breakpoint module.
1997-09-25 00:51:17 +00:00
Andrew Cagney 4141b1c63d * Make-common.in (SIM_SCACHE, SIM_DEFAULT_MODEL): Assign configured values.
(CONFIG_CFLAGS): Add same.
1997-09-23 04:05:50 +00:00
Andrew Cagney 92f91d1ff0 Remove need to update <targ>/Makefile.in when adding optional options
to <targ>/configure.in.
Simplify logic used to select target [default] endianness.
1997-09-23 01:25:26 +00:00
Andrew Cagney a34abff813 o Add modulo argument to sim_core_attach
o	Add sim-memopt module - memory option processing.
1997-09-04 03:47:39 +00:00
David Edelsohn 88d5f8e854 * gdbinit.in: New file.
* aclocal.m4 (SIM_AC_OUTPUT): Build .gdbinit.
	* Make-common.in (distclean): Delete .gdbinit.
	(.gdbinit): Add rule for.
	* configure: Regenerated to track ../common/aclocal.m4 changes.
1997-09-04 00:49:57 +00:00
David Edelsohn 645ab3ec42 (TAGS): Add support for "/* TAGS: foo */" marker. 1997-09-02 22:03:41 +00:00
Andrew Cagney fafce69ab1 Add ABFD argument to sim_create_inferior. Document.
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.
1997-08-27 04:44:41 +00:00
Andrew Cagney f03b093cd3 o Implement generic halt/restart/abort module.
Use in tic80 and d30v simulators.
o	Add signal hook to sim-core module
1997-05-19 03:42:33 +00:00
Andrew Cagney 3971886ac1 Add flakey floating-point support to the TI c80 simulator. 1997-05-05 12:46:25 +00:00
David Edelsohn 968d32cc40 (cgen-utils.o): Update cgen-{mem,sem}.h dependencies. 1997-05-01 20:43:24 +00:00