Commit graph

1358 commits

Author SHA1 Message Date
Andrew Cagney
eefc25e592 Allow more than just read, write and exec memory spaces in the core
module.
1998-03-11 12:18:39 +00:00
Andrew Cagney
10572b6a43 * sky-gdb.c (vu_option_handler): Delete unused local unit.
(log_option_handler): Delete extra arg from printf, twice.
* sky-pke.c (config.h): Include.
(string.h, strings.h): Include.
(pke_issue): Delete unused locals imm, num
* sky-libvpe.c: Pacify GCC.
* sky-gpuif.c (gif_io_write_buffer): Pacify GCC.
* sky-dma.c (config.h): Include.
(string.h, strings.h): Include.
(dma_io_read_buffer): Pacify GCC.
(dma_io_write_buffer): Pacify GCC.  Initialize pmem before first use.
(do_dma_transfer): Delete unused local variables qwbuf and local.
1998-03-11 11:57:55 +00:00
Gavin Romig-Koch
5fa71251a0 * vr4320.igen (clz,dclz) : Added.
(dmac): Replaced 99, with LO.
1998-03-10 15:37:24 +00:00
Andrew Cagney
e625962d8e Delete function sim_stop. 1998-03-10 05:05:44 +00:00
Doug Evans
bda9d8a33c * sim-base.h (sim_state_base): New member environment.
(STATE_ENVIRONMENT): New macro.
	* sim-config.c (current_environment): Delete.
	(sim_config_default): New function.
	(sim_config): Set STATE_ENVIRONMENT, not current_environment.
	* sim-config.h (current_environment,CURRENT_ENVIRONMENT): Delete.
	(sim_config_default): Add prototype.
	* sim-module.c (sim_pre_argv_init): Call sim_config_default.
	* sim-options.c (standard_option_handler, case OPTION_ENVIRONMENT):
	Set STATE_ENVIRONMENT, not current_environment.
1998-03-09 21:04:28 +00:00
Gavin Romig-Koch
d843d7ca34 * mips/vr4320.igen: Mark the insn in here as vr4320 only.
Reorder the insns.
1998-03-09 20:22:45 +00:00
Jim Wilson
c391655e30 Patch to fix irix6-x-mips64-elf simulator failures.
* sim-fpu.c (NR_GUARDS64): Change NR_PAD32 to NR_PAD64.
1998-03-09 19:59:52 +00:00
Frank Ch. Eigler
fd90908986 * Numerous changes & small bug fixes in PKE sim code and test suite.
for sim/testsuite/sky:

	* t-pke4.run: Removed test, since it succeeds yet returns a
 	non-zero exit code.

	* Makefile.in (RUNOPTS): Removed --memory-size flag, made
 	unnecessary by sim/mips/interp.c changes.
	(TESTS): Removed t-pke4.ok target.

	* t-pke3.trc: Classified tests with [---] indicators, to match
 	items up with entries documented in testplan.sgml.  Added numerous
 	additional tests.  They assert behavior that assumes certain
 	favorable answers to PKE question set #6 to SCEI.

	* t-pke1.trc: Added some [---] indicators.

  for sim/mips:

	* sky-pke.c (pke_issue): Revamped interrupt & stall code.  Assume
 	that ER1/ER0/PIS bits are only set if not masked by ERR bits.
  	Signal PIS only if unmasked.
	(pke_code_error): Signal ER1 only if unmasked.
	(pke_pc_fifo): Signal ER0 only if unmasked.
	(pke_code_unpack): Round up num_operands for last operand's
 	partial-word.  Factor out "R" bit handling for better coverage
 	analysis.  Fill upper words of a quadword with zeroes for Vn_m
 	UNPACK with n < 4.

	* sky-device.c (device_error): Made function accept varargs.

	* sky-device.h (device_error): Changed declaration to match.

	* interp.c (sim_open): Made 0x0000 area memory be an alias of
	the K0/K1 segments.  Sanitized code.
1998-03-06 22:46:40 +00:00
Andrew Cagney
6ba4c1539f Fix opcode fields in SHFL.* 1998-03-05 21:32:31 +00:00
Frank Ch. Eigler
370e0ef781 * Fixed a double-buffering bug in PKE, due to naive use of
complex macros with side-effects.  Gripes.
1998-03-05 20:23:59 +00:00
James Lemke
9ce23bf951 * interp.c (sim_open): Map 4M of memory at zero for SKY sim only. 1998-03-04 23:33:36 +00:00
Doug Evans
599bae2187 * Makefile.in (SIM_EXTRA_DEPS): Add cpu-opc.h.
(arch.o): Delete cpu-opc.h dependency.
	(decode.o,model.o): Likewise.
	(decodex.o,modelx.o): Likewise.
1998-03-04 21:22:09 +00:00
Doug Evans
83d9ce0029 * cpu.h,model.c,sem-switch.c,sem.c: Regenerate.
* cpux.h,decodex.[ch],modelx.c,readx.c,semx.c: Regenerate.
1998-03-04 20:14:51 +00:00
Frank Ch. Eigler
5068e793ef * Merely eliminated silly duplicated code, to raise test coverage.
* sky-pke.c (pke_issue): Move interrupt-handling into decode logic.
	(pke_code_*): Remove duplicated interrupt-handling code.
1998-03-04 19:14:03 +00:00
Ron Unrau
a859684b25 sim-main.h: track SKY register number changes from gdb
interp.c: ditto
1998-03-04 08:47:31 +00:00
Doug Evans
e4726e6dfc * sim-core.c (sim_core_attach): Use xmalloc instead of zalloc.
Use 0xa5 as initial value.
	(sim_core_map_detach): Use free instead of zfree.
Back out this change.
1998-03-04 02:05:06 +00:00
Gavin Romig-Koch
dd15abd5a6 * vr4320.igen: New file.
* Makefile.in (vr4320.igen) : Added.
	* configure.in (mips64vr4320-*-*): Added.
	* configure : Rebuilt.
	* mips.igen : Correct the bfd-names in the mips-ISA model entries.
	Add the vr4320 model entry and mark the vr4320 insn as necessary.
1998-03-03 17:03:57 +00:00
Andrew Cagney
ca6f76d135 Fix DIV, DIV1 (wrong check for overflow) and DIVU1 (shouldn't check
for overflow).
Pacify GCC.
1998-03-03 05:39:49 +00:00
Andrew Cagney
3cdda79a7c * sim-types.h (SIGNED32, SIGNED64): Pacify GCC.
* sim-alu.h (ALU64_BEGIN): Make alu64_r unsigned.
1998-03-03 05:34:31 +00:00
Doug Evans
aca1adeee5 Fix typos. 1998-03-03 01:54:22 +00:00
Doug Evans
40d160dd18 * Make-common.in (TAGS): Make smarter.
* Makefile.in (TAGS): Ditto.
1998-03-03 01:05:23 +00:00
Doug Evans
3d4e34140a * Make-common.in (TAGS): Make smarter. 1998-03-03 01:04:00 +00:00
Doug Evans
2307e0ee98 Good grief. Detailed function descriptions should accompany their definition. 1998-03-03 00:45:10 +00:00
Doug Evans
84fc6bd9df (sim_core_attach): Add a comment describing its function.
Tweak switch() sanity check.
1998-03-03 00:30:24 +00:00
Doug Evans
b9bcce6732 Improve comment. 1998-03-03 00:10:34 +00:00
Frank Ch. Eigler
f62dff78f9 * Continuing PKE sim unit tests. Found little bugs in VU instead.
* sky-vu1.c (vu1_io_write_register_window): Make CIA (pc) write
 	effective by updating more registers.

	* sky-libvpe.c: Updated to match earlier VU state-change code.

	* sky-vpe.h: Removed unused globals from declarations.
1998-03-03 00:00:09 +00:00
Frank Ch. Eigler
48c7100eba * Added more PKE unit tests. Coverage now at 90%.
* t-pke3.trc: Added FLUSH* / PKEMS* tests.
1998-03-02 23:57:35 +00:00
Doug Evans
0471756934 * sim-core.c (sim_core_attach): Revise last patch.
Use 0xa5 as initial value.
1998-03-02 23:03:32 +00:00
Doug Evans
de13b4cbdb * sim-core.c (sim_core_attach): Use xmalloc instead of zalloc.
(sim_core_map_detach): Use free instead of zfree.
1998-03-02 18:20:39 +00:00
Ron Unrau
8c6a2b75b9 add sky-gdb.c to sky_files 1998-03-02 14:43:52 +00:00
Ron Unrau
aac9328044 (find_match): recheck argv[argi] in multi-word match. Fixes crash when
subset words are alone on the command line.
1998-03-01 14:49:50 +00:00
Ron Unrau
aaab4e578d sky-gdb.c: new file - temporary demo version of the sim interface
sky-hardware.c: add sim commands
Makefile.in: build sky-gdb.c
1998-03-01 14:41:38 +00:00
Doug Evans
b0df95bbb3 * sim-module.c (*): Fix typos in assertion tests. 1998-02-28 03:01:52 +00:00
Andrew Cagney
baf8377df8 Pacify GCC: const char * passed to asprintf; int function returning
void; unused variable.
1998-02-28 03:01:51 +00:00
Andrew Cagney
0e701ac37b Add generic sim-info.c:sim_info() function using module mechanism.
Clean up compile probs in mips/vr5400.
1998-02-28 02:51:06 +00:00
Doug Evans
7c5d88c1bb * interp.c (DECLARE_OPTION_HANDLER): Use it.
(mips_option_handler): New argument `cpu'.
	(sim_open): Update call to sim_add_option_table.
1998-02-28 02:43:31 +00:00
Jeff Law
3406569f7f * simops.c (inc): Fix typo. 1998-02-28 01:41:28 +00:00
Frank Ch. Eigler
8accf4df14 * Updated build to allow srcdir != objdir. Tests still do not use dejagnu. 1998-02-27 21:58:44 +00:00
Frank Ch. Eigler
f0bb94cd67 * Major endianness fixes on sky code today. The milestone sample and existing
PKE tests run identically on SPARC/Solaris and x86/Linux.

	* sky-pke.c (pke_io_{read,write}_buffer): Endianness fixes aka
 	"E-fixes" in register and FIFO read/writes.
	(pke_code_{pkemscalf,pkemscal}): E-fixes in VU CIA setting.
	(pke_code_{mpg,unpack}): E-fixes in VU memory & tracking updates.
	(pke_code_direct): E-fixes in GPUIF FIFO stuffing.

	* sky-pke.h (PKE_MEM_WRITE): E-fixes in trace file writing.

	* sky-vu0.c (vu0_attach): Allocate micro/data memory with zalloc
 	to guarantee sufficient (16-byte) alignment.

	* sky-vu1.c (vu1_attach): Ditto.
	(vu1_io_read_register_window): *PARTIAL* E-fixes in register accesses.

	* sky-libvpe.c (gif_write): E-fixes in GPUIF FIFO stuffing.

	* sky-gpuif.c (gif_io_{read,write}_buffer): E-fixes in
 	register and FIFO read/writes.

	* sky-dma.c (do_dma_transfer_tag): E-fixes in tag reading.
1998-02-27 21:52:40 +00:00
Doug Evans
966df5804d * sim-base.h (sim_cpu_base): New members name, options.
(sim_cpu_lookup): Add prototype.
	* sim-module.c (sim_pre_argv_init): Provide default names for cpus.
	* sim-options.h (DECLARE_OPTION_HANDLER): New argument `cpu'.
	(sim_add_option_table): Update prototype.
	* sim-options.c (sim_add_option_table): New argument `cpu'.
	(standard_option_handler,standard_install): Update.
	(sim_parse_args): Handle cpu specific options.
	(print_help): New static function.
	(sim_print_help): Call it.  Print cpu specific options.
	(find_match): New static function.
	(sim_args_command): Call it.  Handle cpu specific options.
	* sim-utils.c (sim_cpu_lookup): New function.
	* sim-memopt.c (memory_option_handler): Update.
	(sim_memopt_install): Update.
	* sim-model.c (model_option_handler): Update.
	(model_install): Update.
	* sim-profile.c (profile_option_handler): Update.
	(profile_install): Update.
	* sim-trace.c (trace_option_handler): Update.
	(trace_install): Update.
	* sim-watch.c (watchpoint_option_handler): Update.
	(sim_watchpoint_install): Update.
	* cgen-scache.c (scache_option_handler): Update.
	(scache_install): Update.
1998-02-27 18:39:22 +00:00
Doug Evans
2e7236783e * mloopx.in: Fix handling of branch in parallel with another insn.
* semx.c: Regenerate.
1998-02-27 18:24:00 +00:00
Frank Ch. Eigler
d22ea5d001 * PKE unit testing continuing. Confusion over PKE1 double-buffering
mechanism is starting to subside.

	* sky-pke.h (PKE_FLAG_INT_NOLOOP): Added device flag to indicate
 	presence of stalled & interrupted PKEcode.

	* sky-pke.c (pke_issue): Added PKEcode interrupt bit handling.
	(pke_flip_dbf): Changed double-buffering logic to match SCEI
 	clarification.
	(pke_code_*): Added interrupt bit stalling clause.
	(pke_code_pkems*): Added ITOP/ITOPS transmission code.
	(pke_code_unpack): Added more careful logic for processing
 	overflows of VU data memory addresses.
1998-02-25 19:34:06 +00:00
Frank Ch. Eigler
574edea8b2 * Enlarged PKE testing mini bucket. Not yet converted to dejagnu. 1998-02-25 19:27:34 +00:00
Doug Evans
9495a61e55 * Makefile.in (RUNTEST): Fix path to runtest. 1998-02-25 19:02:58 +00:00
Andrew Cagney
f89c0689a1 Finish implementation of r5900 instructions. 1998-02-25 15:31:15 +00:00
Doug Evans
6cd37f1563 * Make-common.in (check): Run `make check' in testsuite dir. 1998-02-25 15:15:09 +00:00
Andrew Cagney
390ffa8935 Extend TRACE macros to include more cases.
Add MAX/MIN floating point functions.
Add max32, min32 floating point contstants.
1998-02-25 15:15:08 +00:00
Andrew Cagney
37d49885d3 Test r5900 floating point instructions. 1998-02-25 15:04:11 +00:00
Jeff Law
097e6924c2 * simops.c (signed multiply instructions): Cast input operands to
signed32 before casting them to signed64 so that the sign bit
        is propagated properly.
1998-02-25 08:58:23 +00:00
Doug Evans
c248113005 delete FIXME 1998-02-25 08:37:11 +00:00