Commit graph

20544 commits

Author SHA1 Message Date
Andrew Cagney
232156dee9 o Add SIM_SIGFPE to sim-signals
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 09:50:36 +00:00
Andrew Cagney
a09a30d298 Allow reads/writes to C0_CONFIG register. 1997-11-20 09:17:06 +00:00
Ian Lance Taylor
942f33aeb1 * symbols.c (resolve_symbol_value): Add missing breaks in case on
symbol value operator.
1997-11-20 04:47:43 +00:00
Ian Lance Taylor
427a886ad1 rebuild 1997-11-20 04:46:19 +00:00
Doug Evans
c6475c41bb (enosys): Delete. 1997-11-20 00:50:40 +00:00
Doug Evans
ac1d2660b2 * callback.c (cb_host_to_target_stat): Fix return values. 1997-11-20 00:47:02 +00:00
Doug Evans
998d2c8275 * cgen-sim.h (enum_signal_type): Delete.
(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 20:44:35 +00:00
Doug Evans
62fb62925f * mem-ops.h: Rename SIM_SIG{ACCESS,ALIGN} to SIM_SIG{SEGV,BUS}.
* sim-if.c (sim_open): Call sim_config.
	(sim_stop_reason): Update call to sim_signal_to_host.
1997-11-19 20:18:56 +00:00
Doug Evans
398057b722 * sim-utils.c (sim_state_alloc): Call SIM_STATE_ALLOC if defined.
(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-19 20:13:11 +00:00
Michael Meissner
e163bbbf2a Do not include alloca-conf.h since alloca is not used. 1997-11-19 18:40:49 +00:00
Michael Meissner
eb5f3fcd1a Fix carry/overflow problems 1997-11-19 18:30:47 +00:00
Doug Evans
fccbeeb639 (sim_stop_reason): Add comment. 1997-11-19 08:10:40 +00:00
Doug Evans
a4b44a2b08 * sim-core.c (sim_core_signal): Use sim_stopped instead of
sim_signalled.
1997-11-19 08:03:53 +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
Ken Raeburn
35baf6dded vr5400 has interlocks 1997-11-19 07:25:47 +00:00
Doug Evans
13c9499d4e * sim-core.c (sim_core_signal): Use CIA_ADDR to fetch value.
* sim-break.c (sim_handle_breakpoint): Likewise.
1997-11-19 02:37:58 +00:00
Doug Evans
340d8e209e * sim-core.c (sim_core_signal): Use CIA_ADDR to fetch value. 1997-11-18 23:59:29 +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
590fc16693 * Makefile.in (SIM_OBJS): Use $(SIM_NEW_COMMON_OBJS). 1997-11-18 23:46:14 +00:00
Doug Evans
486740ce01 * Makefile.in (SIM_OBJS): Use $(SIM_NEW_COMMON_OBJS). 1997-11-18 23:40:40 +00:00
Doug Evans
d5d9a1e155 * sim-main.h (CIA_ADDR): Define.
* Makefile.in (SIM_OBJS): Use $(SIM_NEW_COMMON_OBJS).
1997-11-18 23:36:46 +00:00
Joern Rennecke
74f79ec566 * d10v-dis.c (print_operand):
Split OPERAND_FLAG into OPERAND_FFLAG and OPERAND_CFLAG.
Addendum for PR 13985.
1997-11-18 23:34:55 +00:00
Joern Rennecke
fe00b2ed0f * include/opcode/d10v.h (OPERAND_FLAG): Split into:
(OPERAND_FFLAG, OPERAND_CFLAG) .
	* opcodes/d10v-opc.c (OPERAND_FLAG): Split into:
	(OPERAND_FFLAG, OPERAND_CFLAG) .
	(FSRC): Split into:
	(FFSRC, CFSRC).
	* gas/config/tc-d10v.c (parallel_ok, find_opcode):
	Split OPERAND_FLAG into OPERAND_FFLAG and OPERAND_CFLAG.
Fix for PR 13985.
1997-11-18 19:41:44 +00:00
Doug Evans
38377b3a48 * Make-common.in (srccom): New variable. 1997-11-18 07:14:20 +00:00
Doug Evans
269a0e01c7 * Makefile.in (remote-sim.o): Depend on $(INCLUDE_DIR)/callback.h. 1997-11-17 23:36:16 +00:00
Doug Evans
9b51b3ddd3 Tweak comment. 1997-11-17 23:17:31 +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
Andrew Cagney
891703e5e8 Test SUBI omsn 1997-11-17 22:36:19 +00:00
Doug Evans
8d5306e718 * callback.h (CB_TARGET_DEFS_MAP): Renamed from target_defs_map.
(host_callback): Add stat, fstat, syscall_map, errno_map, open_map,
	signal_map, stat_map.
	(errn_map,open_map): Renamed to cb_init_foo_map.
	(cb_host_to_target_errno,cb_target_to_host_open): Renamed from
	host_to_target_errno,target_to_host_open.
	(cb_read_target_syscall_maps): Add prototype.
	(cb_target_to_host_syscall): Likewise.
	(cb_host_to_target_stat): Likewise.
	(cb_syscall): Likewise.
	(CB_SYS_{exit,open,close,read,write,lseek,unlink,getpid,kill,fstat,
	argvlen,argv,chdir,stat,chmod,utime,time}): Define.
	(CB_SYSCALL): New type.
	(CB_RC): New enum.
1997-11-17 22:12:52 +00:00
Jeff Law
bf39c4900e * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Fix typo.
(mn10300_elf_relax_section): Likewise.
1997-11-17 22:06:48 +00:00
Michael Meissner
7f7e2b0027 Make d30v defaults match chip 1997-11-17 01:21:37 +00:00
Fred Fish
469e5960b1 * peicode.h (coff_swap_aouthdr_in): Cast second arg of
bfd_h_get_* calls to "bfd_byte *".
1997-11-17 00:26:46 +00:00
Fred Fish
8d8693868c * config/obj-coff.c (fixup_segment): Cast second arg of
md_apply_fix3 call to type "valueT *".
1997-11-17 00:23:35 +00:00
Doug Evans
cf02c13ce2 (sim_core_signal): Add missing "\n" in message.
Forgot to check in yesterday.
1997-11-14 21:52:04 +00:00
Jeff Law
e7f1439940 * jv-exp.y (copy_exp, insert_exp): Avoid ANSI prototypes. 1997-11-14 20:02:46 +00:00
Andrew Cagney
f23e93dab0 * mips.igen: Tag vr5000 instructions.
(ANDI): Was missing mipsIV model, fix assembler syntax.
        (do_c_cond_fmt): New function.
        (C.cond.fmt): Handle mips I-III which do not support CC field
        separatly.
        (bc1): Handle mips IV which do not have a delaed FCC separatly.
        (SDR): Mask paddr when BigEndianMem, not the converse as specified
        in IV3.2 spec.
        (DMULT, DMULTU): Force use of hosts 64bit multiplication.  Handle
        vr5000 which saves LO in a GPR separatly.
        * configure.in (enable-sim-igen): For vr5000, select vr5000
        specific instructions.
        * configure: Re-generate.
1997-11-14 08:27:38 +00:00
Andrew Cagney
15ddb4c9ad Add FreeBSD/aout target confiiguration. Make it a 386BSD clone. 1997-11-13 22:21:36 +00:00
Doug Evans
9e8a900adf * sim-base.h (sim_state_base): Move `magic' to end of struct.
* 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.
1997-11-13 21:18:14 +00:00
Felix Lee
c7e3f734a7 * sim-n-core.h (sim_core_read_unaligned_N): illegal empty
initializer.
	* sim-types.h (unsigned128,signed128): fix typo for MSVC.
1997-11-13 18:45:21 +00:00
Gavin Romig-Koch
9bb4d38497 * mips.h (struct mips_opcode): Changed comments to reflect new
field usage.
	* mips-opc.c: Move the INSN_MACRO ISA value to the membership
	field for all INSN_MACRO's.
	* mips16-opc.c: same
	* config/tc-mips.c (macro_build): Use the membership field
	for INSN_MACRO's.
	(mips_ip): Same.
1997-11-13 16:13:03 +00:00
Michael Meissner
35cac98ab5 fix spacing 1997-11-13 15:38:23 +00:00
Michael Meissner
c2f766136e Add comment about code that is actually d10v specific instead of d30v 1997-11-13 15:11:56 +00:00
Michael Meissner
5d62f957a8 Add info command to print out flags values 1997-11-13 14:52:14 +00:00
Joern Rennecke
832ef2cca2 * config/tc-d10v.c (find_opcode): For OPCODE_FAKE, add check for
first argument if it's supposed to be a register.
PR 13952.
1997-11-13 02:19:13 +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
Doug Evans
15f5035c7d * aclocal.m4 (SIM_AC_OPTION_SCACHE): Fix typo.
Updating of configure's left for later.
1997-11-12 20:19:34 +00:00
Ian Lance Taylor
df1859da76 * ld-cdtest/cdtest-foo.h (class Foo): Declare len to be int to
avoid compiler warning.
	* ld-srec/sr3.cc (class Foo): Likewise.
1997-11-12 19:20:11 +00:00
Gavin Romig-Koch
cfcbe03ff7 mips-opc.c (sync,cache): These are 3900 insns. 1997-11-12 15:18:56 +00:00
Gavin Romig-Koch
42444087ff config/tc-mips.c (mips_4900): Added.
(hilo_interlocks): Added mips_4900.
(md_begin): Set default for mips_4900.
(macro_build,mips_ip): Test for INSN_4900 if mips_4900.
(md_longopts): Add "m4900" and "no-m4900".
(md_parse_option): Handle above options.
1997-11-12 15:09:33 +00:00
Joern Rennecke
3c7ad09f36 sh-opc.h (sh_table): Remove ftst/nan.
Fixes gcc/13330.
1997-11-12 00:02:37 +00:00