Commit Graph

1786 Commits

Author SHA1 Message Date
Andrew Cagney
ea5d84f5dc Add EXTEND11(). 1998-04-15 13:50:50 +00:00
Andrew Cagney
f3bdd368ea Debug tx19 built from igen sources.
Rework ifetch{16,32} to match the more recent do_load function.
1998-04-15 07:23:28 +00:00
Andrew Cagney
7acc4e98d2 Define EXTEND15(). 1998-04-15 06:45:19 +00:00
Andrew Cagney
93f967158f Define EXTEND4() and EXTEND5(). 1998-04-15 00:06:50 +00:00
John Metzler
5d71b4bc92 Tue Apr 14 16:31:35 1998 John Metzler <jmetzler@cygnus.com>
* sim-memopt.c (parse_addr): Sunos 4.5 does not hane strtol
 	declared so we need this cast to prevent long long addresses
	from being misconfigures. Results in access to unmapped memory.
1998-04-14 23:36:19 +00:00
Doug Evans
489564e28b * sim/m32r/maclh1.cgs: Fix testcase.
* sim/m32r/maclh1-2.cgs: New testcase.
1998-04-14 21:09:35 +00:00
Doug Evans
94a5989b24 * semx.c: Regenerate.
PR 15693.
1998-04-14 21:07:45 +00:00
Doug Evans
b42e7eb361 * Make-common.in (RUNTESTFLAGS): Define.
(check): Pass RUNTESTFLAGS to recursive make.
1998-04-14 20:22:07 +00:00
Ian Carmichael
ac137dc872 * Added interactive debugging for vector units, and a bunch of minor
* things.  See ChangeLog.sky for details.
*
* Modified Files:
*    .Sanitize ChangeLog.sky Makefile.in sky-libvpe.c sky-vu.c
*    sky-vu.h sky-vudis.c sky-vudis.h
* Added Files:
*    sky-indebug.c sky-indebug.h sky-interact.c sky-interact.h
*    sky-console.c sky-console.h
1998-04-14 19:58:36 +00:00
Jillian Ye
c6ae153421 c_gen.pl: Change to use data type "int" instead of "long int" in
function perform_test_read_only.
1998-04-14 16:25:44 +00:00
Andrew Cagney
c0a4c3ba17 Implement 32 bit MIPS16 instructions listed in m16.igen. 1998-04-14 14:34:48 +00:00
Andrew Cagney
7bf341f4a8 * sim-info.c (sim_info): Be verbose when either VERBOSE or STATE_VERBOSE_P. 1998-04-14 05:16:31 +00:00
Andrew Cagney
aba672aac5 * mn10300_sim.h: Declare all functions in op_utils.c using INLINE_SIM_MAIN.
* op_utils.c: Ditto.
* sim-main.c: New file.  Include op_utils.c.
1998-04-14 04:26:04 +00:00
Andrew Cagney
13eaae2fd0 Broke parsing of !<val>!<val> when adding support for =<field>. Fix.
Add support for the -S<suffix> option.
1998-04-14 04:24:47 +00:00
Andrew Cagney
1e23866b9b o Use new !<field>' and =<field>' operators in spec of
MOV and CMP instructions.
o	Enable basic inlining.  Diable use of SIM_MAIN_INLINE.
1998-04-14 00:59:30 +00:00
Andrew Cagney
346a3d6c11 Add support for instruction word conditionals of the form `XXX!YYY'
and XXX=YYY'.  See mn10300 for examples.
1998-04-14 00:00:15 +00:00
Frank Ch. Eigler
1e83118b79 * COP2 testing changes.
[ChangeLog]

Mon Apr 13 16:51:00 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* Makefile.in (*): Added .vuout/.vuexpect/.vuok test targets
	for confirming VU instruction trace.
	(t-cop2): Test COP2 sim using above facility.

	* t-cop2.vuexpect: New file.
1998-04-13 20:55:26 +00:00
Frank Ch. Eigler
96a4eb30da * Fixed a one-character typo in COP2 instruction synthesis.
[ChangeLog]
	Mon Apr 13 16:28:52 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* interp.c (decode_coproc): Add proper 1000000 bit-string at top
	of VU lower instruction.
1998-04-13 20:31:29 +00:00
Doug Evans
e0a85af6eb * cpu.h,decode.c,decode.h,extract.c,sem.c,sem-switch.c: Regenerate.
* cpux.h,decodex.c,decodex.h,readx.c,semx.c: Regenerate.
Main change is to remove ordinal from format names.
1998-04-11 01:26:47 +00:00
Frank Ch. Eigler
b0b39eb2de * Backed out week-old attempt at enabling quadword memory access on
MIPS sim; added PKE sim code fixes.  No COP2 testing progress today.

[ChangeLog]

Thu Apr  9 16:38:23 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* r5900.igen (LQC,SQC): Adapted code to DOUBLEWORD accesses
	instead of QUADWORD.

	* sim-main.h: Removed attempt at allowing 128-bit access.

[ChangeLog.sky]

Thu Apr  9 16:42:54 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* sky-pke.c (read_pke_pc): Corrected PKE PC calculation
	to word granularity.
1998-04-09 20:56:00 +00:00
Frank Ch. Eigler
e5cccb7177 * Added one PKE test after finding unexpected #### for a block of
code in gcov output.
1998-04-09 20:31:18 +00:00
Jillian Ye
ef23b3efd1 c_gen.pl : Added handling for data from GIF path1/2/3 FIFO. 1998-04-09 17:06:19 +00:00
Ian Carmichael
05c29245c9 * Fixed testcase. 1,$ s/ITOP 412/ITOP 421/ 1998-04-09 03:57:20 +00:00
Ian Carmichael
7dba069e20 * Fixed up blank lines in file. 1998-04-09 03:24:13 +00:00
Ian Carmichael
2fd7c40770 * Temporarily change LOADDRMASK in sky build. 1998-04-09 03:17:43 +00:00
Mark Alexander
ecd4a90b86 * erc32.c (sim_stop): Handle SIGINT gracefully.
* interf.c (sim_open): Don't catch SIGINT; GDB will do that for us.
1998-04-09 02:40:31 +00:00
Mark Alexander
e2324e2944 * exec.c (dispatch_instruction): Change how carry out is calculated
in DIVSCC.  Add emulation of SMULCC, UMUL, and UMULCC.
1998-04-09 01:42:44 +00:00
Frank Ch. Eigler
11c47f314b * R5900 sky COP2 testing continuing. Today only small
VCALLMS-related were found/fixed.

[ChangeLog.sky]

	* sky-vu.c ({read,write}_vu_special_reg): Add CMSAR[01] as special
 	registers for a VU.  Behavior not as mandated.
	({read,write}_vu_{misc,special}_reg): Create sim_io_error upon
	access to unknown register.  Behavior not as mandated.

	* sky-vu.h (anonymous register numbering enum): Add CMSAR[01].

	* sky-libvpe.c (indebug): Cache $ENV{'SKY_DEBUG'}.

[ChangeLog]


	* Makefile.in (SIM_SKY_OBJS): Added sky-vudis.o.

	* interp.c (decode_coproc): Refer to VU CIA as a "special"
	register, not as a "misc" register.  Aha.  Add activity
	assertions after VCALLMS* instructions.
1998-04-08 22:22:58 +00:00
Frank Ch. Eigler
4118c63ccd * COP2 test case update. 1998-04-08 22:10:38 +00:00
Jillian Ye
4cc9cd5474 c_gen.pl: Added subroutine perform_test_read_only 1998-04-08 20:57:28 +00:00
Ian Carmichael
997d07bb70 * Add sky-vudis.h, sky-vudis.c. 1998-04-08 20:14:44 +00:00
Jillian Ye
1430343e6b sce_main.c Fixing address used (line 100): DMA_D1_MADR -> DMA_D1_TADR 1998-04-08 19:46:08 +00:00
Jillian Ye
a41a7ce2fd Update testcase to use the correct include files.
: ----------------------------------------------------------------------
1998-04-08 19:01:01 +00:00
Jillian Ye
b652cad7c0 *** empty log message *** 1998-04-08 18:07:54 +00:00
Jillian Ye
356d8c8c00 Take out sce_testcase from "make check" until they can run more stably.
Added "check_sce" target for driving the Sce_testcases.
1998-04-08 18:03:03 +00:00
Jillian Ye
b03c88a371 Update testcase to compile with the lastest DVP AS 1998-04-08 17:27:47 +00:00
Jillian Ye
2e7f8e7beb Update testcase to compile with latest DVP-AS
: ----------------------------------------------------------------------
1998-04-08 17:15:24 +00:00
Andrew Cagney
8764538f22 Keep sim-main.c and tx.igen 1998-04-07 23:15:53 +00:00
Doug Evans
4b61e1073f Keep sky-gs.[ch] if sky. 1998-04-07 22:54:10 +00:00
Frank Ch. Eigler
0b2289b6b3 * Oops, keep new file. 1998-04-07 22:50:02 +00:00
Frank Ch. Eigler
174ff2242b * R5900 COP2 sim testing in progress. The majority of instructions actually
work!

[ChangeLog.sky]

	* sky-vu.h (vu_device): Represent "macro instruction just stuffed
 	into fetch buffer" condition with new "m" bit.  Rename old "m" to
 	"l".

	* sky-libvpe.c (indebug): Save snapshot of environment value;
 	workaround for suspected memory corruption.
	(fetch_inst): Respect new "m" macro-instruction flag for reporting
 	successful fetch to caller.
	(exec_inst): Disassemble instruction here instead of fetch time.
  	Renamed old "m" -> "l" flag in VU state to track interlock
 	release.
	(vpecallms_cycle): Call exec_inst only if fetch_inst did some
 	work.

	* sky-vu.c (vu_attach, vu[01]_device): Revamped initialization to
 	ensure complete clear of tail part of struct at attach time.
	(vu0_busy): Fix thinko.
	(vu0_macro_issue): Adapt to new "l" flag.
	(vu0_micro_interlock_released): Ditto.
 	(write_vu_special_reg): Ditto.
	(read_vu_special_reg): Compute VBS0/VBS1 bits more explicitly.
  	The other VU status bits are not yet computed.

[ChangeLog]

	* interp.c (decode_coproc): Do not apply superfluous E (end) flag
 	to upper code of generated VU instruction.
1998-04-07 22:47:53 +00:00
Frank Ch. Eigler
0dee6af299 * COP2 testing in progress.
Tue Apr  7 18:31:47 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* t-cop2.s: New test for COP2 function.

	* Makefile.in: Added rule to assemble self-contained R5900 asm tests.
1998-04-07 22:45:56 +00:00
Doug Evans
34c1c9b86a Update. 1998-04-07 22:44:49 +00:00
Jillian Ye
373df64120 Update Makefile.in to use dvp-el-as for SKY testcases.
: ----------------------------------------------------------------------
1998-04-07 21:10:30 +00:00
Ian Carmichael
5faa69dac3 * Added missing ITOP instructions to test40,41,42,43. 1998-04-07 20:20:34 +00:00
Jillian Ye
f8c732a164 sce_main.c : Added "return 0;" to the end of main.
: ----------------------------------------------------------------------
1998-04-07 16:34:29 +00:00
Jillian Ye
5087a6057a sce* : files added for the SCE (feb28) testsuite (modified).
sce*_testN.* corresponds to the original testN/test.*
       *.vuasm    : MICRO code
       *.dvpasm   : DMAtag and VIF code description
       *.out_gif.dat : GIF output values for the corresponding testcase.
sce_main.c : driver file for the SCE testcases
sce_macro.s : SCE provided macro file needed by the SCE (feb28) testcases
refresh.s   : Needed by sce_main.c
Makefile.in : Updated to run make and run the SCE testsuite.

: ----------------------------------------------------------------------
1998-04-07 16:23:41 +00:00
Frank Ch. Eigler
2ebb2a6855 * R5900 COP2 is now ready for testing. Let loose the dogs!
Mon Apr  6 19:55:56 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* interp.c (cop_[ls]q): Replaced stub with proper COP2 code.

	* sim-main.h (LOADADDRMASK): Redefine to allow 128-bit accesses
 	for TARGET_SKY.

	* r5900.igen (SQC2): Thinko.
1998-04-07 00:01:31 +00:00
Jillian Ye
0eebcbd7ab c_gen.pl: Added sub-routine perform_test64 to read and verify 64bit register. 1998-04-06 20:49:47 +00:00
Frank Ch. Eigler
ebcfd86a2e * R5900 COP2 function nearly complete. PKE sim now aware of new GPUIF
masking facility for PATH3 transfers.

[ChangeLog.sky]

Sun Apr  5 12:11:45 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* sky-libvpe.c (exec-inst): Added "M" bit detection for upper
 	instruction.

	* sky-pke.c (pke_check_stall): Added more assertions.
	(pke_code_mskpath3): Use new GPUIF M3P control register.

	* sky-pke.h (VU[01]_CIA): New macros that give VU CIA
 	pseudo-register addresses.

	* sky-vu.h (vu_device, VectorUnitState): Merged structs.
	(VectorUnitState.mflag): New field.
	(VU_REG_{CMSAR0,CMSAR1,FBRST}) Added missing control registers.

	* sky-vu.c (vu0_busy): New function.
	(vu0_q_busy): New function.
	(vu0_macro_issue): New function.
	(vu0_micro_interlock_released): New function.
	(vu0_busy_in_{micro,macro}_mode): Deleted stubs.
	(vu0_macro_hazard_check): Deleted stubs.
	(vu_attach): Adapted code to merged device & state struct.
	(read_vu_special_reg): Compute VBS0/VBS1 bits in STAT register.

[ChangeLog]
start-sanitize-sky
Sun Apr  5 12:05:44 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* interp.c (*): Adapt code to merged VU device & state structs.
	(decode_coproc): Execute COP2 each macroinstruction without
 	pipelining, by stepping VU to completion state.  Adapted to
	read_vu_*_reg style of register access.

	* mips.igen ([SL]QC2): Removed these COP2 instructions.

	* r5900.igen ([SL]QC2): Transplanted these COP2 instructions here.

	* sim-main.h (cop_[ls]q): Enclosed in TARGET_SKY guards.

end-sanitize-sky
1998-04-05 16:40:03 +00:00
Frank Ch. Eigler
d61cc1d4b1 * Test case patch for more functional GPUIF implementation
Sun Apr  5 12:34:56 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* t-pke3.trc: Modified to confirm parts of GPUIF PATH3-masking
 	functionality.
1998-04-05 16:37:04 +00:00
Andrew Cagney
64ed8b6a8c aclocal.m4: Don't enable inlining when cross-compiling.
mips/*: Tune mips simulator - allow all memory transfer code to be inlined.
1998-04-05 07:16:54 +00:00
Andrew Cagney
278bda4050 Cleanup INLINE support for simulators using common framework.
Make IGEN responsible for co-ordinating inlining of generated files.
By default, aclocal.m4 disabled all inlining.
1998-04-04 12:33:11 +00:00
Jillian Ye
f6f81e4a92 c_gen.pl: Added sub-routine process_data_reg64 to handle 64bit register
writes.
1998-04-03 19:59:11 +00:00
Andrew Cagney
72a08ce565 Don't bother generating trace prefix string when not tracing. 1998-04-03 17:13:40 +00:00
Ron Unrau
c567d0b941 * sim-main.h: add vif registers
* interp.c: incorporate vif register load/store
        * sky-pke.[ch]: add register load/store routines
        * sku-vu.c: P register is float
1998-04-02 21:02:38 +00:00
Andrew Cagney
69d5a56645 Re-do load/store operations so that they work for both 32 and 64 bit
ISAs.
Enable tx39 as igen again.
1998-04-02 19:35:39 +00:00
Andrew Cagney
725fc5d927 For mips get_mem_size call. Force the return of a 32 bit value
regardless of the target's word bitsize.
1998-04-02 03:27:24 +00:00
Ron Unrau
2151467d63 sky-vu.[ch]: prototype decls, cast floats to ints before register transfer
interp.c: integrate VU register read/writes
sim-main.h : track tm-txvu.h
1998-04-01 17:31:24 +00:00
Frank Ch. Eigler
6b0c51c929 * You bop one on the head ... another one appears.
Wed Apr 1 08:20:31 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* mips.igen (SQC2/LQC2): Make bodies sky-target-only also.
1998-04-01 13:19:07 +00:00
Andrew Cagney
e1fe7a7966 * configure.in (SIM_AC_OPTION_WARNINGS): Add.
configure: Re-generate.
1998-04-01 02:56:05 +00:00
James Lemke
1ff39ecb10 * sky-dma.c: Clarify text in warning msg.
* interp.c: Add global option "float-type".
	* sky-vu.h: Add SIM_DESC sd; to VectorUnitState for accessing
	global options.
1998-03-31 21:46:31 +00:00
Frank Ch. Eigler
6ed00b0607 * Continuing sky R5900 / COP2 work. Added extra sanitize tags to hide
128-bit MIPS part.

[ChangeLog]

Mon Mar 30 18:41:43 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* interp.c (decode_coproc): Continuing COP2 work.
  	(cop_[ls]q): Hide 128-bit COP2 more.

	* sim-main.h (COP_[LS]Q): Hide 128-bit COP2 more.

[ChangeLog.sky]

Mon Mar 30 18:44:15 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* sky-libvpe.c: Code too wide - ran indent on SCEI code.

	* sky-vu.h (vu0_busy*, vu0_macro*): New entry points for COP2
 	interface.

	* sky-vu.c (vu0_busy*, vu0_macro*): Stub functions for above.
1998-03-30 23:56:52 +00:00
Gavin Romig-Koch
34f51d8723 * configure.in (mipstx39*-*-*): Use gencode simulator rather
than igen one.
	* configure : Rebuild.
1998-03-30 19:54:15 +00:00
Andrew Cagney
a1e4dc0db4 * run.c (main): Handle all alternatives of enum sim_stop.
(main): Delete unused `asection *s'.
1998-03-30 13:30:10 +00:00
Frank Ch. Eigler
7dd4a46650 * Oops, added #ifdef TARGET_SKY around R5900 COP2 implementation skeleton. 1998-03-29 22:53:31 +00:00
Frank Ch. Eigler
1d33e94615 * Updated test cases to confirm PKE behavior according to new SCEI specs. 1998-03-28 00:36:59 +00:00
Frank Ch. Eigler
b59e0b6815 * Modified sky PKE behavior according to new SCEI specs. 1998-03-28 00:35:43 +00:00
Frank Ch. Eigler
15232df4a3 * Inserted skeleton of R5900 COP2 simulation. Merged old vu[01].[ch] code
into single PKE-style vu.[ch].


[ChangeLog]

Fri Mar 27 16:19:29 1998  Frank Ch. Eigler  <fche@cygnus.com>

start-sanitize-sky
	* Makefile.in (SIM_SKY_OBJS): Replaced sky-vu[01].o with sky-vu.o.

	* interp.c (sim_{load,store}_register): Use new vu[01]_device
 	static to access VU registers.
	(decode_coproc): Added skeleton of sky COP2 (VU) instruction
 	decoding.  Work in progress.

	* mips.igen (LDCzz, SDCzz): Removed *5900 case for this
 	overlapping/redundant bit pattern.
	(LQC2, SQC2): Added *5900 COP2 instruction skeleta.  Work in
	progress.

	* sim-main.h (status_CU[012]): Added COP[n]-enabled flags for
 	status register.

end-sanitize-sky

	* interp.c (cop_lq, cop_sq): New functions for future 128-bit
 	access to coprocessor registers.

	* sim-main.h (COP_LQ, COP_SQ): New macro front-ends for above.

[ChangeLog.sky]

	* sky-engine.c (engine_run): Adapted from vu[01] -> vu merge.

	* sky-hardware.c (register_devices): Ditto

	* sky-pke.c (pke_fifo_*): Made these functions private again, now
 	that the GPUIF code does not use them.

	* sky-pke.h (pke_fifo_*): Removed newly private declarations.

	* sky-vu.c (*): Major rework: merge of old sky-vu0.c and
 	sky-vu1.c.  Management of two VU devices parallels two PKEs.
	Work in progress.

	* sky-vu.h (*): Other half of merge.
	(vu_device): New struct, parallel to pke_device.
1998-03-27 22:00:56 +00:00
Patrick Macdonald
76969284c3 sky-gs.c: initial drop of GS control registers (outstanding questions)
sky-gs.h: initial drop of GS control registers
Makefile.in: added sky-gs.o to sanitized list
sky-gpuif.c (gif_io_write_buffer): correct memset length error, renamed
trace file for gif
1998-03-27 18:36:33 +00:00
Ron Unrau
d44859a2d8 * sky-vu.c: new file to read/write VU registers
* Makefile.in .Sanitize: add sky-vu.c
	* sky-vu.h: define registers as enum, export read/write routines
        * sky-vu[01].[ch]: use register read/write routines in sky-vu.c
        * interp.c: use register read/write routines in sky-vu.c
1998-03-27 14:44:39 +00:00
Andrew Cagney
d8f5304972 Do top level sim-hw module for device tree.
Add to aclocal.m4, update all configure files.
1998-03-27 11:42:16 +00:00
Andrew Cagney
bd85beb90c Clean up m32rx sanitization 1998-03-27 11:33:16 +00:00
Andrew Cagney
82ea14fd9d Define CPU_INDEX. Initialize.
For mips_options, iterate over MAX_NR_PROCESSORS when setting options.
1998-03-27 04:25:45 +00:00
Andrew Cagney
6d133cc9df Add sanitize-am30 markers. Keep details of AM30 implementation of
mn10300 out of the public eye.
Do something with top-level cgen directory.
1998-03-27 03:10:53 +00:00
Andrew Cagney
1b756ba6d5 * dv-mn103cpu.c (deliver_mn103cpu_interrupt): Stop loss of succeeding
interrupts, clear pending_handler when the handler isn't re-scheduled.
1998-03-26 14:00:18 +00:00
Stu Grossman
abf6ba256a * Makefile.in (tmp-igen): Prefix all usage of move-if-change
script with $(SHELL) to make NT native builds happy.
	* configure:  Regenerate because of change to ../common/aclocal.m4.
1998-03-26 10:18:35 +00:00
Andrew Cagney
51ccd82f7f * configure.in: Make --enable-sim-common the default.
* configure: Re-generate.
* sim-main.h (CIA_GET, CIA_SET): Save/restore current instruction
address into Sate.regs[REG_PC] instead of common struct.
1998-03-26 01:13:38 +00:00
Andrew Cagney
98f1f62cb4 * dv-pal.c (enum hw_pal_address_mask): From Stu Grossman, was 0x2f
needs to be 0x3f.
1998-03-25 23:48:14 +00:00
Joyce Janczyn
d1607ed316 * mn10300.igen (cmp imm8,An): Do not sign extend imm8 value. 1998-03-25 22:43:19 +00:00
Andrew Cagney
04cdafa7a4 * hw-tree.c (hw_tree_find_property): Return NULL when device is not found.
(hw_tree_find_*_property): Clean up error message when property is not found.
* dv-pal.c (hw_pal_io_read_buffer): Check the smp property is present before
looking for it.
1998-03-25 22:37:33 +00:00
Ian Carmichael
8d0bd9889c * Added HAVE_FPU_CONTROL_H and HAVE___SETFPUCW to fix non-linux builds. 1998-03-25 21:54:06 +00:00
Joyce Janczyn
52ef605e6d * simops.c (OP_F0FD): Initialise variable 'sp' for rti instruction. 1998-03-25 17:10:01 +00:00
Andrew Cagney
c357e16ac8 * dv-mn103int.c (decode_group): A group register every 4 bytes not 8.
(write_icr): Rewrite equation updating request field.
(read_iagr): Fix check that interrupt is still pending.
1998-03-25 14:52:44 +00:00
Andrew Cagney
8077fed51e * interp.c (sim_open): Tidy up device creation.
* dv-mn103int.c (mn103int_port_event): Drive NMI with non-zero value.
(mn103int_io_read_buffer): Convert absolute address to register block offsets.
(read_icr, write_icr): Convert block offset into group offset.
1998-03-25 05:37:42 +00:00
Andrew Cagney
6100784a60 * interp.c (sim_open): Create second 1mb memory region at 0x40000000.
(sim_open): Create a device tree.
(sim-hw.h): Include.
(do_interrupt): Delete, needs to use dv-mn103cpu.c
* dv-mn103int.c, dv-mn103cpu.c: New files.
1998-03-25 04:15:38 +00:00
Andrew Cagney
8388c9a564 * mn10300_sim.h (EXTRACT_PSW_LM, INSERT_PSW_LM, PSW_IE, PSW_LM): Define.
(SP): Define.
1998-03-25 04:07:31 +00:00
Andrew Cagney
05d7918e53 * dv-pal.c (hw_pal_countdown, hw_pal_countdown_value,
hw_pal_timer, hw_pal_timer_value): Define.
(hw_pal_io_read_buffer, hw_pal_io_write_buffer): Add timer support
(do_counter_event, do_counter_read, do_counter_value,
do_counter_write): new functions.

* hw-tree.c (hw_printf): Send tree dump to stderr, same as other
trace output.
* hw-base.c (hw_create): Stop searching for a device when one is
found.
1998-03-25 03:44:37 +00:00
Andrew Cagney
d89fa2d80a Re-do --enable-sim-hardware so that each simulator can specify the devices
it wants built.
Generate hw-config.h.
1998-03-25 01:41:33 +00:00
Andrew Cagney
e855e57637 Pacify GCC. 1998-03-25 00:08:52 +00:00
Andrew Cagney
612a649eee * interp.c (Max, Min): Comment out functions. Not yet used.
* vr4320.igen (DCLZ): Pacify GCC, 64 bit arg, int format.
1998-03-24 23:16:57 +00:00
Ian Carmichael
9fa5e700c0 * Several fixes and performance enhancements from my 2 weeks working in Japan. 1998-03-24 22:23:33 +00:00
Andrew Cagney
d797f46f3c * gen-engine.c (print_run_body): Re-extract the CIA after
processing any events.  Events may not restart the simulator.
1998-03-24 21:30:00 +00:00
Joyce Janczyn
8dcf23d28b Add new files: mn10300.igen, mn10300.dc, sim-main.h, op_utils.c 1998-03-24 21:23:29 +00:00
Joyce Janczyn
55045e7b32 Port mn10300 simulator to build with the common simulator framework
under the configure option --enable-sim-common.
1998-03-24 20:30:03 +00:00
Joyce Janczyn
6274d39b87 Add code to support building mn10300 simulator with the common simulator
framework.
1998-03-24 20:26:06 +00:00
Joyce Janczyn
5abdc30591 Add support for building simulator based on common simulator framework.
Separate out files which get compiled depending on --enable-sim-common
configuration.
1998-03-24 20:19:55 +00:00
Joyce Janczyn
4f262a370d Add ability to configure mn10300 built with common simulator code base.
Use --enable-sim-common to build this way; default configure has not
changed.
1998-03-24 20:16:25 +00:00
Joyce Janczyn
13e0e254dc New {load/store}_{byte/half/word} macros for simulator built with
common framework.
1998-03-24 20:11:44 +00:00
Joyce Janczyn
0543ebbb26 Header file required by igen generated files. 1998-03-24 20:08:00 +00:00
Joyce Janczyn
7986ea1323 IGEN input files for mn10300 simulator. 1998-03-24 20:07:22 +00:00
Stu Grossman
753ad2d3c5 * Makefile.in: Get SHELL from configure.
* configure:  Regenerate with autoconf 2.12.1 to fix shell issues for
	NT native builds.
1998-03-24 17:50:09 +00:00
Stu Grossman
63330b2e2e * Make-common.in: Get SHELL from configure.
* (stamp-tvals sim-inline.c):  Use $(SHELL) when invoking
	move-if-change.  Fixes NT native build problem.
	* Makefile.in (nltvals.def):   Use $(SHELL) when invoking
	move-if-change.  Fixes NT native build problem.
	* configure:  Regenerate with autoconf 2.12.1 to fix shell issues for
	NT native builds.
1998-03-24 17:48:58 +00:00
Joyce Janczyn
9bd4b4618d Build IGEN with the mn10300 simulator. 1998-03-24 16:18:58 +00:00
Andrew Cagney
7c130f2971 New function hw_strdup() - use memory tied to hw device.
Tidy up hw-properties error messages.
New device dv-glue.c (copied from ../ppc/hw_glue.)
Only attach a port after a devices initialization has finished.
1998-03-22 22:33:34 +00:00
Andrew Cagney
b2846e630d Fix typos: Setting trace in wrong function, ME vs HW. 1998-03-22 05:51:57 +00:00
Andrew Cagney
775b309a4e Copy function ../ppc/device_table.c:generic_device_init_address() to
hw-base.c:do_hw_attach_regs().  Use in dv-pal.
Add hw_tree_delete to hw-tree.c.
1998-03-22 05:49:30 +00:00
Andrew Cagney
937a4bdc12 Add function hw_trace() and macro HW_TRACE - provides trace support
for HW devices.
1998-03-22 05:33:41 +00:00
Andrew Cagney
e5f0d498af Add hw_{malloc,zalloc,free} functions to hw_device. Any memory
allocated using these functions is reclaimed when the corresponding
device is deleted.
1998-03-22 05:06:27 +00:00
Andrew Cagney
b1e9223cee Replace *attach_address() arguments SPACEMASK:ADDR with SPACE:ADDR.
Add notes to hw-device.h that discuss the interpretation of SPACE:ADDR
on a BUS.
1998-03-22 04:18:52 +00:00
James Lemke
fc609c6c69 Added DMAC unit test cases. 1998-03-20 22:51:39 +00:00
Frank Ch. Eigler
121d6745bc * Monster bug fixes & improvements from the last two days' demo-testing work.
* sky-pke.h (pke_fifo*): Exported these formerly private functions.
	(pke_device): Added FIFO cache fields.

	* sky-pke.c (pke_fifo_reset): New function for GPUIF client -
 	clear FIFO contents.
	(pke_pcrel_fifo): Added caching facility to prevent O(n^2) cost for
	searching for consecutive operand words.

	* sky-libvpe.c (MEM, uMEM): New/changed macros that perform modulo
 	calculations to handle out-of-range VU memory addresses.
	(*): Replaced many previous uses of MEM[] and state->uMEM[] with
	calls to above macros.

	* sky-vu.h (struct VectorUnitState): Added qw/dw size fields for
	MEM/uMEM buffers, for overflow prevention.  Renamed MEM/uMEM fields
	to catch all their prior users.

	* sky-vu0.c (vu0_attach): Manually align MEM0/MEM1 buffers to force
	16-byte alignment.  (zalloc is not enough.)

	* sky-vu1.c (vu1_attach): Ditto.
	(init_vu): Store buffer sizes from allocation into VectorUnitState.

	* sky-gpuif.h (GifPath): Use a pke_fifo strucf instead of
 	temporary fixed-size array for flexible FIFO sizing.

	* sky-gpuif.c (SKY_GPU2_REFRESH): This is now an integer value to be
	used as a modulus for periodic refresh.
	(refresh): New function to send GPU2 refresh code periodically.
	(*): Use pke_fifo calls to en/dequeue GPUIF tags & operands.

	* sky-pke.h (struct pke_device): Added fields to allow caching of
 	results from recent FIFO searches.
1998-03-20 22:12:06 +00:00
Frank Ch. Eigler
0b9843e5ee * Changes today consist just of some code hardening. 1998-03-18 19:33:33 +00:00
Andrew Cagney
ae7c344679 Prototype common device framework. Plenty more work to go. 1998-03-18 04:08:21 +00:00
Andrew Cagney
9a8e61f1d4 * aclocal.m4 (SIM_AC_OPTION_HARDWARE): Set sim_hw_obj, sim_dv_obj,
sim_dv_src in Makefile. Take list of devices as parameter to m4
macro..
* configure: Regenerated to track ../common/aclocal.m4 changes.
1998-03-18 02:07:56 +00:00
Frank Ch. Eigler
9b23b76d68 * Added --with-sim-gpu2=<path> option for linking SCEI's GPU2 library with
the stand-alone executable.


[in ChangeLog.sky:]

	* sky-gpuif.c (call_gs): Call properly into GPU2 library if
 	configured --with-sim-gpu2.  Use SKY_GPU2_REFRESH symbol as
 	placeholder for future GPU2-refresh policy.

[in ChangeLog:]

	* Makefile.in (MIPS_EXTRA_LIBS, SIM_EXTRA_LIBS): Added
 	configurable settings for stand-alone simulator.

start-sanitize-sky
	* configure.in: Added --with-sim-gpu2 option to specify path of
 	sky GPU2 library.  Triggers -DSKY_GPU2 for sky-gpuif.c, and
 	links/compiles stand-alone simulator with this library.

	* interp.c (MEM_SIZE): Increased default sky memory size to 16MB.
end-sanitize-sky

	* configure.in: Added X11 search, just in case.

	* configure: Regenerated.
1998-03-18 00:20:40 +00:00
Frank Ch. Eigler
670ae6c936 * Added "t-pke4" test case that I forgot to check in when it was created. 1998-03-17 20:49:50 +00:00
Frank Ch. Eigler
08b284172b * Added the "c_gen.pl" perl script into this directory, so the current
bunch of tests may be run on non-Toronto hosts.
1998-03-17 20:47:03 +00:00
Frank Ch. Eigler
fb9e431635 * Some changes in PKE tests, as per SCEI e-mail. t-pke1 still fails, but
will ignore this until next SCEI clarification.

	* tsv308_1.trc: Fixed test case as per SCEI email.
	* tsv316_1.trc: Ditto.
	* tsv408_1.trc: Same.
	* tsv416_1.trc: Again.
	* t-pke3.trc: Added more padding to one VU test to widen timing race.
1998-03-17 00:07:19 +00:00
Andrew Cagney
a8ff502679 Pass sim_cia cia into trace_prefix() 1998-03-16 03:44:33 +00:00
Doug Evans
b01a8697e2 * config.in (HAVE_FCNTL_H): Add.
* configure: Regenerate.
	* Makefile.in (SIM_OBJS): Add devices.o.
	* m32r-sim.h (m32r_devices): Renamed from m32r_mspr_device.
	(UART_*): Define m32r serial port parameters.
	(M32R_DEVICE_ADDR,M32R_DEVICE_LEN): Define.
	* m32r.c (device_io_{read,write}_buffer,device_error): Move from here,
	* devices.c: To here.
	* sim-if.c: Don't include signal.h,sim-core.h.
	(sim_open): Use M32R_DEVICE_{ADDR,LEN} in sim_core_attach call.
	(sim_resume): Call sim_module_{resume,suspend}.
	* m32r.c (m32r_h_cr_{get,set}): Use register number enums.

	* tconfig.in (SIM_HANDLES_LMA): Define.

	* sim-if.c (do_trap): Result is new pc.
	Handle --environment=operating.
	* sem-switch.c,sem.c: Regenerate.
start-sanitize-m32rx
	* semx.c: Regenerate.
end-sanitize-m32rx
1998-03-15 05:15:18 +00:00
Doug Evans
84c6d152d1 * dv-sockser.c, dv-sockser.h: New files.
* Make-common.in (dv-sockser.o): Add rule for.
	* aclocal.m4: Check for fcntl.h.
	* config.h: Add HAVE_FCNTL_H.

	* sim-break.c (remove_breakpoint): Fix thinko.

	* sim-hload.c (sim_load): Provide default value of SIM_HANDLES_LMA.
	Use SIM_HANDLES_LMA for lma_p arg to sim_load_file.
1998-03-15 02:43:00 +00:00
Frank Ch. Eigler
86a6094133 * Added "test0" test bucket from SCEI. Due to changes in the behavior specs
of PKE, some old test cases had to be modified.  There are suspected bugs
  in the SCEI test cases too, so "make check" does not run cleanly at present.

	* tss*.trc: New files, generated by perl script from
	SCEI "test0" bucket.

	* tsv*.trc: New files, generated by perl script from SCEI "test0"
 	bucket.  Note that tsv432_0 may obsolete t-pke1.

	* Makefile.in (TESTS): Run new scripts.
	(check): Bulldoze through failing test cases with "make -k" until
 	SCEI fixes some of them.
	(.run.ok): Increased run-time limit since some test runs can take
 	several seconds.
1998-03-14 01:51:03 +00:00
Frank Ch. Eigler
9614fb3c36 * PKE testing was driven by SCEI "test0" bucket; code coverage remains
effectively full.  The code is believed to be functionally complete now.
  Some code cleanup is included at no extra charge in this version.

Fri Mar 13 20:21:57 1998  Frank Ch. Eigler  <fche@cygnus.com>

	* sky-vu1.c: (dump_mem): Commented out function to satiate
 	warning-ful compilation.

	* sky-pke.c: (pke_reset): New function, called explicitly at
 	initialization and at FBRST.
	(pke_fifo_flush): New function to flush (skip over) existing
 	quadwords in FIFO.
	(pke_fifo_fit): New function to add space for new quadword in
 	FIFO.
	(pke_fifo_access): New function to absolute-index into FIFO.
	(pke_fifo_old): New function to remove old quadwords from FIFO.
	(pke_begin_interrupt_stall): New function to abstract
 	interrupt-caused stalls.
	(pke_*): Access PKE FIFO only thorugh pke_fifo functions.
	(pke_pcrel_*): Renamed pke_pc_* functions.
	(pke_code_unpack): Numerous logic tweaks for latest UNPACK
 	behavior changes & clarifications from SCEI.

	* sky-pke.h (struct pke_fifo): New explicit FIFO representation.
	(struct pke_device): Use struct above.
	(PKE_DEBUG): Removed macro as misnomer.

	* sky-hardware.c: Moved *_cmd_install declarations out.

	* sky-hardware.h: Moved *_cmd_install declarations in.
1998-03-14 01:47:06 +00:00
Fred Fish
93f75411f6 * sim-base.h (struct sim_state_base): Add prog_syms and
define macro STATE_PROG_SYMS.
	* sim-trace.c (trace_one_insn): Add variables abfd, symsize,
	symbol_count, and asymbols.  Call bfd_get_symtab_upper_bound
	and bfd_canonicalize_symtab, to get symbol table on first use
	and preserve it via STATE_PROG_SYMS for future calls to
	bfd_find_nearest_line.
1998-03-13 20:39:00 +00:00
Angela Marie Thomas
2b9cac47f5 massive sanitization fixes 1998-03-13 13:09:32 +00:00
Angela Marie Thomas
786786305f new .Sanitize files 1998-03-13 11:03:37 +00:00
Gavin Romig-Koch
ca8c38472e Sanity for 4320 1998-03-11 17:05:20 +00:00
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
Doug Evans
b500809f33 * genmloop.sh (engine_resume): Update insn_count before exiting.
(engine_resume_full): Keep accurate core profile data.
	* cgen-utils.c (sim_disassemble_insn): Don't use
	sim_core_read_aligned_N, it messes up profiling results.
1998-02-25 08:25:11 +00:00
Doug Evans
ab062d2278 (profile_print_core): Simplify by calling sim_core_map_to_str.
* sim-core.h (sim_core_map_to_str): Declare.
	* sim-core.c (sim_core_map_to_str): Make non-static.
1998-02-25 07:47:32 +00:00
Doug Evans
751197f231 (profile_print_core): Simplify by calling sim_core_map_to_str.
* sim-core.h (sim_core_map_to_str): Declare.
	* sim-core.c (sim_core_map_to_str): Make non-static.
1998-02-25 07:36:23 +00:00
Doug Evans
3910fb4a51 * sim-profile.c (profile_print): Delete duplicate test of
PROFILE_INSN_IDX.
	(profile_print_pc): Exit early if data collection not set up.
1998-02-25 07:16:09 +00:00
Frank Ch. Eigler
89154e47a3 * Unit testing of PKE sim continuing. Only minor VU addressing problems
found today.
1998-02-25 01:13:05 +00:00
Frank Ch. Eigler
559eba20a8 * Added test bucket directory for sky tests, which may be run in conjunction
with the mips64r5900 tests.  It's all meant to be sanitized out without
  "keep-sky".
1998-02-25 01:08:47 +00:00
Ian Carmichael
733cfc784b * A bunch of changes which get us closer to running the sample. 1998-02-24 23:37:20 +00:00
Mark Alexander
a9faef120e * Makefile.in: Last change was bad. Define NL_TARGET
so that targ-vals.h will be used instead of syscall.h.
	* simops.c: Use targ-vals.h instead of syscall.h.
	(OP_F020): Disable unsupported system calls.
1998-02-24 05:07:11 +00:00
Mark Alexander
845a591785 * nltvals.def: Regenerate with MN10300 additions. 1998-02-24 05:00:53 +00:00
Andrew Cagney
d3e1d59414 Add tracing to r5900 p* instructions. 1998-02-24 03:42:27 +00:00
Frank Ch. Eigler
b4d2f483b3 * PKE sim unit testing continuing. Starting to run milestone sample.
* sky-pke.h (PKE_MEM_READ): Removed "read" entry from FIFO trace.

	* sky-pke.c (pke_attach): Set trace file to line buffering iff
 	open.
	(pke_io_read_buffer, pke_io_write_buffer): Handle erroneous
 	reads/writes by zero-padding.
	(pke_io_write_buffer): Switch to more bit-field definition macros.
	(pke_issue): Remove "stalled" entry from FIFO trace.
	(pke_pc_advance): Correct logic for DMA-tag-skipping, PKEcode
 	classification.
	(pke_code_mskpath3): Sketch of possible PATH3 masking method.
	(pke_code_mpg): Keep order of lower/upper VU words as supplied.
	(pke_code_unpack): Logic change for wl/cl/num unpacking.  Weird.
1998-02-24 02:10:23 +00:00
Ron Unrau
ce4713dc3b Make it compile again for -DTARGET_SKY 1998-02-23 23:40:40 +00:00
Doug Evans
02310b01ca * sim-main.h: #include symcat.h.
* m32r-sim.h (BRANCH_NEW_PC): Delete current_cpu arg.
	(NEW_PC_{BASE,SKIP,2,4,BRANCH_P}): New macros.
	* cpu.[ch],decode.[ch],extract.c,model.c: Regenerate.
	* sem.c,sem-switch.c: Regenerate.
	* m32r-sim.h (SEM_NEXT_PC): Modify to handle parallel exec.
	* mloopx.in: Rewrite.
	* cpux.[ch],decodex.[ch],readx.c,semx.c: Regenerate.
1998-02-23 21:36:15 +00:00
Doug Evans
93f34464a3 * cgen-sim.h (SEM_NEXT_PC): New arg `len'. 1998-02-23 21:28:14 +00:00
Nick Clifton
677c3439a7 Implment backup PC shadowing of CR6. 1998-02-23 20:31:19 +00:00
Doug Evans
36dbc8bb7c * sim-xcat.h: Delete.
* cgen-mem.h: Delete inclusion of sim-xcat.h.
	* cgen-sim.h: Ditto.
	* sim-alu.h: Replace sim-xcat.h with symcat.h.
	* sim-n-bits.h: Ditto.
	* sim-n-core.h: Ditto.
	* sim-n-endian.h: Ditto.
1998-02-23 18:21:14 +00:00
Michael Meissner
3aeca4624a Handle short reads and EOF 1998-02-23 18:21:13 +00:00
Mark Alexander
e04b0d76da * Makefile.in: Get header files from libgloss/mn10300/sys. 1998-02-23 17:51:23 +00:00
Andrew Cagney
a48e8c8d21 sim-main.h: Re-arange r5900 registers so that they have their own
little struct.
interp.c: Update.  Also add floating point Max/Min functions.
mips.igen: Remove r5900 tag from any floating point instructions.
r5900.igen: Rewrite.  Implement *all* floating point insns (except ld/st).
r5400.igen: Tag mdmx functions as being mdmx specific.
1998-02-23 16:55:38 +00:00
Andrew Cagney
0325f2dc89 Add tracing of booleans and addresses. 1998-02-23 16:43:34 +00:00
Andrew Cagney
2c3c3f790d Generate ENGINE_ISSUE hooks as part of SMP simulator. 1998-02-23 14:43:13 +00:00
Andrew Cagney
bdfe5c0439 * sim-fpu.h (enum sim_fpu_class): Add sim_fpu_class_denorm.
(sim_fpu_fpto, sim_fpu_tofp): Define.
1998-02-23 09:18:30 +00:00
Andrew Cagney
3c1e924307 * ld-insn.c (parse_function_record): When -Wnodiscard, suppress
discarded function warning.
        * igen.c (main): Clarify -Wnodiscard.
        * ld-insn.c (parse_function_record): For functions, allow use of
        instruction style function model records
1998-02-23 08:55:41 +00:00
Jeff Law
7eab31b76f * simops.c: Include sim-types.h. 1998-02-22 22:59:43 +00:00
Frank Ch. Eigler
653c259005 * PKE sim unit testing continuing. The DIRECT and MPG instructions
were hammered in today's runs.  Work is beginning in endian-proofing
  the code.

	* sky-pke.c (pke1_issue): Issue on correct PKE device.
	(pke_io_write_buffer, pke_code_mpg, pke_code_unpack): Perform more
 	endian conversions.
	(pke_code_mpg, pke_code_direct): Add operand alignment assertions.
	(pke_code_mpg): Correct VU stall checks.  Correct VU opcode
 	transfer ordering.
	(pke_code_direct): Correct typos in DIRECT operand accessing.
	(pke_code_unpack): Correct conditional sign-extension handling.

	* sky-gpuif.c (gif_io_read_buffer, gif_io_write_buffer): Correct
 	assertion polarity.
	(gif_read_tag): Disable faulty DMA-tag testing code.
1998-02-20 23:59:10 +00:00
Michael Meissner
ca0e29d12b fix typo 1998-02-20 21:54:06 +00:00
Nick Clifton
c801e51bb6 Fixed UNLOCK test. 1998-02-20 21:01:05 +00:00
Nick Clifton
ab361c3582 Fixed MVFC test. 1998-02-20 20:56:35 +00:00
Nick Clifton
78cbe8f6e4 Fix REMU test. 1998-02-20 20:52:30 +00:00
Nick Clifton
caa71f099d More instruction tests. 1998-02-20 19:55:27 +00:00
Nick Clifton
f83a90c419 Last of the instruction tests. 1998-02-20 19:01:58 +00:00
Andrew Cagney
9655c43963 Implement sim_fpu_is() and sim_fpu_cmp(). Note problem with detecting
denorms.
1998-02-20 07:20:53 +00:00
Andrew Cagney
d147d3844f Backout of revision 1.35. Abort may be valid operation. 1998-02-20 03:20:49 +00:00
Nick Clifton
e843e28b1a More instruction tests. 1998-02-20 02:04:46 +00:00
Frank Ch. Eigler
534a3d5cf1 * Continuing unit testing of PKE simulator. It now successfully matches
the SCEI PKE simulator's output on its own test sample (tsv432.in).

	* sky-pke.h (PKE_MEM_READ, PKE_MEM_WRITE, PKE_REG_MASK_SET): Add
 	trace file records.

	* sky-pke.c: (pke_track_write): Removed function.  Replaced with
 	in-line modifications to VU tracking tables.
	(pke_attach): Attach VU tracking tables.  Use line buffering on
 	trace files.
	(pke_issue): Spit out additional trace records.
	(pke_pc_operand_bits): Correct bitfield masking error.
	(*): Replace sim_read/write with kludge PKE_MEM_READ/WRITE
 	throughout.
	(pke_code_unpack): Correct numerous small bugs in operand decoding
 	etc.
1998-02-20 01:50:01 +00:00
Doug Evans
cab581557e * m32r.c (do_lock,do_unlock): Delete.
* cpu.[ch],decode.[ch],extract.c,model.c: Regenerate.
	* sem.c,sem-switch.c: Regenerate.
	* cpux.[ch],decodex.[ch],readx.c,semx.c: Regenerate.
1998-02-20 00:45:47 +00:00
Nick Clifton
c4448eec8c Yet more tests of m32r instructions 1998-02-20 00:30:14 +00:00
Nick Clifton
67dfe6e82c Even more instruction tests 1998-02-19 23:56:39 +00:00
Nick Clifton
dfe9df588d Test even more instructions. 1998-02-19 23:18:45 +00:00
Nick Clifton
0a2f6d9304 test 32 bit BCL instruction. 1998-02-19 21:52:27 +00:00
John Metzler
180d1f0b50 Fall back from using igen to using gencode for the mips64vr4100 because
igen is not ready yet.
1998-02-19 21:28:50 +00:00
Nick Clifton
4630c94949 Add more tests. 1998-02-19 19:43:18 +00:00
Nick Clifton
d03da19e36 Added a couple of tests. 1998-02-19 19:16:54 +00:00
Gavin Romig-Koch
f319bab251 * interp.c (load_memory): Add missing "break"'s. 1998-02-19 15:24:10 +00:00
Frank Ch. Eigler
e23069923b * Started PKE sim unit testing. A number of minor errors were corrected.
A few PKE instructions even run correctly!  Next missing function of
  interest: FIFO pruning.

	* sky-pke.c (pke_issue): Take extra SIM_DESC argument.
	(pke_attach): Attach correct PKE0/PKE1 device.  Open trace file if
 	VIF{0,1}_TRACE_FILE env. var. is defined.
	(pke_io_write_buffer): Classify words in FIFO quadword.  Use
 	kludgey sim_core routines to access DMA registers.
	(pke_pc_advance): Add PKEcode classification.  Correct DMA tag
 	skipping.  Emit trace records.
	(pke_pc_fifo): Add PKEcode operand classification.
	(pke_check_stall): Perform stall checks against updated register
 	scheme.
	(pke_code_unpack): Correct operand-count calculation.
	(pke_code_stmask): Correct instruction skipping.

	* sky-pke.h (PKE_MEM_WRITE, PKE_MEM_READ): New kludge macros.
	(BIT_MASK_BTW): Corrected off-by-one error.
	(enum wordclass): Classify words in a FIFO quadword.

	* sky-dma.c (dma_io_read_buffer): Correct address checking assertions.

	* sky-engine.c (engine_run): Pass along SIM_DESC to PKE
 	instruction issue code.
1998-02-18 21:26:38 +00:00
Doug Evans
b1c9871889 Delete rac-d,rac-ds,rach-d,rach-ds, they're aliases. 1998-02-18 20:39:02 +00:00
Doug Evans
cf6145bc28 .Sanitize for devo/sim/testsuite/sim/m32r. 1998-02-18 20:37:27 +00:00
Jeff Law
0983e650e5 * simops.c (multiply instructions): Cast input operands to a
signed64/unsigned64 type as appropriate.
1998-02-18 20:05:53 +00:00
James Lemke
3733e09fb6 DMA define names changed (SRCADDR -> MADR). 1998-02-18 16:47:03 +00:00
Andrew Cagney
8dcc896d0e Extend sim-trace.[hc] to include a generic set of macro's for tracing
ALU/... inputs/outputs.
Base implementation on original v850 code.
Update igen to generate code interfacing with newer sim-trace.[hc].
1998-02-18 04:11:09 +00:00
Doug Evans
b8641a4d20 * Makefile.in (M32R_OBJS): Add cpu.o.
(cpu.o): Add rule for.
	(NL_TARGET): Define.
	* configure.in: Add AC_CHECK_PROG(SCHEME).
	* cpu.c: New file.
	* cpuall.h,cpu.h,decode.c,decode.h,extract.c,model.c: Regenerate.
	* sem-switch.c,sem.c: Regenerate.
	* mloop.in (execute): Update call to semantic fn.
	(M32RX_OBJS): Add cpux.o.
	(cpux.o): Add rule for.
	cpux.c: New file.
	* cpux.h,decodex.c,decodex.h,modelx.c,readx.c,semx.c: Regenerate.
	* m32rx.c (m32rx_h_accums_{get,set}): Rewrite.
	(m32rx_h_cr_{get,set}): New functions.
	(m32rx_h_accums_{get,set}): New functions.
	* mloopx.in: Rewrite main loop.

	* m32r.c (do_trap): Move from here.
	* sim-if.c (do_trap): To here, and rewrite to use CB_SYSCALL support.
	(sim_create_inferior): Use h_pc_set.
	(h_pc_{get,set}): New functions.
	(h_gr_{get,set}): New functions.
	(syscall_{read,write}_mem): New functions.
	* sim-main.h (h_{gr,pc}_{get,set}): Declare.
1998-02-18 02:26:47 +00:00
Doug Evans
5bd0ca8616 * Make-common.in (CGEN_MAIN_SCM): Update.
* aclocal.m4 (USE_MAINTAINER_MODE): New variable.
1998-02-18 02:05:54 +00:00
Doug Evans
4f071e3056 * 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.
1998-02-18 01:30:04 +00:00
Ian Carmichael
374ed20d80 * XGKICK now uses memory-based GIF fifo. 1998-02-17 23:50:35 +00:00
Doug Evans
761784f055 keep config, lib, sim. 1998-02-17 22:05:11 +00:00
Doug Evans
fdad7ba5a2 * config/default.exp: New file.
* lib/sim-defs.exp: New file.
	* sim/m32r/*: m32r dejagnu simulator testsuite.
1998-02-17 21:58:11 +00:00
Doug Evans
6b47885968 keep m32r 1998-02-17 21:54:07 +00:00
Doug Evans
6b35d9dd89 m32r simulator testsuite 1998-02-17 21:52:53 +00:00
Doug Evans
ed063d525f * Makefile.in (build_alias): Define.
(arch): Define.
	(RUNTEST_FOR_TARGET): Delete.
	(RUNTEST): Fix.
	(SCHEME,SCHEMEFLAGS,CGENDIR,CGENFLAGS,CGENFILES): Define.
	(check): Depend on site.exp.
	(site.exp): New target.
	(cgen): New target.
	* configure.in: Call AC_CHECK_PROG(SCHEME) if using cgen.
	(arch): Define from target_cpu.
	* configure: Regenerate.
1998-02-17 20:54:50 +00:00
Michael Meissner
9902213101 Better tracing for conditional branches 1998-02-17 19:38:48 +00:00
Andrew Cagney
fbb8b6b9ab For sim_fetch_register / sim_store_register: Add LENGTH parameter,
return actual size of register, 0 if not applicable, -1 of legacy
implementation.
1998-02-17 04:06:38 +00:00
Ian Carmichael
c5efcf3c85 * Added VU0_CIA register #define. 1998-02-16 22:09:57 +00:00
Ian Carmichael
04a7f72aea * Add magic VU1_CIA register. 1998-02-16 22:07:11 +00:00
Ian Carmichael
9c577d9a94 * Partially implement new VPE_STAT register. 1998-02-16 21:44:45 +00:00
Ron Unrau
7aa6042f58 configure: rerun autoconf
interp.c: shield dummy vu registers with -DTARGET_SKY
1998-02-16 04:33:28 +00:00
Andrew Cagney
729295b597 Implement "dbt" and "rtd" instructions.
Import fixes to dmap_addr() from mitsu branch.
1998-02-16 00:35:57 +00:00
Andrew Cagney
b104806fd3 Test the RDT and DBT instructions. 1998-02-15 23:21:19 +00:00
Ron Unrau
97908603a4 configure.in: add -DTARGET_SKY for mips64r5900-sky-elf configure.
sim-main.h: Define regs for sky if -DTARGET_SKY
interp.c: Initial register upload/download support for sky.
1998-02-15 21:33:13 +00:00
Ian Carmichael
486c714a26 * Vu1 state moved to struct. Host-target endian twiddling. Misc other fixes. 1998-02-14 05:34:08 +00:00
Michael Meissner
77cfb0a136 TIC80 uses little endian doubles, not big endian 1998-02-14 00:59:44 +00:00
Frank Ch. Eigler
db6dac32c7 - PKE simulation almost finished. Needed enhancements:
* trace file generation
  * FIFO pruning

- PKE functions still missing due to external dependencies:
  * interrupt to 5900 (igen?)
  * VU busy checking (sky-vu / coprocessor registers)
  * PATH3 masking (sky-gpuif / covert control interface)
1998-02-13 23:29:38 +00:00
Michael Meissner
8114673a2b Pass floating point structure address instead of the structure itself 1998-02-13 22:12:51 +00:00
Patrick Macdonald
8f9acca317 First functional drop of the gpuif code plus modifications to
non-gpuif code to allow sky sim to build with --enable-sim-warnings
1998-02-13 18:02:24 +00:00
Andrew Cagney
ac9a7d8a2c Implement separate user (SPU) and interrupt (SPI) stack pointers. 1998-02-13 05:22:49 +00:00
Andrew Cagney
93c6a010dc Test switching between SPI/SPU. 1998-02-13 05:19:02 +00:00
Doug Evans
d04b9852c0 Beginnings of m32r simulator testsuite. 1998-02-13 03:16:48 +00:00
Doug Evans
6dc224fb87 Keep m32r-elf. 1998-02-13 03:01:10 +00:00
Doug Evans
02e565a270 * sim-main.h (CIA_GET,CIA_SET): Provide dummy definitions for now. 1998-02-12 03:55:30 +00:00
Doug Evans
e0bd6e186c * decode.c, decode.h, sem.c, sem-switch.c, model.c: Regenerate.
* cpux.c, decodex.c, decodex.h, readx.c, semx.c, modelx.c: Regenerate.
1998-02-12 02:54:20 +00:00
James Lemke
5d5a459fd1 Update DMA register addresses 1998-02-11 23:19:52 +00:00
Andrew Cagney
e0deacd295 * sim-load.c (sim_load_file): Print LMA/VMA according to value
used.
1998-02-11 21:10:23 +00:00
Frank Ch. Eigler
43a6998b41 - PKE simulation code almost complete. Still missing:
* handling of super duper packed UNPACK arguments
  * skipping of in-progress instruction on break/stop
  * interrupt generation to 5900
  * PATH2/PATH3 status checking & masking
  * ability to write to FIFO one word (instead of quadword) at a time
1998-02-11 19:42:15 +00:00
Andrew Cagney
86b46474fd Update tests to match recently modified ABI 1998-02-11 07:12:48 +00:00
Andrew Cagney
b41dff6b54 Don't abort() when system call is unknown. 1998-02-11 07:11:28 +00:00
Andrew Cagney
19431a0280 Ensure zero-hardwired bits in DPSW remain zero. 1998-02-11 06:34:30 +00:00
Ian Carmichael
52793fab2f * Many changes to make sky sim build with --enable-sim-warnings. 1998-02-10 20:08:16 +00:00
Andrew Cagney
8904ad6940 D10v memory map changed. Update.
Initialize IMAP/DMAP registers to hardware reset value.
1998-02-10 07:26:55 +00:00
Doug Evans
dc4e95adcc * decode.c, sem.c: Regenerate.
start-sanitize-m32rx
	* cpux.h, decodex.c, readx.c, semx.c: Regenerate.
	* m32rx.c (m32rx_h_accums_set): New function.
	(m32rx_model_mark_[gs]et_h_gr): New function.
	* mloopx.in: Rewrite.
	* Makefile.in (mloopx.o): Build with -parallel.
	* sim-main.h (_sim_cpu): Delete member `par_exec'.
	* tconfig.in (WITH_SEM_SWITCH_FULL): Define as 0 for m32rx.
end-sanitize-m32rx
1998-02-10 03:51:12 +00:00
Doug Evans
6b373fab44 (PAREXEC): Renamed from PARALLEL_EXEC. All uses updated.
(SEMANTIC{,_CACHE}_FN): Fix return type.
1998-02-10 03:37:49 +00:00
Doug Evans
e61871cedc * cgen-sim.h (DECODE): Always use switch for `read' for now.
* 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
	-parallel.
1998-02-10 01:43:42 +00:00
Ian Carmichael
dde66fa756 * Make it so vu.bin is an optional file. 1998-02-10 00:13:54 +00:00
Ian Carmichael
2c88fae9ad * Add hardware_init hook. 1998-02-09 23:53:33 +00:00
Doug Evans
dde54cb845 * genmloop.sh (@cpu@_engine_run): Delete `current_state'.
(engine_resume): Likewise.  Make `engine' volatile.  Save copy
	of cpu pointer in volatile object.
1998-02-09 22:51:21 +00:00
Andrew Cagney
452b380811 Fix double dependency for itable.[hc]. Was causing both the mips16 and the
normal mips simulators to be built.
1998-02-07 06:24:51 +00:00
Frank Ch. Eigler
fba9bfed2d - Added almost all code needed for PKE0/1 simulation. Considers
clarifications given in SCEI question/answer batches #1 and #2.
1998-02-07 00:12:14 +00:00
Doug Evans
f3534b6867 sky sanitization 1998-02-06 03:27:55 +00:00
Doug Evans
5759734b2c * Makefile.in (SIM_SKY_OBJS,MIPS_EXTRA_OBJS): New vars.
(SIM_OBJS): Add $(MIPS_EXTRA_OBJS).
	* configure.in: Set mips_extra_objs to sky files if mips64r59*-sky-*.
	* configure: Regenerated.
1998-02-06 03:19:56 +00:00
Doug Evans
72db5610de Prepend sky- to sky header file names. 1998-02-06 03:11:44 +00:00
Doug Evans
803f52b9dc Second pass at moving sky files into mips dir,
prepend sky- to all #include's of sky headers.
1998-02-06 03:09:03 +00:00
Doug Evans
0b0caaf11b delete txvu/dvp/sky stuff, lives in mips dir now, configured with
mips64r5900-sky-elf.
1998-02-06 02:42:34 +00:00
Doug Evans
aea481da17 First pass at moving sky stuff from ../txvu to mips dir. 1998-02-06 02:29:22 +00:00
Andrew Cagney
8c9ee21e2f New files, update .Sanitize 1998-02-05 22:08:33 +00:00
Doug Evans
61b62559ba * cgen-sim.h (EX_FN_NAME): _exc_ -> _ex_.
(SEM_INSN): New macro.
1998-02-05 21:29:18 +00:00
Doug Evans
d542677191 Sanitize m32rx from cpu.h and m32r-sim.h. 1998-02-05 21:16:08 +00:00
Doug Evans
b8a9943dd4 * Makefile.in (m32r.o): Depend on cpu.h
(extract.o): Pass -DSCACHE_P.
	* mloop.in (extract{16,32}): Update call to m32r_decode.
	* arch.h,cpu.h,cpuall.h,decode.[ch]: Regenerate.
	* extract.c,model.c,sem-switch.c,sem.c: Regenerate.
	* sim-main.h: #include "ansidecl.h".
	Don't include cpu-opc.h, done by arch.h.
start-sanitize-m32rx
	* Makefile.in (M32RX_OBJS): Build m32rx support now.
	(m32rx.o): New rule.
	* m32r-sim.h (m32rx_h_cr_[gs]et): Define.
	* m32rx.c (m32rx_{fetch,store}_register): Update {get,set} of PC.
	(m32rx_h_accums_get): New function.
	* mloopx.in: Update call to m32rx_decode.  Rewrite exec loop.
	* cpux.h,decodex.[ch],modelx.c,readx.c,semx.c: Regenerate.
end-sanitize-m32rx
1998-02-05 21:01:06 +00:00
Ian Carmichael
e46ede536a * Update configure: txvu-elf changed to dvp-elf. 1998-02-04 18:46:18 +00:00
Andrew Cagney
37379a256b IGEN - Replace IMEM (IMEM_IMMED) macro with IMEM<insn-size> macro,
update v850, tic80 and mips simulators.
IGEN - Prepend prefix to more generated symbols and macros
(idecode_issue, instruction_word).
IGEN - Add -Wnowith option to supress warnings about word size
inflicts in input files.
MIPS - Clean up Makefile.in, m16.igen, m16.dc (new), m16run.c (new) so
that a mips16 simulator built using IGEN can be compiled.
1998-02-03 05:39:15 +00:00
Jason Molenda
240dd45fde Add sim-main.h to v850e_files for sanitization. 1998-02-03 01:37:25 +00:00
Andrew Cagney
4634263c4c Make IGEN the generator for all but mips16 simulators.
Clean up botched merge in interp.c:sim_open().
1998-02-02 14:14:17 +00:00
Andrew Cagney
a97f304b04 Add support for configuring the size of the floating point unit (fp_word).
For mips, move fp_registers into a separate array of type fp_word[].
1998-02-02 14:06:52 +00:00
Andrew Cagney
2acd126a47 Rewrite the mipsI/II/III pending-slot code. 1998-02-02 13:49:17 +00:00
Andrew Cagney
192ae475f9 Always compile FP code (test for FP at run-time).
Remove dependance of interp.c on gencode.c's output.
1998-02-02 08:25:33 +00:00
Andrew Cagney
fcb12def35 New test - verify sdl insn. 1998-02-02 06:16:07 +00:00
Andrew Cagney
01737f42d8 mips: Add multi-processor support for r5900. Others might work.
common, igen: Fix MP related bugs.
1998-02-01 03:29:48 +00:00
Andrew Cagney
412c4e940e Add config support for the size of the target address and OF cell. 1998-01-31 14:07:23 +00:00
Andrew Cagney
c4db5b04f8 mips - for r5900 generate igen simulator.
igen - stop crash when simulator isn't multi-sim'ed
1998-01-31 06:56:13 +00:00
Andrew Cagney
9ec6741b17 igen: Fix SMP simulator generator support.
Use the bfd-processor name in the sim-engine switch.
	Add nr_cpus argument to sim_engine_run.
tic80, v850, d30v, mips, common:
	Update
mips:	Fill in bfd-processor field of model records so that
	they match ../bfd/archures.
1998-01-31 06:23:41 +00:00
Doug Evans
d034002794 * Makefile.in (M32RX_OBJS): Comment out until m32rx port working.
* arch.h (HAVE_CPU_M32R{,X}): Delete, moved to m32r-opc.h.
	* arch.c (machs): Check ifdef HAVE_CPU_FOO for each entry.
1998-01-29 21:03:41 +00:00
Doug Evans
7649e13e67 * Makefile.in (M32RX_OBJS): Comment out until m32rx port working.
* arch.h (HAVE_CPU_M32RX): Likewise.
	* arch.c (machs): Check ifdef HAVE_CPU_FOO for each entry.
1998-01-29 19:25:37 +00:00
Doug Evans
7caebec6f6 * cgen.sh: Portably read parms past $9. 1998-01-29 12:14:10 +00:00
Michael Meissner
241b462435 Print compare bits in human readible form 1998-01-28 23:48:13 +00:00
Ian Carmichael
8ae6b5cd79 * Very, very early support for vu1 based on sce code.
* Modified Files:
*    ChangeLog Makefile.in hardware.c vu1.c vu1.h
* Added Files:
*    libvpe.c libvpe.h vpe.h vu.h
1998-01-28 02:04:32 +00:00
Ian Carmichael
53a560f95a * Incorporate GPR_SET() macro from mips/sim-main.h 1998-01-27 23:16:23 +00:00
Michael Meissner
629cfff05f Exit status is in r0, not r2 1998-01-26 03:23:55 +00:00
Michael Meissner
88f7d309fd If DEBUG has 0x20 set, turn traps into batch debugging 1998-01-25 00:13:19 +00:00
Doug Evans
ea32bce773 sanitize m32rx piece of _sim_cpu 1998-01-23 23:03:29 +00:00
Doug Evans
84af43e37d add m32rx sanitization to tconfig.in 1998-01-23 23:01:06 +00:00
Doug Evans
ed6f14718b * Make-common.in (stamp-tvals): New rule.
(targ-vals.h,targ-map.c): Depend on it.
	(clean): Remove stamp-tvals.
1998-01-23 22:22:23 +00:00
Michael Meissner
8831cb01b0 First round of d10v ABI changes 1998-01-23 16:30:08 +00:00
Frank Ch. Eigler
d1a18c2f83 - added first batch of PKE code
- PKE memory region registration
- basic R/W operations
- combined pke[01] -> pke
1998-01-23 00:38:10 +00:00
Fred Fish
cee687386d * interp.c (UMEM_SEGMENTS): New define, set to 128.
(sim_size): Use UMEM_SEGMENTS rather than hardwired constant.
	(sim_close): Reset prog_bfd to NULL after closing it.  Also
	reset prog_bfd_was_opened_p after closing prog_bfd.
	(sim_load): Reset prog_bfd_was_opened_p after closing prog_bfd.
	(sim_create_inferior): Get start address from abfd not prog_bfd.
	(xfer_mem): Do bounds checking on addresses and return zero length
	read/write on bad addresses, rather than aborting.  Prepare to
	be able to handle xfers that cross segment boundaries, but not
	yet implemented.  Only emit debug message when d10v_debug is
	set as well as DEBUG being defined.
1998-01-22 21:51:31 +00:00
Ian Carmichael
34cf4e9aa6 * Incorporate GPR_SET() macro from mips/sim-main.h 1998-01-22 20:48:22 +00:00
Andrew Cagney
2d44e12a27 Use macro GPR_SET(N,VAL) to clear zero registers. 1998-01-21 22:08:37 +00:00
Andrew Cagney
5a32e7eedb Delete bogus line in ChangeLog 1998-01-21 22:08:32 +00:00
Michael Meissner
e9ae18efdb #if 0 unused variable 1998-01-21 02:38:09 +00:00
Nick Clifton
34a3df1d20 Fixed duplicate definition of h_accums field in fmt_53_sadd structure 1998-01-20 22:23:34 +00:00
Ian Carmichael
1035731b50 * Devices now get a issue() call.
*
* Modified Files:
* 	ChangeLog configure engine-sky.c hardware.h pke0.c pke0.h
* 	pke1.c pke1.h vu0.c vu0.h vu1.c vu1.h
1998-01-20 19:22:25 +00:00
Doug Evans
94188a771a Add m32rx sanitization for new files. 1998-01-20 10:43:37 +00:00
Doug Evans
8e42015266 * Makefile.in: Add m32rx objs, and rules to build them.
* cpux.h, decodex.h, decodex.c, readx.c, semx.c, modelx.c: New files.
	* m32rx.c, mloopx.in: New files.
1998-01-20 10:43:16 +00:00
Doug Evans
d4feafa692 Regenerate. 1998-01-20 10:38:29 +00:00
Doug Evans
462cfbc4eb * aclocal.m4: Recognize --enable-maintainer-mode.
*/configure: Regenerated.
1998-01-20 06:37:00 +00:00
Doug Evans
2ddc0492e4 * arch-defs.h: Deleted.
* sem-switch.c: Regenerate.
1998-01-20 06:24:44 +00:00
Doug Evans
47d57be1db * cpu.h: New file. 1998-01-20 06:20:45 +00:00
Doug Evans
9d70630e0d Regenerate. 1998-01-20 06:18:51 +00:00
Doug Evans
369fba3089 * arch.c, arch.h, cpuall.h: New files.
* arch-defs.h: Deleted.
	* mloop.in: Renamed from mainloop.in.
	* sem.c: Renamed from semantics.c.
	* Makefile.in: Update.
	* sem-ops.h: Deleted.
	* mem-ops.h: Deleted.
start-sanitize-cygnus
	Add cgen support for generating files.
end-sanitize-cygnus
	(arch): Renamed from CPU.
	* decode.c: Redone.
	* decode.h: Redone.
	* extract.c: Redone.
	* model.c: Redone.
	* sem-switch.c: Redone.
	* sem.c: Renamed from semantics.c, and redone.
	* m32r-sim.h (PROFILE_COUNT_FILLNOPS): Update.
	(GETTWI,SETTWI,BRANCH_NEW_PC): Define.
	* m32r.c (WANT_CPU,WANT_CPU_M32R): Define.
	(m32r_{fetch,store}_register): New functions.
	(model_mark_{get,set}_h_gr): Prefix with m32r_.
	(m32r_model_mark_{busy,unbusy}_reg): Prefix with m32r_.
	(h_cr_{get,set}): Prefix with m32r_.
	(do_trap): Fetch state from current_cpu, not current_state.
	Call sim_engine_halt instead of engine_halt.
	* sim-if.c (alloc_cpu): New function.
	(free_state): New function.
	(sim_open): Call sim_state_alloc, and malloc space for selected cpu
	type.  Call sim_analyze_program.
	(sim_create_inferior): Handle selected cpu type when setting PC.
start-sanitize-m32rx
	(sim_resume): Handle m32rx.
end-sanitize-m32rx
	(sim_stop_reason): Deleted.
	(print_m32r_misc_cpu): Update.
start-sanitize-m32rx
	(sim_{fetch,store}_register): Handle m32rx.
end-sanitize-m32rx
	(sim_{read,write}): Deleted.
	(sim_engine_illegal_insn): New function.
	* sim-main.h: Don't include arch-defs.h,sim-core.h,sim-events.h.
	Include arch.h,cpuall.h.  Include cpu.h,decode.h if m32r.
start-sanitize-m32rx
	Include cpux.h,decodex.h if m32rx.
end-sanitize-m32rx
	(_sim_cpu): Include member appropriate cpu_data member for the cpu.
	(M32R_MISC_PROFILE): Renamed from M32R_PROFILE.
	(sim_state): Delete members core,events,halt_jmp_buf.
	Change `cpu' member to be a pointer to the cpu's struct, rather than
	record inside the state struct.
	* tconfig.in (WITH_DEVICES): Define here.
	(WITH_FAST,WITH_SEM_SWITCH_{FULL,FAST}): Define for the cpu.
1998-01-20 06:17:32 +00:00
Doug Evans
4a44afd5c7 * Make-common.in (cgen-run.o,cgen-scache.o): Delete cgen-scache.h dep. 1998-01-20 03:57:14 +00:00
Doug Evans
36de6f40d4 sanitize keep-cygnus cgen generation 1998-01-20 02:36:21 +00:00
Doug Evans
189e2694ad * Make-common.in (cgen-{arch,cpu,decode}): New targets.
* 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 21:14:14 +00:00
Doug Evans
8cc6a83b83 * sim-base.h (sim_state_base): Delete member `model'.
(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 21:11:00 +00:00
Doug Evans
7e13b93461 * sim-utils.c (sim_state_alloc): Delete setting of cpu backlink here. 1998-01-19 21:09:43 +00:00
Doug Evans
76da664703 Fix comment. 1998-01-19 14:13:30 +00:00
Nick Clifton
ef13d3e3ed replaced call to CGEN_INSN_SYNTAX()->mnemonic with CGEN_INSN_MNEMONIC() 1998-01-16 20:36:07 +00:00
Nick Clifton
ea9cac8aee Fix typo: .syntax.name should have been .name 1998-01-16 20:19:21 +00:00
Ian Carmichael
1e1e3b618f * Initial Device Support
*
*Modified Files:
*    .Sanitize ChangeLog
*Added Files:
*    Makefile.in README.Cygnus config.in configure configure.in
*    device.c device.h dma.c dma.h engine-sky.c gencode.c gpuif.c
*    gpuif.h hardware.c hardware.h interp.c m16.igen mdmx.igen
*    mips.dc mips.igen pke0.c pke0.h pke1.c pke1.h r5900.igen
*    sim-main.h tconfig.in vr5400.igen vu0.c vu0.h vu1.c vu1.h
1998-01-16 19:27:02 +00:00
Andrew Cagney
13151a934d Document existence of old (gencode) and new (igen) MIPS ISA simulators. 1998-01-16 01:09:15 +00:00
Ian Carmichael
1d37a68fe4 * configure.in: Add sky support
* configure: Regenerated
1998-01-15 15:45:41 +00:00
Ian Carmichael
b749e0e847 Initial file creation 1998-01-15 15:24:16 +00:00
Ian Carmichael
eba01826a5 Sky Sanitization 1998-01-15 15:12:51 +00:00
Mark Alexander
e0e0fc765e * interp.c (sim_monitor): Handle Densan monitor outbyte
and inbyte functions.
1998-01-05 23:43:30 +00:00
Felix Lee
76ef416550 * interp.c (sim_engine_run): msvc cpp barfs on #if (a==b!=c). 1997-12-29 16:03:23 +00:00
Andrew Cagney
9c8ec16d78 In nrun.c, look for sigaction & SA_RESTART. When both present,
install cntrl-c (SIGINT) handler with no SA_RESTART bit set.
1997-12-15 12:33:59 +00:00
Andrew Cagney
b17d2d1474 For MADD et.al. instructions sign extend 32 bit result assigned to a
register.
1997-12-13 04:23:31 +00:00
Jeff Law
255cbbf190 * configure.in (sim_igen_filter): Multi-sim vr5000 - vr5000 or
vr5400 with the vr5000 as the default.
1997-12-12 19:24:34 +00:00
Nick Clifton
61c550e0bd Renamed v850eq -> v850ea 1997-12-12 19:12:11 +00:00
Nick Clifton
e317cee2ba Parent directory renamed. 1997-12-12 02:01:21 +00:00
Felix Lee
06434f5f16 sanitization fixes. (files not mentioned, fences misspelled) 1997-12-11 04:18:47 +00:00
Jeff Law
23850e9219 * mips.igen (MSUB): Fix to work like MADD.
* gencode.c (MSUB): Similarly.
1997-12-11 00:11:04 +00:00
Andrew Cagney
c10ae9ad33 Test/fix d10v RTE instruction. 1997-12-09 05:46:48 +00:00
Andrew Cagney
c02ed6a8a3 For bfd, add vr5400 and vr5000 mips machine variants to list of machines.
For sim/mips, enable multi-sim support when mips64vr5400-elf is target.
For sim/igen, allow specification of a default machine (will need
more work later).
1997-12-09 04:01:06 +00:00
Andrew Cagney
38d0ccc27a Fix typo, REP_S was refering to REP_E register.
Add test.
1997-12-08 23:44:11 +00:00
Andrew Cagney
bc6df23d14 For "trap", IBT and RIE exceptions, mask all PSW.SM. NB: Stepping
through an exception may not work correctly.
For GDB reads/writes to the control registers, ensure the cpu state is
updated correctly.
1997-12-08 03:22:58 +00:00
Nick Clifton
4098c12318 Reverrt breakpoint back to its old value. 1997-12-05 17:30:44 +00:00