Commit Graph

1610 Commits

Author SHA1 Message Date
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
ce82378189 Fix mips SWL on 64bit ISA when 32 bit word appears in second half of
64 bit bus.
Test.
1998-05-25 05:48:34 +00:00
Ron Unrau
aa81c3ca99 * Initial support for "sim list vif[01]" 1998-05-24 13:06:09 +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
32d41f6ddb Sanity clause 1998-05-22 02:08:26 +00:00
Andrew Cagney
56833aba59 Back out of hw-main _callback -> _descriptor changes 1998-05-22 01:12:06 +00:00
Gavin Romig-Koch
5e34097b8b gencode.c: Mark BEGEZALL as LIKELY. 1998-05-21 18:26:38 +00:00
Patrick Macdonald
fab0ee0d0b * interp.c: modified name of GIF device
* sky-gpuif.[ch]:  IMT burst support and queue manipulation ( see
	                   ChangeLog.sky for complete details )
	* sky-gs.c: modified name of GIF device
1998-05-21 15:41:35 +00:00
Andrew Cagney
26feb3a83d Fix sign extension on 32 bit add/sub instructions. 1998-05-21 09:32:07 +00:00
Andrew Cagney
8404825993 * interp.c (sim_fetch_register): Convert internal r5900 regs to
target byte order
1998-05-21 08:18:21 +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
Jillian Ye
e0459470a9 c_gen.pl: Added subroutine "print_comment"
and on/off option for "src line #"
1998-05-20 22:14:16 +00:00
Doug Evans
66f1864d7e * m32r-sim.h (PROFILE_COUNT_PARINSNS): New macro.
* mloopx.in (extract): Set abuf.addr for proper fill nop counting.
	(execute): Count parallel insns.
	* sim-if.c (print_m32r_misc_cpu): Print count.
	* sim-main.h (M32R_MISC_PROFILE): New member parallel_count.
1998-05-20 11:59:32 +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
6ebf4a9559 Zero bottom two bits of pc in jmp,jl insns.
* sem.c,sem-switch.c: Regenerate.
	* semx.c: Regenerate.
1998-05-20 07:54:31 +00:00
Doug Evans
6f1cadd0ce * cgen-ops.h (ADDCFSI): Fix typo. 1998-05-20 07:01:05 +00:00
Doug Evans
f99354d0c0 * sim-if.c (do_trap): Treat traps 2-15 as hardware does. 1998-05-19 23:52:23 +00:00
Doug Evans
496b3694af * sim/sky/sky.ld: Delete file. 1998-05-18 17:38:48 +00:00
Frank Ch. Eigler
3fa454e95f * Monster patch - may destablize MIPS sims for a little while.
* Followup patch for SCEI PR 15853
* First check-in of TX3904 interrupt controller devices for ECC. [sanitized]
* First implementation of MIPS hardware interrupt emulation.
Mon May 18 18:22:42 1998  Frank Ch. Eigler  <fche@cygnus.com>
	* configure.in (SIM_AC_OPTION_HARDWARE): Added common hardware
 	modules.  Recognize TX39 target with "mips*tx39" pattern.
	* configure: Rebuilt.
	* sim-main.h (*): Added many macros defining bits in
 	TX39 control registers.
	(SignalInterrupt): Send actual PC instead of NULL.
	(SignalNMIReset): New exception type.
	* interp.c (board): New variable for future use to identify
	a particular board being simulated.
	(mips_option_handler,mips_options): Added "--board" option.
	(interrupt_event): Send actual PC.
	(sim_open): Make memory layout conditional on board setting.
	(signal_exception): Initial implementation of hardware interrupt
 	handling.  Accept another break instruction variant for simulator
 	exit.
	(decode_coproc): Implement RFE instruction for TX39.
	(mips.igen): Decode RFE instruction as such.
start-sanitize-tx3904
	* configure.in (tx3904cpu,tx3904irc): Added devices for tx3904.
	* interp.c: Define "jmr3904" and "jmr3904debug" board types and
	bbegin to implement memory map.
	* dv-tx3904cpu.c: New file.
	* dv-tx3904irc.c: New file.
end-sanitize-tx3904
1998-05-18 15:55: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
17f382c9bf * erc32.c (close_port): Don't close stdin; it kills GDB.
(byte_swap_words): New function.
	* sis.h: (byte_swap_words): Declare.
	* interf.c (run_sim): Always fetch instructions as big-endian.
	* sis.c (run_sim): Ditto.
Move this c/l entry from ../ChangeLog.
1998-05-16 23:07:01 +00:00
Doug Evans
5f4c24c024 * sim-if.c (sim_stop): Update call to @cpu@_engine_stop.
(sim_sync_stop): New function.
1998-05-16 20:11:41 +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
882d99e4b6 * sim/m32r/allinsn.exp: Pass --m32rx-enable-special to gas.
* sim/m32r/misc.exp: Ditto.
1998-05-16 00:32:09 +00:00
Doug Evans
a8981d6751 * Makefile.in (devices.o): Add dependencies.
* arch.h,cpu.c,cpu.h,cpuall.h: Regenerate.
	* sem-switch.c,sem.c: Regenerate.
	* mloop.in (execute): Update calls to TRACE_INSN_{INIT,FINI}.
	* cpux.c,cpux.h,modelx.c,semx.c: Regenerate.
	* m32rx.c (m32rx_model_mark_{busy,unbusy}_reg): New functions.
	* mloopx.in (execute): Update calls to TRACE_INSN_{INIT,FINI}.
1998-05-15 23:46:24 +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
Mark Alexander
f1a0162a28 * sis.h (uint64, int64): Define.
* exec.c (SDIV, SDIVCC, UDIV, UDIVCC): Define new opcodes.
	* (mul64): Simplify calculation of negative result.
	* (div64): New helper function for 64-bit division.
	* (dispatch_instruction): Add emulation of SDIV, SDIVCC, UDIV,
	and UDIVCC.
1998-05-15 06:23:04 +00:00
Doug Evans
02a0ec918f Tweak last entry. 1998-05-15 00:49:37 +00:00
Doug Evans
90ef07f2e5 * config/default.exp (CC,SIM): Delete.
* sky-defs.tcl (LDSCRIPT,SIM): Delete.
	(run_trc_test): Use sim_compile, sim_run.  Only delete temp files
	if testcase passed.
	(run_brn_test): Ditto.
1998-05-15 00:49:24 +00:00
Doug Evans
1461afc634 * sim/sky/sky.exp: Add runtest_file_p support. Don't print
unsupported message if not sky.
	* sim/sky/sky_sce.exp: Likewise.
1998-05-14 20:20:59 +00:00
Doug Evans
41ab9a4b7e * lib/sim-defs.exp (sim_run): Fix handling of output redirection.
New arg prog_opts.  All callers updated.
1998-05-14 18:50:37 +00:00
Andrew Cagney
3e8c1f2e16 More test cases. 1998-05-14 08:15:05 +00:00
Gavin Romig-Koch
7d2c0e8c97 * r5900.igen: Replace the calls and the definition of the
function check_op_hilo_hi1lo1 with the pair
	check_mult_hilo_hi1lo1 and check_mult_hilo_hi1lo1.
1998-05-13 18:30:15 +00:00
Gavin Romig-Koch
afc5e7f23a * tx.igen (madd,maddu): Replace calls to check_op_hilo
with calls to check_div_hilo.
1998-05-13 18:14:09 +00:00
Gavin Romig-Koch
94dda41a0c * mips/mips.igen (check_op_hilo,check_mult_hilo,check_div_hilo):
Replace check_op_hilo with check_mult_hilo and check_div_hilo.
	Add special r3900 version of do_mult_hilo.
	(do_dmultx,do_mult,do_multu): Replace calls to check_op_hilo
	with calls to check_mult_hilo.
	(do_ddiv,do_ddivu,do_div,do_divu): Replace calls to check_op_hilo
	with calls to check_div_hilo.
1998-05-13 14:00:56 +00:00
Andrew Cagney
1a89994e08 * configure.in (SUBTARGET_R3900): Define for mipstx39 target.
Document a replacement.
1998-05-12 05:36:47 +00:00
Frank Ch. Eigler
24abdc9d31 * Fixing typo that caused infinite loop upon PKE MPG. 1998-05-11 16:15:22 +00:00
Doug Evans
801354e772 * lib/sim-defs.exp (sim_version): Simplify.
(sim_run): Implement.
	(run_sim_test): Use sim_run.
	(sim_compile): New proc.
1998-05-08 21:42:49 +00:00
Patrick Macdonald
55470cc7ef * Roll Alpha modifications into devo for sky-gpuif*/ sky-gs*/ interp.c
* Complete and informative details can be found in ChangeLog.sky
1998-05-07 19:14:28 +00:00
Frank Ch. Eigler
a1d609b4fe * Changes to sky PKE sim to calculate word-precision source-addresses
for VU memory tracking tables.

Thu May  7 12:15:41 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* sky-pke.c (pke_pcrel_operand_bits): Compute word-resolution
	source address for UNPACK into VU MEM.
	(pke_code_mpg): Ditto for MPG into VU uMEM.
1998-05-07 17:50:18 +00:00
Frank Ch. Eigler
53307c2301 * Finish dropping sim/txvu directory. 1998-05-07 14:39:08 +00:00
Ron Unrau
c939ffeb80 Initial Breakpoint support:
* sim-main.h: (struct _sim_cpu): add cur_device field.
          Define cur_device values, breakpoint value, and SIM_ENGINE_HALT_HOOK
        * interp.c (sim_open): initialize cur_device
        * sky-engine.c (engine_run): use cur_device to set current_cpu
        * sky-libvpe.c (vpecallms_cycle): add check for breakpoint
        * sky-hardware.h: delete NUMBER_CPUS
        * sky-hardware.c (attach_devices): create a memory mapped comm
          area for GDB/SIM interactions

misc:
        * sky-vu.c ({read,write}_vu_misc_reg): do default behavior for
          unknown regs instead of sim_io_error. MP reg is float (was missing
          cast).
1998-05-07 14:36:42 +00:00
Doug Evans
eb00d70698 * sim-main.h (INSN_NAME): New arg `cpu'. 1998-05-07 02:45:07 +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
d9fbbdfaa3 lotsa stuff, see ChangeLog 1998-05-06 22:39:35 +00:00
Doug Evans
40c680ba80 * sem-switch.c: Regenerate. Redo computed goto label handling.
* sem.c: Regenerate.  Call PROFILE_COUNT_INSN.
	* readx.c: Regenerate.  Redo computed goto label handling.
	* semx.c: Regenerate.  Call PROFILE_COUNT_INSN.  Finish profiling
	support.
	* Makefile.in (stamp-xcpu): Turn on profiling support.
1998-05-06 22:38:05 +00:00
Doug Evans
177dedfb88 * Makefile.in (m32r.o,mloop.o,cpu.o,model.o): Add decode.h dependency.
(m32rx.o,mloopx.o,cpux.o,modelx.o): Add decodex.h dependency.
	* decode.c,decode.h: Regenerate, introduces IDESC table.
	* mloop.in (extract16,extract32): Add IDESC support.
	Update names of semantic handler member names.
	(execute): Ditto.  Delete call to PROFILE_COUNT_INSN.
	* decodex.c,decodex.h: Regenerate, introduces IDESC table.
	* mloopx.in: Add IDESC support.
	Update names of semantic handler member names.
	Delete call to PROFILE_COUNT_INSN.
1998-05-06 22:37:14 +00:00