o Implement generic halt/restart/abort module.
[deliverable/binutils-gdb.git] / sim / common / ChangeLog
index 06dd092a52657c8eb8bfb7d8057fc7773facdc2b..c2cc9246ca2882372fe56275d3e7c81be4b27f66 100644 (file)
@@ -1,3 +1,485 @@
+Mon May 19 12:07:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * sim-basics.h (transfer_type): New type.
+
+       * sim-core.c (sim_core_signal): New function. Print core signal
+       information.
+       (sim_core_find_mapping): Add transfer argument.
+
+       * sim-n-core.h (sim_core_{write,write}_unaligned_N): Call
+       SIM_CORE_SIGNAL if a recoverable abort.
+       * sim-core.c (sim_core_find_mapping): Ditto.
+
+Fri May 16 15:13:21 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * sim-core.c (sim_core_find_mapping): Replace calls to
+       sim_io_error to more resiliant sim_engine_abort.
+
+       * sim-n-core.h (sim_core_read_unaligned_N): Ditto.
+       (sim_core_write_unaligned_N): Ditto.
+
+Tue May 13 13:50:06 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * sim-module.c: Add sim_events_install to list.
+       
+       * sim-events.c (sim_events_install, sim_events_uninstall): Clonse
+       from sim_core_*.
+       (sim_events_init): Now returns SIG_RC.
+
+       * sim-run.c: New file. Generic sim_engine_run.
+       * sim-reason.c: New file. Generic sim_stop_reason.
+       * sim-stop.c: New file. Generic sim_stop.
+       * sim-resume.c: New file. Generic sim_resume.
+       
+       * Make-common.in (sim-engine.o): Add rule.
+       (sim-run.o, sim-reason.o, sim-stop.o, sim-resume.o): Ditto.
+       
+       * sim-engine.h, sim-engine.c: New file. Provide generic
+       implementation of sim_engine_halt, sim_engine_error. et.al.
+
+       * sim-base.h (sim_state_base): Add member halt.
+       (sim-engine.h): Include.
+
+       * sim-events.h (sim_event_handler): Always pass SIM_DESC to event
+       handlers.
+       * sim-events.c (sim_events_poll): Update event handler.
+
+Tue May 13 09:57:49 1997  Andrew Cagney  <cagney@b2.cygnus.com>
+
+       * sim-events.h, sim-events.c (sim_events_watch_clock): New
+       function.
+       (sim_events_watch_sim): New function.
+       (sim_events_watch_core): New function.
+       (sim_watch_valid): New function.
+       (sim_events_preprocess): New function.
+       (sim_events_process): Process the watchpoints as well as the timer
+       queue.
+       (sim_events_tick): Check WORK_PENDING instead of the hold queue.
+       (sim_events_deschedule): Check all the queues when removing an
+       event.
+       (sim_events_init): Ditto for cleaning.
+
+Mon May 19 12:07:22 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * sim-fpu.c (is_ufpu_number): Comment out - currently unused.
+
+Mon May 19 11:23:03 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * callback.c (os_open): Type of arg flags is int.
+
+Fri May 16 22:26:43 1997  Michael Meissner  <meissner@cygnus.com>
+
+       * sim-fpu.c (sim_fpu_is_{eq,ne,lt,le,gt,ge}): Compare Infinities
+       just like normal numbers as per IEEE rules.
+
+Wed May 14 21:20:38 1997  Bob Manson  <manson@charmed.cygnus.com>
+
+       * callback.c (os_close): Mark the descriptor as being
+       available if the close succeeded.
+       (os_open): Pass 0644 as the mode of the file being created.
+
+Thu May 15 10:58:52 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * sim-fpu.c (pack_fpu, unpack_fpu): New functions - decode a
+       float.
+
+       * sim-inline.c (SIM_INLINE_C): Rename from _SIM_INLINE_C_.
+       * sim-lnline.h: Update.
+
+       * sim-fpu.h, sim-fpu.c (sim_fpu_[iu]{32,64}to): New int2fp
+       conversion functions.
+       (sim_fpu_to{32,64}[iu]): New fp2int functions.
+       
+       * sim-fpu.h, sim-fpu.c (sim_fpu_is_{lt,le,eq,ne,ge,gt}): New fp
+       compare functions.  Replacing.
+       (sim_fpu_cmp): This. Delete.
+       
+Mon May 12 14:49:05 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * sim-core.c (sim_core_find_mapping): Call engine_error not
+       sim_io_error when possible.
+
+Mon May 12 08:55:07 1997  Andrew Cagney  <cagney@b2.cygnus.com>
+
+       * sim-endian.h (V1_H2): Add macro's to insert a word into a
+       high/low double word.
+
+       * sim-trace.h: Remove definition of attribute - defined in
+       sim_basics.h.
+
+Mon May 12 08:55:07 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * sim-options.h (struct OPTION): Add doc_opt as the documenting
+       name of the option - or family of options.
+
+       * sim-options.c (sim_args_command): Match command `a-b c' with
+       option `--a-b-c' from option table.
+
+Thu May  8 12:40:07 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * sim-options.c (sim_print_help): For optional arguments, wrap
+       them in [].
+
+       * sim-trace.c (set_trace_options): New function, handle optional
+       argument and multiple assignment.
+       (trace_option_handler): Update.
+
+       * sim-trace.c (trace_option_handler): Trace branch and not fpu
+       when branch tracing selected.
+
+Wed May  7 15:19:58 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * sim-trace.c (trace_one_insn): Make a va-args function.
+
+       * sim-trace.c (trace_vprintf): New function, va-arg version of
+       trace_printf.
+
+Tue May  6 16:38:16 1997  Doug Evans  <dje@canuck.cygnus.com>
+
+       * sim-trace.c (trace_uninstall): Don't close a file twice.
+       * sim-profile.c (profile_uninstall): Likewise.
+
+Tue May  6 06:14:01 1997  Mike Meissner  <meissner@cygnus.com>
+
+       * sim-trace.c (toplevel): Include bfd.h.
+       (trace_options): Note that --trace-linenum also turns on
+       --trace-insn.  Add --trace-{branch,semantics}.
+       (trace_option_handler): If --trace-linenum, also turn on
+       --trace-insn.  Add --trace-branch support.  If --trace-semantics,
+       turn on ALU, FPU, branch, and memory tracing.
+       (trace_one_insn): New function to trace an instruction.  Support
+       --trace-linenum.
+       (OPTION_TRACE_*): Use an enum, rather than lots of defines.
+
+       * sim-trace.h (TRACE_{SEMANTICS,BRANCH}_IDX): Add new macros.
+       (MAX_TRACE_VALUES): Use 32, not 12 by default.
+       (TRACE_branch): Add new mask.
+       (TRACE_*_P): Define all possible trace_p macros.
+       (trace_one_insn): Declare function.
+
+Mon May  5 14:08:34 1997  Mike Meissner  <meissner@cygnus.com>
+
+       * sim-trace.h (__attribute__): Define as nothing if not GNU C or
+       GNU C doesn't support __attributes__.
+       ({trace,debug}_printf): Add attribute's so -Wformat can check the
+       format strings.
+
+Mon May  5 11:16:12 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * sim-config.h (FORCED_ALIGNMENT): New alignment option -
+       addresses are masked forcing them to be correctly aligned.
+       (WITH_ALIGNMENT): Make NONSTRICT_ALIGNMENT the default.
+       * sim-config.c (config_alignment_to_a): Update.
+
+       * sim-core.h (sim_cpu_core): New data type contains cpu specific
+       core data.
+       * sim-base.h (CPU_CORE): Add cpu specific core data to cpu base
+       type.
+       * sim-core.c (sim_core_attach): Add CPU argument.  Ready for
+       processor specific core maps.
+       (sim_core_map_attach): Copy the core map data to each of the
+       processor specific core data structures.
+       * sim-core.c (sim_core_find_mapping): Update.
+
+       * sim-n-core.h (sim_core_read_N, sim_core_write_N): Rename.
+       (sim_core_write_aligned_N, sim_core_write_aligned_N): New names.
+       (sim_core_write_unaligned_N, sim_core_write_unaligned_N): New
+       alternatives that handle unaligned addresses.
+       (sim_core_{read,write}_{,un}aligned_N): Drop SIM_DESC arg, replace
+       with just CPU arg.
+       * cgen-utils.c (sim_disassemble_insn): Update.
+
+Mon May  5 13:19:16 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * sim-trace.h (TRACE_FPU_IDX): Add Floating-point specific
+       tracing.
+
+       * sim-fpu.h, sim-fpu.c: New files - prototype for generic target
+       fpu support.
+
+       * sim-inline.h, sim-inline.c: Add support for SIM_FPU.
+
+Fri May  2 17:59:42 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * sim-core.c (sim_core_map_to_str): New function ascii equivalent
+       to map type.
+       
+       * sim-n-core.h (sim_core_read_N, sim_core_write_N): Use in trace
+       statement.
+
+Fri May  2 17:28:02 1997  Andrew Cagney  <cagney@b2.cygnus.com>
+
+       * cgen-trace.c: Prepend additional trace_printf argument.
+
+       * cgen-utils.c (sim_disassemble_insn): Add additional core
+       arguments.
+
+Fri May  2 11:40:23 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * nrun.c (main): Catch/report errorenous simulator states.
+
+       * sim-module.c: #include "libiberty.h" so that xmalloc is defined.
+       * sim-trace.c: #include string.h/strings.h so that memset is
+       defined.
+       * sim-utils.c: Ditto.
+       * sim-profile.c: Ditto. And stdlib.h.
+       (print_bar): Only define when used by instruction or memory profiler.
+
+       * sim-options.c (standard_option_handler): Make ul more local.
+       
+       * sim-load.c (sim_load_file): Make the name constant.
+       (sim_load_file): Passify gcc.
+
+       * sim-utils.h: New file, pre-declare utilites in corresponding .c
+       file.
+       * sim-utils.c, sim-load.c: Include sim-utils.h.
+       
+       * sim-base.h (sim_cpu): Pre define here so available to all.
+
+       * sim-core.h (DECLARE_SIM_CORE_WRITE_N, DECLARE_SIM_CORE_READ_N):
+       Restore the sim_cpu and instruction_address arguments so that full
+       information is available to the abort function.
+       * sim-core.c (sim_core_find_mapping, sim_core_write_buffer): Ditto.
+       * sim-n-core.h (sim_core_write_N, sim_core_read_N): Update.
+
+       * sim-trace.h, sim-trace.c (trace_option_handler): Add interim
+       tracing support for sim-events and sim-core.
+       (trace_option_handler): Convert #if to if where possible so always
+       compiled/checked by C compiler.
+       * sim-n-core.h (sim_core_write_N, sim_core_read_N): Update.
+       
+       * sim-base.h: Adjust comment documenting how to define the cpu
+       structure.
+       (sim_state_base): Add sim_core and sim_events to simulator base
+       object.
+
+       * sim-trace.h, sim-trace.c (trace_printf): Add SIM_DESC argument.
+       * sim-core.c (sim_core_init, sim_core_attach,
+       sim_core_find_mapping): Update.
+       * sim-events.c (ETRACE, sim_events_init, sim_events_time,
+       update_time_from_event, insert_sim_event,
+       sim_events_schedule_after_signal, sim_events_deschedule,
+       sim_events_tick): Ditto.
+       
+       * sim-basics.h (sim-module.h, sim-trace.h, sim-profile.h,
+       sim-model.h): Move #includes from here.
+       * sim-base.h: To here.
+       (sim-core.h, sim-events.h, sim-io.h): Include also
+       
+Wed Apr 30 15:37:54 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * callback.c (default_callback): Missing initialisers.
+
+Thu May  1 10:40:47 1997  Doug Evans  <dje@canuck.cygnus.com>
+
+       * sim-utils.c (sim_add_commas): New function.
+       * sim-basics.h (sim_add_commas): Add prototype.
+       * cgen-scache.c (scache_print_profile): Print commas in numbers.
+       * sim-profile.c (COMMAS): New macro.
+       (print_*): Use it to print commas in numbers.
+
+       * configure: Regenerated.
+
+       * cgen-sim.h (sim_signal_type): Add SIM_SIGINT.
+       (cgen_state): New member run_fast_p.
+       (cgen_init): Add prototype.
+       (sim_disassemble_insn): New arg `cpu'.
+       * cgen-trace.c (trace_insn): Update call to sim_disassemble_insn.
+       * cgen-utils.c (cgen_init): New function.
+       (sim_disassemble_insn): New arg `cpu'.  Rewrite fetching of insn.
+       * genmloop.sh: Call engine_halt if loop exits.
+
+       * Makefile.in (sim-options_h): Define.
+       (sim-{module,options,trace,profile,utils}.o): Clean up dependencies.
+       (sim-model.o): Add new rule.
+       (cgen-{scache,trace,utils}.o): Add new rules.
+       * aclocal.m4 (SIM_AC_OPTION_{SCACHE,DEFAULT_MODEL}): Add.
+       * cgen-scache.c (scache_print_profile): Change `sd' arg to `cpu'.
+       Indent output by 2 spaces.
+       * cgen-scache.h (scache_print_profile): Update.
+       * cgen-trace.c (trace_insn_fini): Indent output by 2 spaces.
+       Use trace_printf, not fprintf.
+       (trace_extract): Use trace_printf, not cgen_trace_printf.
+       * genmloop.sh (!FAST case): Increment `insn_count'.
+       * sim-base.h (sim_state_base): Only include scache_size if WITH_SCACHE.
+       (sim_cpu_base): Rename member `sd' to `state' to be consistent with
+       access macro's name.
+       * sim-core.c (sim_core_init): Use EXTERN_SIM_CORE to define it.
+       Change return type to SIM_RC.
+       (sim_core_{install,uninstall}): New functions.
+       * sim-core.h (sim_core_{install,uninstall}): Declare.
+       (sim_core_init): Use EXTERN_SIM_CORE to define it.
+       Change return type to SIM_RC.
+       * sim-model.h (models,machs,model_install): Declare.
+       * sim-module.c (modules): Add scache_install, model_install.
+       (sim_post_argv_init): Set cpu->state backlinks.
+       * sim-options.c (standard_options): Delete --simcache-size,--max-insns.
+       (standard_option_handler): Likewise.
+       * sim-profile.c (PROFILE_{HISTOGRAM,LABEL}_WIDTH): Move to
+       sim-profile.h.
+       (*): Assume ANSI C.
+       (profile_options): Delete --profile-simcache.
+       (profile_option_handler): Likewise.
+       (profile_print_insn): Change `sd' arg to `cpu'.  Indent output 2
+       spaces.
+       (profile_print_{memory,model}): Likewise.
+       (profile_print_simcache): Delete.
+       (profile_print_speed): New function.
+       (profile_print): Rewrite.
+       * sim-profile.h (PROFILE_scache): Renamed from PROFILE_simcache.
+       (WITH_PROFILE_SCACHE_P): Renamed from WITH_PROFILE_SIMCACHE_P.
+       (PROFILE_DATA): Delete members simcache_{hits,misses}.
+       (PROFILE_COUNT_SIMCACHE_{HIT,MISS}): Delete.
+       (PROFILE_{CALLBACK,CPU_CALLBACK}): New types.
+       (profile_print): Update prototype.
+
+Wed Apr 30 11:34:14 1997  Doug Evans  <dje@canuck.cygnus.com>
+
+       * cgen-scache.[ch], cgen-sim.h: New files.
+       * cgen-trace.[ch], cgen-types.h, cgen-utils.c, genmloop.sh: New files.
+       * sim-model.c: New file.
+
+       * Make-common.in (clean targets): Undo patch of Apr. 22.
+
+Fri Apr 25 15:28:32 1997  Mike Meissner  <meissner@cygnus.com>
+
+       * sim-n-bits.h (signed): If we have a standard compiler, undef
+       signed, so that signedN is defined correctly.
+
+Thu Apr 24 00:00:07 1997  Doug Evans  <dje@canuck.cygnus.com>
+
+       * sim-module.h, sim-model.h, sim-profile.h: New files.
+       * sim-module.c, sim-profile.c: New files.
+       * Make-common.in (SIM_PROFILE): Define
+       (CONFIG_CFLAGS): Add $(SIM_PROFILE).
+       (sim_main_headers): Add sim-module.h, sim-model.h, sim-profile.h.
+       (sim_module.o,sim-profile.o): Add rules for.
+       * aclocal.m4 (--enable-sim-trace): Allow symbolic arguments.
+       (--enable-sim-profile): Add.
+       * configure: Regenerated.
+       * sim-base.h (sim_state_base): New members init_list, uninstall_list,
+       model.  Move trace and profile support to sim-{trace,profile}.h.
+       New members trace_data, profile_data.
+       * sim-basics.h: #include sim-module.h, sim-model.h, sim-profile.h.
+       * sim-config.h: Provide default definition of WITH_PROFILE.
+       (WITH_TRACE): Change default to -1.
+       (MAX_NR_PROCESSORS): Always define.
+       * sim-options.c: Move trace and profile support to
+       sim-{trace,profile}.h.
+       (sim_pre_argv_init): Moved to sim-model.c.
+       (standard_install): New function.
+       * sim-options.h (sim_pre_argv_init): Move decl to sim-model.c.
+       (standard_install): Declare.
+       * sim-trace.c: Tracing option handling moved here from sim-options.c.
+       (trace_install, trace_uninstall): New functions.
+       (trace_printf): Update reference to TRACE_FILE.
+       * sim-trace.h (TRACE_FOO_IDX): Moved here from sim-base.h.
+       (TRACE_foo): Bit masks for symbolic arguments to --enable-sim-trace.
+       (WITH_TRACE_FOO_P): Define.
+       (trace_install): Declare.
+       (TRACE_DATA): New struct.
+
+Wed Apr 23 17:23:15 1997  Doug Evans  <dje@canuck.cygnus.com>
+
+       * run.c: Undo last exec_bfd patch.
+       (main): Only pass -E ifdef SIM_HAVE_BIENDIAN.
+
+Wed Apr 23 17:54:27 1997  Mike Meissner  <meissner@cygnus.com>
+
+       * run.c (exec_bfd): Add back in.
+       (main): Set exec_bfd.
+
+Tue Apr 22 14:43:46 1997  Doug Evans  <dje@canuck.cygnus.com>
+
+       * sim-load.c (sim_load_file): #include <stdio.h> for NULL.
+
+Wed Apr 23 02:55:54 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * sim-events.c (insert_sim_event): Call sim_io_error instead of
+       less well defined engine_error.
+       * sim-core.c: Ditto.
+
+Tue Apr 22 08:48:16 1997  Stu Grossman  (grossman@critters.cygnus.com)
+
+       * Make-common.in:  Change clean targets to use :: so that other
+       Makefiles can have their own clean targets.
+       * sim-load.c (xprintf eprintf):  Use ANSI_PROTOTYPES instead of
+       __STDC__ to control use of stdarg vs. varargs syntax.  Some
+       systems can't use __STDC__, but require stdarg.
+
+Fri Apr 18 11:14:43 1997  Doug Evans  <dje@canuck.cygnus.com>
+
+       * sim-options.c (standard_options): Add --endian.
+       (standard_option_handler): Likewise.
+
+       * nrun.c: #include <signal.h>.
+       (main, cntrl_c): Wrap calls to sim_resume in a SIGINT
+       handler that calls sim_stop ().
+
+Fri Apr 18 13:11:36 1997  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * run.c (main, cntrl_c): Wrap calls to sim_resume in a SIGINT
+       handler that calls sim_stop ().  Simulators may still be
+       establishing their own handler.
+
+       * sim-events.c (sim_events_poll): Rename from
+       sim_events_at_large_int.  Poll IO.
+
+       * sim-io.c (sim_io_poll_quit): New function - pass on a polling
+       request.
+
+       * callback.c (os_poll_quit): New function poll for quit signal
+       where needed.
+       (default_callback): Include magic number.
+
+Thu Apr 17 02:25:11 1997  Doug Evans  <dje@canuck.cygnus.com>
+
+       * aclocal.m4: Check for headers time.h, sys/time.h, sys/resource.h.
+       Check for functions getrusage, time.
+       * sim-basics.h (SIM_ELAPSED_TIME): New typedef.
+       (sim_elapsed_time_get, sim_elapsed_time_since): Add prototypes.
+       * sim-utils.c: #include time.h, sys/time.h, sys/resource.h if able.
+       (sim_elapsed_time_get, sim_elapsed_time_since): New functions.
+
+       * sim-utils.c (sim_copy_argv, sim_analyze_program): New functions.
+
+       * sim-options.c, sim-options.h: New files.
+       * sim-config.h (WITH_DEBUG): Provide default value of zero.
+       * Make-common.in (nrun.o): Add rules for.
+       * nrun.c: New file.
+
+       * run.c (main): Check return value of sim_open.
+
+       * Make-common.in (sim-options.o, sim-load.o, sim-trace.o): Add rules.
+       (sim_main_headers): Add sim-trace.h.
+       * run.c (exec_bfd, target_byte_order): Delete.
+       (main): Pass -E <endian> to sim_open.  Delete code to load sections,
+       call sim_load instead.  Check return code of sim_create_inferior.
+       * sim-base.h (CURRENT_STATE): Define.
+       (sim_state_base): Make typedef.  New members options, prog_argv,
+       prog_bfd, text_{section,start,end}, start_addr, simcache_size,
+       mem_size, memory [+ corresponding access macros].
+       (sim_cpu_base): New typedef.
+       * sim-trace.h: New file.
+       * sim-trace.c: New file.
+       * sim-basics.h: #include it.
+       * sim-load.c: New file.
+
+Tue Apr 15 15:10:13 1997  Ian Lance Taylor  <ian@cygnus.com>
+
+       * Make-common.in (INSTALL): Set to @INSTALL@.
+       (INSTALL_XFORM, INSTALL_XFORM1): Remove.
+       (install-common): Depend upon installdirs.  Use
+       $(program_transform_name) directly, rather than using
+       $(INSTALL_XFORM).
+       (installdirs): New target.
+       * Makefile.in (INSTALL): Set to @INSTALL@.
+       (INSTALL_XFORM, INSTALL_XFORM1): Remove.
+       (install-man): Depend upon installdirs.  Use
+       $(program_transform_name) directly, rather than using
+       $(INSTALL_XFORM).
+       (installdirs): New target.
+
 Tue Apr 15 15:08:12 1997  Andrew Cagney  <cagney@b1.cygnus.com>
 
        * sim-assert.h (SIM_ASSERT, ASSERT): Allow these macros to
This page took 0.027144 seconds and 4 git commands to generate.