aboutsummaryrefslogtreecommitdiff
path: root/sim/common
AgeCommit message (Collapse)AuthorFilesLines
1998-01-20sanitize keep-cygnus cgen generationDoug Evans3-1/+41
1998-01-19 * Make-common.in (cgen-{arch,cpu,decode}): New targets.Doug Evans4-3/+220
* 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 * sim-base.h (sim_state_base): Delete member `model'.Doug Evans1-45/+524
(sim_cpu_base): Add member `model'. * sim-model.h (IMP_PROPERTIES): New type. (MACH): New members imp_props, models. (models): Delete decl. * sim-model.c (set_model): Update. * sim-profile.c (profile_print_model): Update.
1998-01-19 * sim-utils.c (sim_state_alloc): Delete setting of cpu backlink here.Doug Evans1-0/+29
1998-01-19Fix comment.Doug Evans1-0/+78
1998-01-16replaced call to CGEN_INSN_SYNTAX()->mnemonic with CGEN_INSN_MNEMONIC()Nick Clifton2-9/+23
1997-12-05 * Make-common.in (sim-core.o): Depend on $(sim_main_headers).Doug Evans1-0/+6
* sim-config.h (WITH_TREE_PROPERTIES): Define as 0. * sim-config.c (sim_config): Replace WITH_DEVICES with WITH_TREE_PROPERTIES.
1997-12-04Regenerate configure files.Doug Evans1-0/+4
1997-12-04 * Make-common.in (SIM_ENVIRONMENT): New variable.Doug Evans5-110/+222
(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-11-30Delete sim_io_syscalls and sim_io_getstringMichael Meissner1-0/+5
1997-11-29Switch to using cb_syscall; Fix bug in cb_syscall writeMichael Meissner1-0/+3
1997-11-29Fix problems with d30v addc/subbMichael Meissner2-203/+398
1997-11-28 * gennltvals.sh: Redo syscall support to allow sanitization.Doug Evans2-1/+36
* nltvals.def: Regenerated. And add d30v sanitization.
1997-11-26 * Make-common.in (run.o): Depend on remote-sim.h.Doug Evans1-0/+4
(nrun.o,sim-hload.o,sim-hrw.o): Likewise. (sim-io.o,sim-reason.o,sim-resume.o): Likewise.
1997-11-26Flush writes to stdout, stderrMichael Meissner2-2/+13
1997-11-26* sim-io.c (sim_io_getstring): Delete unused len2. (sim_io_syscalls):Andrew Cagney2-2/+5
Ditto for sys_errno.
1997-11-26Delete magic number FIXME.Doug Evans1-2/+0
1997-11-26Undo last change. callback.h changed instead.Doug Evans2-13/+9
Plus: * syscall.c (cb_syscall): Test CB_SYSCALL struct magic number.
1997-11-26 * syscall.c (cb_syscall, cases stat, fstat): Handle -Wall -Werror.Doug Evans2-2/+12
1997-11-26nuke lseekMichael Meissner2-56/+224
1997-11-25Add comment.Doug Evans1-0/+2
1997-11-25 * callback.c (os_stat): Make 3rd arg a host struct stat ptr.Doug Evans2-38/+216
(os_fstat): Likewise. Validate fd argument. (cb_host_to_target_stat): Delete big_p arg. If HS arg is NULL, just compute target stat struct length. * syscall.c: #include "libiberty.h", <sys/types.h>, <sys/stat.h>. (ENOSYS,ENAMETOOLONG): Provide definitions if missing. (get_string): Return host errno values so they can be properly translated later. (cb_syscall): Likewise. (cb_syscall, cases open,unlink): Use get_path instead of get_string. (cb_syscall, case read): Use read_stdin for file descriptor 0. (cb_syscall, case write): Use write_stderr for file descriptor 2. (cb_syscall): Add cases for lseek, unlink, stat, fstat, time. (get_path): New function.
1997-11-25 * gennltvals.sh: Generate syscall values for d30v.Doug Evans3-0/+305
Use libgloss/syscall.h for sparc. * nltvals.def: Regenerate.
1997-11-24Add sim_io_syscalls to do common system call emulationMichael Meissner1-0/+10
1997-11-24 * sim-trace.c (trace_option_handler): Set state trace fileDoug Evans2-24/+51
for --trace-file in addition to cpu's values. (trace_vprintf): If cpu == NULL, try state's trace file.
1997-11-24Entries for .gdbinit additions and sim-model.c option fix.Doug Evans1-0/+5
1997-11-24 * sim-model.c (model_options): Use '\0' for `shortopt'.Doug Evans1-0/+2
1997-11-24 * Make-common.in (all): Add .gdbinit.Doug Evans1-0/+3
* gdbinit.in: Add dump command.
1997-11-24 * sim-core.c (sim_core_signal): Fix spelling error in message.Doug Evans1-0/+6
* sim-hrw.c (sim_read): Use read map, not write map.
1997-11-23Change MIPS simulator so that it uses the (software) module sim_fpuAndrew Cagney1-1/+6
for floating point operations. Eliminates all dependencies the simulator had on the hosts FP implemantation. Add sim_fpu_{inv,abs,neg} functions to sim_fpu.[hc]
1997-11-22Clarify meaning of sim_signalled's SIGRC argument. Document that thisAndrew Cagney2-0/+13
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-20Pacify GCC - SIM_SIGNONE missing in enum, xmalloc/free VS ZALLOC/zfree.Andrew Cagney2-0/+8
1997-11-20o Add SIM_SIGFPE to sim-signalsAndrew Cagney2-0/+13
o Start SIM_SIG* at 64 so that the use of host signal numbers can be detected and reported. o Update MIPS simulator to use sim-signal.
1997-11-20(enosys): Delete.Doug Evans1-1/+0
1997-11-20 * callback.c (cb_host_to_target_stat): Fix return values.Doug Evans2-3/+8
1997-11-19 * cgen-sim.h (enum_signal_type): Delete.Doug Evans1-0/+6
(engine_signal): Update prototype. * cgen-utils.c: Don't include <signal.h>. (sim_signal_to_host): Delete, lives in sim-signal.c now. (engine_signal): Update.
1997-11-19 * sim-utils.c (sim_state_alloc): Call SIM_STATE_ALLOC if defined.Doug Evans1-0/+8
(sim_state_free): Call SIM_STATE_FREE if defined. * sim-module.c (sim_module_install): Don't leave any modules installed if one fails to install.
1997-11-19Do not include alloca-conf.h since alloca is not used.Michael Meissner1-0/+3
1997-11-19Fix carry/overflow problemsMichael Meissner1-0/+8
1997-11-19(sim_stop_reason): Add comment.Doug Evans1-0/+5
1997-11-19 * sim-core.c (sim_core_signal): Use sim_stopped instead ofDoug Evans2-2/+5
sim_signalled.
1997-11-19 * sim-signal.c, sim-signal.h: New files.Doug Evans8-13/+206
* 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 * sim-core.c (sim_core_signal): Use CIA_ADDR to fetch value.Doug Evans2-1/+2
* sim-break.c (sim_handle_breakpoint): Likewise.
1997-11-18 * sim-core.c (sim_core_signal): Use CIA_ADDR to fetch value.Doug Evans2-3/+2
1997-11-18 * Make-common.in (SIM_NEW_COMMON_OBJS): New variable.Doug Evans3-2/+51
* sim-base.h (CIA_ADDR): Provide default definition.
1997-11-18* Make-common.in (srccom): New variable.Doug Evans2-105/+108
1997-11-17Tweak comment.Doug Evans1-2/+3
1997-11-17 * Make-common.in (DEP, COMMON_DEP_CFLAGS): Define.Doug Evans5-64/+644
(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-14(sim_core_signal): Add missing "\n" in message.Doug Evans1-4/+7
Forgot to check in yesterday.
1997-11-13 * sim-base.h (sim_state_base): Move `magic' to end of struct.Doug Evans2-10/+32
* sim-base.h (sim_state_base): Add member trace_data. (STATE_TRACE_DATA): New macro. * sim-trace.h (TRACE_DEBUG_IDX,TRACE_debug): New macros. ({WITH_,}TRACE_DEBUG_P): New macros. (STATE_TRACE_FLAGS,STRACE_P,STRACE_DEBUG_P): New macros. (_sim_cpu): Delete forward reference. (debug_printf): Update. * sim-trace.c (OPTION_TRACE_DEBUG): Define. (trace_options): Add --trace-debug. (set_trace_options): Handle it. (trace_option_handler): Likewise. (trace_install): Init state trace_data struct. (trace_uninstall): Close state trace file. * sim-events.c (ETRACE): Only print source file and number if --trace-debug. * sim-n-core.h (sim_core_trace_M): Likewise. * sim-core.c (sim_core_signal): Add missing "\n" in message.