Commit graph

391 commits

Author SHA1 Message Date
Andrew Cagney
b9a9cde40b Unify (well almost) --enable-build-warnings configuration option
across GDB and SIM directories.
1998-10-28 02:01:32 +00:00
Doug Evans
b35179cb0b * Make-common.in (CGEN_INCLUDE_DEPS): Define.
(sim-core.o): Delete duplicate dependence on $(SIM_EXTRA_DEPS).
	(sim-cpu.o,sim-endian.o,sim-hw.o): Ditto.
	(cgen-run.o,cgen-scache.o,cgen-trace.o,cgen-utils.o): Delete
	explicit cgen header dependencies, require SIM_EXTRA_DEPS to include
	CGEN_INCLUDE_DEPS.
	* cgen-cpu.h: New file.
	* cgen-engine.h: New file.
	* cgen-scache.h: New file.
	* cgen-sim.h: Delete portions moved to new files.
	* genmloop.sh: Generate two files eng.hin,mloop.cin explicitly,
	rather than sending result to stdout.
1998-10-19 21:00:59 +00:00
Doug Evans
0b517b9cf2 * Make-common.in (sim-reg.o): New rule.
(cgen-run.o): New rule.
	* cgen-ops.h: Delete many BI macros.  Change all UBI -> BI.
	* cgen-run.c (prime_cpu): New function.
	* cgen-scache.c: Add pseudo-basic-block (pbb) scaching support.
	(scache_option_handler, case OPTION_PROFILE_SCACHE): Handle explicitly
	mentioned cpu.
	(scache_flush_cpu,scache_lookup,scache_lookup_or_alloc): New fns.
	* cgen-sim.h (CGEN_INSN_VIRTUAL_TYPE): New enum.
	(CGEN_INSN_VIRTUAL_P): New macro.
	(SEM_PC): New typedef.
	(SEMANTIC_FN): Change type of result to SEM_PC.
	(SEM_SET_FULL_CODE,SEM_SET_FAST_CODE,SEM_SET_CODE): New macros.
	(IDESC_CTI_P,IDESC_SKIP_P): New macros.
	(SCACHE_MAP): New typedef.
	(CPU_SCACHE): Add pbb support.
	(scace_lookup,scache_lookup_or_alloc,scache_flush_cpu): Declare.
	(SEM_BRANCH_INIT_EXTRACT,SEM_BRANCH_INIT,SEM_BRANCH_FINI): New macros.
	(CGEN_CPU): New members running_p,insn_count,{fast,full}_engine_fn,
	max_slice_insns.
	(INSN_NAME): Delete.
	(cgen_insn_name): Declare.
	(sim_engine_invalid_insn): Renamed from sim_engine_illegal_insn.
	* cgen-trace.c (trace_buf): Shrink from 1024 to 256 bytes.
	(first_insn_p): Make static.
	(trace_insn): Handle virtual insns specially.
	(cgen_trace_printf): Ensure we haven't overflowed the buffer.
	* cgen-types.h (UBI): Delete.
	(MODE_TYPE): New enum.
	(HOSTINT,HOSTUINT,HOSTPTR): Delete.
	* cgen-utils.c (mode_names): Delete UBI.  Add INT,UINT,PTR.
	(cgen_virtual_opcode_table): New global.
	(cgen_insn_name): New function.
	(sim_disassemble_insn): Ignore virtual insns.
	* genmloop.sh: Delete top level loop generation.  Add pbb support.
	* sim-cpu.h (CPU_INSN_NAME_FN): New typedef.
	(sim_cpu_base): New members max_insns,insn_name,model_data.
	(CPU_PC_GET,CPU_PC_SET): New macros.
	(sim_pc_get,sim_pc_set): Declare.
	* sim-model.c (model_set): Call model init fn.
	* sim-model.h (MODEL_FN): New typedef.
	(INSN_TIMING): New member model_fn.
	(MODEL): New members num,init.
	* sim-profile.c (sim_profile_print_bar): Renamed from print_bar.
	All callers updated.
	(profile_insn_init): New fn.
	(profile_print_insn): Update, INSN_NAME -> CPU_INSN_NAME.
	Exit early if insn profiling not supported.
	(profile_print_memory): Update, MAX_MODES -> MODE_TARGET_MAX.
	(profile_install): Record profile_insn_init as init fn.
	(profile_uninstall): Free PROFILE_INSN_COUNT if non-null.
	* sim-profile.h: Update, MAX_MODES -> MODE_TARGET_MAX.
	(PROFILE_DATA): Delete member exec_time.
	Change insn_count to pointer to array, rather than the array.
	(sim_profile_print_bar): Declare.
1998-10-09 22:43:05 +00:00
Doug Evans
99bc9a6984 cgen-run.c: new mainloop for cgen
sim-reg.c: generic sim_fetch/store_register interface fns
1998-10-07 23:55:42 +00:00
Frank Ch. Eigler
78b871ec81 * Build fixes for tx39 sim hosted on strange Linux boxen.
[common/ChangeLog]
Tue Sep  1 15:36:52 1998  Frank Ch. Eigler  <fche@cygnus.com>
	* sim-config.h: Remove reference to linux kernel header.
[mips/ChangeLog]
Tue Sep  1 15:39:18 1998  Frank Ch. Eigler  <fche@cygnus.com>
	* dv-tx3904sio.c: Include sim-assert.h.
1998-09-01 13:19:57 +00:00
Frank Ch. Eigler
8d6ed1b768 * eCos tx3904sio sim - devo part 1/2
Tue Aug 25 12:45:27 1998  Frank Ch. Eigler  <fche@cygnus.com>
	* dv-sockser.c (sockser_addr): Make variable non-static.
1998-08-25 13:58:35 +00:00
Joyce Janczyn
fb37fdcb89 * sim-hw.{c,h} (sim_hw_parse): Return struct hw pointer. 1998-08-24 15:48:45 +00:00
Doug Evans
39813256da * cgen-sim.h (cgen_state): New member opcode_table.
* cgen-utils.c (sim_disassemble_insn): Use it.
1998-08-03 18:45:06 +00:00
Doug Evans
63542cbcc0 * cgen-mem.h (DECLARE_SETT): Fix return type. 1998-07-24 19:44:04 +00:00
Doug Evans
f3ccb5a785 * sim-model.c (model_option_handler): Remove unused variable `n'. 1998-07-24 17:16:02 +00:00
Ian Lance Taylor
965f532708 remove d30v sanitization 1998-07-24 04:38:45 +00:00
Doug Evans
cac4e5a481 * cgen-utils.c: Include bfd.h.
(sim_disassemble_insn): Update call to CGEN_EXTRACT_FN.
1998-07-21 23:26:53 +00:00
Andrew Cagney
9483af2c61 Add a printf fmt style version of sim_events_schedule.
This allows the caller to specify extra trace information that is
only evaluated when tracing is enabled.
1998-07-08 08:00:36 +00:00
Jeff Law
658fb0c743 * sim-bits.h (EXTEND24): Define. 1998-07-06 21:55:37 +00:00
Doug Evans
039fa2c847 * cgen-sim.h (CPU_SCACHE): Make size unsigned.
(CPU_SCACHE_HASH_MASK): New macro.
	(SCACHE_HASH_PC): Rewrite.
	* genmloop.sh (engine_resume_{full,fast}): Move some of hash
	computation out of main loop.
1998-07-03 00:14:49 +00:00
Doug Evans
6de2add29f * Make-common.in (SCHEME,SCHEMEFLAGS): Delete.
(CGENDIR,CGEN): New variables.
	(CGEN_VERBOSE): Renamed to CGENFLAGS.
	(cgen-arch,cgen-cpu,cgen-decode): Update.
	(CGEN_CPU_WRITE): New variable.
	(CGEN_CPU_SEMSW): -W -> -X.
	(CGEN_FLAGS_TO_PASS): Delete SCHEME.  Add CGEN,CGENFLAGS.
	* cgen.sh: Delete args scheme,schemeflags.  New arg cgen.

	* cgen-sim.h (RECORD_IADDR): Delete.
	* cgen-types.h (HOSTINT,HOSTUINT,HOSTPTR): New types.
	* genmloop.sh (engine_resume_{full,fast}): Delete icount.
1998-07-01 23:47:50 +00:00
Andrew Cagney
67574b9cea Re-do sim-inline's handling of external functions and variables so
that there really is only one instance of them.
1998-06-17 07:42:53 +00:00
Doug Evans
403bed787e * cgen-trace.c (trace_insn_fini): Redo cycle handling.
* sim-profile.h (PROFILE_DATA): Rename cycle handling members.
	* sim-profile.c (profile_print_model): Update.
1998-06-13 14:47:51 +00:00
Doug Evans
af2b0c8593 * gennltvals.def (m32r): Use common syscall.h now.
(mn10300): Add entry.
	* nltvals.def: Regenerate.
1998-06-13 01:39:44 +00:00
Doug Evans
68096722d9 * sim-engine.c (sim_engine_get_run_state): New function.
* sim-engine.h (sim_engine_get_run_state): Declare it.
1998-06-12 20:08:50 +00:00
Doug Evans
169c74762a * sim-core.h (SIM_CORE_SIGNAL_FN): New typedef.
* sim-core.c (sim_core_signal): Make extern, always define.
1998-06-11 07:55:29 +00:00
Doug Evans
a27a2a8de4 * Make-common.in (CGEN_FLAGS_TO_PASS): New variable.
* cgen-ops.h (ANDIF): New macro.
	(ANDIF[BQHSD]I): Delete.
1998-06-10 23:03:55 +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
451a9c0587 Pull in preliminary versions of hw instances and handles from ../ppc 1998-05-25 11:33:28 +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
c14db36dbb Add files hw-alloc.[hc] (mising from last CI)
Move set_* macro's from hw-base to hw-device.
1998-05-25 08:50:22 +00:00
Andrew Cagney
325a1ba876 Initialize/destory hw-properties within the hw-device. 1998-05-25 08:29:05 +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
2f06c437e2 Clean up create/delete of hw-ports 1998-05-25 07:08:48 +00:00
Andrew Cagney
f675744718 * hw-device.c (hw_ioctl), hw-device.h (hw_ioctl_callback): Drop
PROCESSOR and CIA arguments.
1998-05-25 06:44:39 +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
Andrew Cagney
643878d017 * sim-hw.c: Include ctype.h.
(do_hw_poll_read): Do not assume EAGAIN.
1998-05-21 08:17:31 +00:00
Doug Evans
6f7833f035 * cgen-trace.c (first_insn_p): New static local.
(trace_insn_init): Set it.
	(trace_insn_fini): Use TRACE_PREFIX.
	(trace_insn): Rewrite to use trace_prefix.
	* sim-trace.c (trace_prefix): Don't print filename arg if NULL.
	Adjust width accordingly.

	* sim-profile.h (PROFILE_DATA): New member profile_any_p.
	(PROFILE_ANY_P,PROFILE_INSN_P,PROFILE_MEMORY): New macros.
	(PROFILE_SCACHE_P,PROFILE_PC_P,PROFILE_CORE_P): New macros.
	(PROFILE_COUNT_INSN,PROFILE_COUNT_READ,PROFILE_COUNT_WRITE): Simplify.
	(PROFILE_COUNT_CORE): Simplify.
	* sim-profile.c (profile_option_handler): Compute profile_any_p.
1998-05-20 11:43:00 +00:00
Doug Evans
6f1cadd0ce * cgen-ops.h (ADDCFSI): Fix typo. 1998-05-20 07:01:05 +00:00
Doug Evans
991238c82b * cgen-sim.h (CGEN_CPU): New members idesc_{read,sem}_init_p.
* genmloop.sh: Use them rather than static locals.
1998-05-17 00:50:07 +00:00
Doug Evans
ebd58f4dde * sim-engine.c (sim_engine_set_run_state): New function.
* sim-engine.h (sim_engine_set_run_state): Declare.
	* genmloop.sh (pending_reason,pending_sigrc): New static locals.
	(@cpu@_engine_stop): New args reason,sigrc.  All callers updated.
	(engine_resume): Reorganize.  Allow synchronous exit from main loop.
1998-05-16 19:51:12 +00:00
Doug Evans
bcb829fdbd * cgen-trace.c (trace_insn_init): New arg first_p.
All callers updated.
	(trace_insn_fini): New arg last_p.  All callers updated.
	* cgen-trace.h (trace_insn_init,trace_insn_fini): Update.
	(TRACE_INSN_INIT,TRACE_INSN_FINI): Update.
	* genmloop.sh (engine_resume): Update.
1998-05-15 23:31:22 +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
Doug Evans
433a8eafaa * Make-common (sim_main_headers): Sort.
(cgen-*.o): Add cgen-sim.h dependency.

	* sim-cpu.h: New file.  sim_cpu_base moved here.
	Move sim_cpu_lookup decl here.
	* sim-base.h: #include "sim-cpu.h".
	* sim-cpu.c: New file.
	* Make-common (sim_main_headers): Add sim-cpu.h.
	(sim-cpu.o): Add rule for.
1998-05-07 02:08:05 +00:00
Doug Evans
109e611125 * sim-io.c: #include <errno.h>. 1998-05-06 17:13:25 +00:00
Andrew Cagney
844f40d393 Copy polling code in PSIM simulator into common directory. Will
need rewrite later.  Use in mn10300 simulator.
1998-05-06 03:32:12 +00:00
Doug Evans
ca118edaff Fix sanitization. 1998-05-05 00:24:16 +00:00
Andrew Cagney
03f3bfdb7a *) Delete CPU and CIA arguments from hw_io_*_buffer transfers.
Instead save them in the sim_hw structure.
*) Route sim-core accesses to hw devices through the sim_hw module.
*) Route hw device requests to abort/halt through the sim_hw module.
*) Add print parameter to hw_tree_print() function.
*) Add sim_engine_vabort () function.
1998-05-01 07:58:47 +00:00
Andrew Cagney
e7439596fc Add 2-result FP trace macro.
Dump hex value of floating-point numbers
1998-04-30 10:55:09 +00:00
Geoffrey Noer
9d45df1b8c Tue Apr 28 18:28:58 1998 Geoffrey Noer <noer@cygnus.com>
* common/aclocal.m4: call AM_EXEEXT in SIM_AC_COMMON, define
        AM_CYGWIN32 and AM_EXEEXT.
        * common/Make-common.in: set EXEEXT, add missing EXEEXTs
        to run and install-common rules.
        * common/configure: regenerate

And update all subdirectory ChangeLogs and configure files.
1998-04-29 01:44:23 +00:00
Andrew Cagney
f68cdf65e8 Clean up cell types. 1998-04-27 07:13:00 +00:00
Tom Tromey
56df89bcf6 * configure: Regenerated to track ../common/aclocal.m4 changes.
* config.in: Ditto.
	* acconfig.h (NEED_DECLARATION_PRINTF): Removed.
1998-04-26 21:39:16 +00:00