+
+ * sim-fpu.c (i2fpu): Keep the guard bits sticky when converting
+ large values.
+
+
+ * hw-tree.c, hw-properties.c, hw-instances.c: Include "sim-io.h".
+
+
+ * cgen-par.h (CGEN_BI_WRITE): New enumerator.
+ (bi_write): New union element.
+ (sim_queue_bi_write): New function.
+ * cgen-par.c (sim_queue_bi_write): New function.
+ (cgen_write_queue_element_execute): Handle CGEN_BI_WRITE.
+
+
+ * configure: Regenerated to track ../common/aclocal.m4 changes.
+
+ * aclocal.m4 (WERROR_CFLAGS, WARN_CFLAGS): Merge from
+ ../gdb/configure.in.
+ * Make-common.in (WERROR_CFLAGS, WARN_CFLAGS): Define.
+ (SIM_WERROR_CFLAGS, SIM_WARN_CFLAGS): Define.
+ (SIM_WARNINGS): Delete
+ (CONFIG_CFLAGS): Update.
+
+
+ * cgen-par.c: New file.
+ * cgen-par.h: New file.
+ * cgen-sim.h (cgen-par.h): #include it.
+ * cgen-cpu.h (write_queue): New field.
+ (CPU_WRITE_QUEUE): New access macro.
+ * Make-common.in (CGEN_MAIN_CPU_DEPS): Add cgen-par.h.
+ (cgen-par.o): New target.
+
+
+ * cgen-types.h (mode_type,MODE_VOID): Renamed from MODE_VM.
+ * cgen-utils.c (mode_names): Update.
+
+
+ * genmloop.sh: New args -parallel-generic-write, -parallel-only.
+ * cgen-engine.h (SEMANTIC_FN): Don't use version with PAREXEC
+ buffer arg if WITH_PARALLEL_GENWRITE.
+ (struct insn_sem): Handle WITH_PARALLEL_GENWRITE.
+ (struct idesc): Ditto.
+
+
+ * sim-model.c (model_option_handler): Add \n to error message.
+
+
+ * cgen-engine.h (SEM_FN_NAME,SEMF_FN_NAME): Delete.
+ (insn_sem): Rewrite.
+ (sem_fn_desc): New struct.
+ (idesc): Rewrite.
+ * genmloop.sh (scache case,@cpu@_scache_lookup): Profile scache hit,
+ misses if ! FAST_P.
+ (scache case): Split into non-parallel/parallel versions.
+ (@cpu@_engine_run_{full,fast}): Call @cpu@_{sem,semf}_init_idesc_table
+ if not use semantic switch version.
+
+
+ * cgen-defs.h (SEM_BRANCH_TYPE): New enum.
+ * cgen-engine.h (SEM_BRANCH_UNTAKEN,SEM_BRANCH_UNCACHEABLE): Delete.
+ (SEM_BRANCH_INIT_EXTRACT): Delete.
+ (SEM_BRANCH_INIT): Replace npc_ptr with br_type.
+ (SEM_BRANCH_FINI): Ditto.
+ (SEM_BRANCH_VIA_ADDR): Ditto.
+ (SEM_BRANCH_VIA_CACHE): Ditto. Delete cachvarptr arg.
+ (SEM_BRANCH_ADDR_CACHE): Delete.
+ (SEM_SKIP_COMPILE,SEM_SKIP_INSN): New macros.
+ * cgen-scache.h (cpu_scache): Replace member pbb_pr_npc_ptr with
+ pbb_br_type.
+ * genmloop.sh (eng.hin): Update prototype of ${cpu}_pbb_cti_chain.
+ (@cpu@_pbb_begin): Initialize branch_target.
+ (@cpu@_pbb_cti_chain): Replace arg new_vpc_ptr with br_type.
+ (@cpu@_engine_run_full): Replace local pbb_br_npc_ptr with
+ pbb_br_type.
+ (@cpu@_engine_run_fast): Ditto.
+
+
+ * cgen-utils.c (RORSI): New function.
+ (ROLSI): New function.
+
+
+ * Makefile.in (TAGS): Tweak TAGS regex.
+ * cgen-mem.h (*): Add TAGS markers.
+
+
+ * sim-resume.c (sim_resume): Ensure that the siggnal [sic] is only
+ passed in when sim_resume is first entered - don't re-pass it
+ after a restart.
+
+
+ * sim-options.c (standard_option_handler): Add OPTION_LOAD_VMA and
+ OPTION_LOAD_LMA but only when is defined.
+ (standard_options): When SIM_HANDLES_LMA is defined include
+ options --load-lma and --load-vma.
+ (standard_install): Initialize STATE_LOAD_AT_LMA_P.
+
+ * sim-base.h (STATE_LOAD_AT_LMA_P): Define.
+ (struct sim_state_base): Add load_at_lma_p.
+ * sim-hload.c (sim_load): Replace SIM_HANDLES_LMA with
+ STATE_LOAD_AT_LMA_P.
+
+
+ * nrun.c (main): Re-format loop gnu style.
+
+
+ * dv-sockser.c (connected_p): Initialize addrlen.
+
+
+ * cgen-accfp.c (floatsidf): New function.
+ (fixdfsi): New function.
+
+
+ * sim-model.c (sim_model_init): Issue error if machine is unsupported.
+
+
+ * Make-common.in (CGEN_MAIN_CPU_DEPS): Add cgen-fpu.h.
+ (cgen-fpu.o,cgen-accfp.o): Add rules for.
+ * cgen-fpu.c: New file.
+ * cgen-fpu.h: New file.
+ * cgen-accfp.c: New file.
+ * cgen-cpu.h (CGEN_CPU): New member fpu.
+ * cgen-mem.h: Redo fp support.
+ * cgen-ops.h: Delete k&r support. Redo fp support.
+ * cgen-sim.h: Include cgen-fpu.h.
+ * cgen-types.h (SF,DF,XF,TF): Moved to cgen-fpu.h.
+
+
+ * cgen-engine.h (TARGET_SEM_BRANCH_FINI): Remove cruft at end of
+ ifndef.
+ * genmloop.sh (@cpu@_scache_lookup): Delete unused local var.
+ (@cpu@_pbb_cti_chain): Minor clean up.
+
+
+ * aclocal.m4: Use AC_EXEEXT instead of AM_EXEEXT. Delete defn of
+ AM_CYGWIN32 and AM_EXEEXT.
+ * configure: Regenerate.
+
+
+ * sim-core.c (device_error,device_io_read_buffer,
+ device_io_write_buffer): Delete decls.
+ * sim-core.h: Put them here.
+
+ * sim-core.c (sim_core_read_buffer): Pass sd to device_io_read_buffer.
+ (sim_core_write_buffer): Pass sd to device_io_write_buffer.
+ * sim-n-core.h (sim_core_read_aligned_N): Ditto.
+ (sim_core_write_aligned_N): Ditto.
+
+
+ * sim-memopt.c (sim_memory_uninstall): Don't look into
+ free()d memory.
+
+
+ * cgen-utils.scm (virtual_insn_entries): Update attribute definition.
+
+
+ * sim-core.c (sim_core_read_buffer): Handle NULL cpu when WITH_DEVICES.
+ (sim_core_write_buffer): Ditto.
+
+
+ * sim-io.c (sim_io_poll_quit): Only call the poll_quit callback
+ after the interval counter has expired.
+ (POLL_QUIT_INTERVAL): Define. Used to tweak the frequency of
+ poll_quit callbacks. May be overridden by Makefile.
+ (poll_quit_counter): New global.
+ * sim-events.c: Remove all mentions of ui_loop_hook. The
+ host callback "poll_quit" will serve the purpose.
+ * run.c: Add definition of ui_loop_hook when NEED_UI_LOOP_HOOK
+ is defined.
+ * nrun.c: Remove declaration of ui_loop_hook.
+
+
+ * cgen-run.c (sim_resume): Don't tell main loop to run "forever"
+ if being used by gdb.
+
+
+ * cgen-types.h (XF,TF): Tweak.
+ * cgen-ops.h: Redo inline support. Delete DI_FN_SUPPORT,
+ in cgen-types.h.
+ (SUBWORD*,JOIN*): Define.
+ * cgen-trace.c (sim_cgen_disassemble_insn): Update, base_insn_bitsize
+ moved into cpu descriptor.
+ * sim-model.h (MACH): New member `num'.
+
+
+ * cgen-cpu.h (CGEN_DISASSEMBLER): New type.
+ (CGEN_CPU): Member opcode renamed to cpu_desc.
+ New members get_idata,disassembler.
+ * cgen-defs.h (CGEN_INSN_VIRTUAL_P): CGEN_INSN_ATTR renamed to
+ CGEN_INSN_ATTR_VALUE.
+ (CGEN_STATE): Delete member opcode_table.
+ (sim_disassemble_insn): Delete decl.
+ * cgen-engine.h (struct insn_sem): Moved to here from <cpu>-decode.c.
+ (struct idesc): Moved to here from <cpu>-decode.h.
+ * cgen-run.c (prime_cpu): Call prepare_run callback.
+ * cgen-trace.h (SFILE): New type.
+ (sim_disasm_sprintf): Declare.
+ (sim_disasm_read_memory,sim_disasm_perror_memory): Declare.
+ (sim_cgen_disassemble_insn): Declare.
+ * cgen-trace.c: Include errno.h,dis-asm.h. Don't include cpu-opc.h.
+ (insn_fields): Delete.
+ (trace_insn_fini): STATE_OPCODE_TABLE (sd) replaced with
+ CPU_CPU_DESC (cpu).
+ (trace_insn): Call CPU_DISASSEMBLER hook.
+ (sim_disasm_sprintf): New function.
+ (sim_disasm_read_memory): New function.
+ (sim_disasm_perror_memory): New function.
+ (sim_cgen_disassemble_insn): New function.
+ * cgen-utils.c: Don't include cpu-opc.h.
+ (virtual_insn_entries): New static local.
+ (cgen_virtual_insn_table): Renamed from cgen_virtual_opcode_table.
+ (cgen_insn_name): Rewrite.
+ (disasm_sprintf,sim_disassemble_insn): Moved to cgen-trace.c.
+ * cgen.sh (desc): New file generator handler.
+ * genmloop.sh: -parallel changed to -parallel-read/-parallel-write.
+ Define WITH_PARALLEL_READ/WITH_PARALLEL_WRITE appropriately.
+ Don't include cpu-opc.h,cpu-sim.h.
+ * sim-model.c (model_set): Delete SIM_DESC arg.
+ (sim_model_set): Update.
+ * sim-model.h (MACH): New member prepare_run.
+
+
+ * sim-memopt.c (memory_option_handler): Avoid memset() calls
+ if redundant with allocator functions.
+
+
+ * cgen-engine.h (EXTRACT_LSB0_{INT,UINT}): Fix.
+
+ * sim-profile.h: Make like sim-trace.h.
+ (PROFILE_USEFUL_MASK): New macro.
+ * sim-profile.c (profile_options): Make like trace_options, allow
+ optional on|off arg where applicable.
+ (set_profile_option_mask): New function.
+ (sim_profile_set_option): New function.
+ (profile_option_handler): Simplify.
+ Have -p only enable selected things, not everything.
+ Add missing break to OPTION_PROFILE_PC_RANGE.
+ * cgen-scache.c (scache_options): Allow optional on|off arg to
+ --profile-scache.
+ (scache_option_handler): Use sim_profile_set_option.
+
+
+ * sim-memopt.c (memory_options): Add MEMORY_FILL option.
+ (memory_option_handler): Implement MEMORY_FILL option. Make
+ MEMORY_CLEAR an alias for MEMORY_FILL=0.
+ (parse_ulong_value): New function.
+ (do_memopt_add): Allocate all buffers. Optionally fill them.
+
+
+ * hw-events.c (hw_event_queue_schedule): _vtracef takes a
+ va_list, not an integer.
+ * sim-events.c (sim_events_schedule): Likewise.
+
+ * sim-types.h (UNSIGNED32, UNSIGNED64): Properly cast to
+ the appropriate type.
+
+
+ * cgen-defs.h (PCADDR,CIA): Define in terms of IADDR.
+ (sim_disassemble_insn): Update prototype.
+ (sim_engine_invalid_insn): Ditto.
+ * cgen-engine.h (SEMANTIC_FN): Add !WITH_SCACHE version.
+ (SEM_BRANCH_INIT): PCADDR->IADDR.
+ (SEM_NBRANCH_FINI): New macro for !WITH_SCACHE case.
+ * cgen-scache.c (scache_lookup,scache_lookup_or_alloc): PCADDR->IADDR.
+ * cgen-scache.h (*): Ditto.
+ * cgen-trace.c (*): Ditto.
+ * cgen-trace.h (*): Ditto.
+ * cgen-utils.c (*): Ditto.
+ * cgen-types.h (integer modes): Use signedNN/unsignedNN types.
+ (insn_t): Delete.
+ * genmloop.sh (@cpu@_fill_argbuf): Add !WITH_SCACHE support.
+ (simple engine framework): Rewrite.
+ * sim-module.c (modules): Install model module sooner (and in
+ particular before the profile module).
+
+
+ * sim-model.h (sim_mach_lookup_bfd_name): Add prototype.
+ * sim-model.c (sim_mach_lookup_bfd_name): New function.
+ (sim_model_init): Call it.
+
+ * cgen-trace.c (trace_insn): Pass pc to trace_prefix for virtual insns.
+
+
+ * Make-common.in (CGEN_INCLUDE_DEPS): Add cgen-defs.h, cgen-engine.h.
+ * cgen-engine.h (SEM_BRANCH_FINI): New arg pcvar, all uses updated.
+ (SEM_BRANCH_INIT_EXTRACT): New macro.
+ (SEM_BRANCH_INIT): Add taken_p.
+ (TARGET_SEM_BRANCH_FINI): Provide default definition.
+ (SEM_BRANCH_FINI): Use it.
+ (SEM_INSN): Update.
+ * cgen-run.c (sim_resume): Handle tracing of last insn.
+ * cgen-scache.h (WITH_SCACHE): Define as 0 if not defined.
+ * cgen-trace.c (current_abuf): New static global.
+ (trace_insn_init): Initialize it.
+ (trace_insn_fini): Use it.
+ (trace_insn): Set it.
+ * cgen.sh (arch case): Pass -m ${mach} to cgen.
+ * genmloop.sh (@cpu@_emit_before): Only define if WITH_SCACHE_PBB.
+ (@cpu@_emit_after): Ditto.
+ (simple @cpu@_engine_run_full): New local `pc'. Initialize semantic
+ labels if WITH_SEM_SWITCH_FULL.
+ * sim-model.c: Include bfd.h.
+ (sim_model_init): New function.
+ (sim_model_install): Record init fn.
+ * sim-model.h (MACH): New member bfd_name.
+ * sim-module.c (modules): Initialize model before scache.
+
+
+ * dv-sockser.c (DEFAULT_TIMEOUT): Increase to 1 ms.
+
+ * nrun.c (main): Remain in simulation loop for traps and
+ exceptions when in operating environment mode.
+ (ui_loop_hook): New stub hook for standalone use.
+ * sim-events.c (sim_events_process): Call ui_loop_hook
+ periodically on CYGWIN host.
+
+ * sim-reason.c (sim_stop_reason): Return host signal numbers
+ to gdb on sim_stopped and sim_signalled cases.
+ * sim-engine.c (sim_engine_halt): Call SIM_CPU_EXCEPTION_SUSPEND
+ hook just before longjmp.
+ * sim-resume.c (sim_resume): Call SIM_CPU_EXCEPTION_RESUME
+ hook just before sim_engine_run.
+
+ * sim-n-core.h (sim_core_trace_M): Allay const warning.
+ * sim-trace.h (trace_generic): Ditto.
+ * sim-trace.c (trace_generic): Ditto.
+
+
+ * Make-common.in (SIM_MAIN_DEPS): New var.
+ (CGEN_MAIN_CPU_DEPS): New var.
+ * aclocal.m4: Add --enable-cgen-maint option.
+ * cgen-mem.h (GETMEM*): New arg `pc'. Pass to sim_core routine.
+ (SETMEM*): Ditto.
+ (GETIMEM*): Pass pc value to sim_core routine.
+
+
+ * hw-handles.c (hw_handle_add_ihandle, hw_handle_add_phandle):
+ Compare with ZERO not NULL.
+
+
+ * hw-properties.c, hw-instances.c, hw-tree.c: Include
+ "sim-assert.h".
+
+
+ * sim-arange.c: Include libiberty.h, and stdlib.h if present.
+ * sim-trace.c: Include stdlib.h if present.
+ * dv-sockser.c: Include unistd.h if present.
+ (dv_sockser_init): Add missing arg to call to sim_io_eprintf.
+ * cgen-scache.c (scache_flush): Delete unused locals i,sc.
+
* gennltvals.sh: Add i960.
(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.
+ * sim-profile.c (OPTION_PROFILE_*): Move into enum.
(profile_init): New function.
(profile_options): New option --profile-range.
(profile_option_handler): Handle --profile-range.
* sim-inline.c (SIM_INLINE_P): Fix typo.
-start-sanitize-gxsim
-
- * sim-gx-run.c (sim_engine_run): Use new tgx_info struct to
- collect run-time arguments to gx block.
- * sim-gx.h (sim_gx_function): Corresponding signature change.
-
- * sim-gx.c (sim_gx_compiled_block_f): Remove nonfunctional code to
- again compile a gx block source file.
- (sim_gx_compiled_block_dispose): Uninstall obsoleted gx block
- shared libraries.
- (sim_gx_block_translate): Always emit new "gx_label_NNNN" labels,
- for basic block entry points, even if !__GNUC__.
-
-end-sanitize-gxsim
* cgen-utils.c (cgen_virtual_opcode_table): Update.
* genmloop.sh (${cpu}_pbb_chain): Watch for Ctrl-C's.
(${cpu}_pbb_cti_chain): Ditto.
-start-sanitize-gxsim
-
- * sim-gx.c (sim_gx_block_translate): Generate computed
- goto for __GNUC__ instead of plain switch() for gx block
- entry. Lose "-g" compile option for gx block.
-
-end-sanitize-gxsim
* Make-common.in (cgen-utils.o): Depend on cgen-engine.h.
- (CGEN_ARCH_SCM): New variable.
* cgen-engine.h (EXTRACT_[ML]SB0_{INT,UINT}): New macros.
(EXTRACT_INT,EXTRACT_UINT): New macros.
(SEM_SEM_ARG): New macro.
(sim_disassemble_insn): Update prototype.
* cgen-trace.c (current_insn,insn_fields): New static locals.
(trace_insn): Set them.
- * cgen-utils.scm: #include cgen-engine.h.
+ * cgen-utils.c: #include cgen-engine.h.
(sim_disassemble_insn): New arg insn_fields.
Handle variable length insns.
* genmloop.sh: Only emit pbb decls if -pbb.
-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.
* config.in: Regenerated.
- * 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.
(cgen_cpu_max_extra_bytes): Declare.
* cgen-utils.c (cgen_cpu_max_extra_bytes): New function.
- * cgen.sh: s/@arch@/${arch}/ for cpu files.
-
* sim-cpu.h: New file. sim_cpu_base moved here.
Move sim_cpu_lookup decl here.
* sim-base.h: #include "sim-cpu.h".
- * Make-common.in (CGEN_MAIN_SCM): Update.
* aclocal.m4 (USE_MAINTAINER_MODE): New variable.
* cgen-sim.h (SEMANTIC_CACHE_FN): Delete.
(SEMANTIC_FN): Rewrite declaration.
(DECODE): Update type of semantic_fast member.
({EX,SEM}_FN_NAME): Have only one version.
- * cgen.sh: Support building cpu.c.
* sim-base.h (sim_state_base): Delete conditionals surrounding
member scache_size.
* cgen-sim.h (DECODE): Always use switch for `read' for now.
(PAREXEC): Renamed from PARALLEL_EXEC. All uses updated.
(SEMANTIC{,_CACHE}_FN): Fix return type.
- * cgen.sh (decode): Add s/@arch@/$arch/.
* genmloop.sh (@cpu@_engine_run): Delete `current_state'.
(engine_resume): Likewise. Make `engine' volatile. Save copy
of cpu pointer in volatile object. Initialize read switch if
MAX_NR_PROCESSORS.
(sim_engine_nr_cpus) sim-engine.c, sim-engine.h: New function
-
- * cgen.sh: Portably read parms past $9.
-
* Make-common.in (stamp-tvals): New rule.
-start-sanitize-cygnus
- * Make-common.in (cgen-{arch,cpu,decode}): New targets.
- * cgen.sh: New file.
-end-sanitize-cygnus
* cgen-scache.h: Deleted.
* Make-common.in (cgen-run.o,cgen-scache.o): Delete cgen-scache.h dep.
- (CGEN_CPU_SCM): Add sim-model.scm.
* cgen-scache.c: Only compile contents if WITH_SCACHE.
(scache_init): Use runtime computed size of SCACHE.
(scache_flush): Likewise.
* run.c, run.1: From sh directory.
-
-