* 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.
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.
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.
Instead save them in the sim_hw structure.
*) Route sim-core accesses to hw devices through the sim_hw module.
*) Route hw device requests to abort/halt through the sim_hw module.
*) Add print parameter to hw_tree_print() function.
*) Add sim_engine_vabort () function.
* common/aclocal.m4: call AM_EXEEXT in SIM_AC_COMMON, define
AM_CYGWIN32 and AM_EXEEXT.
* common/Make-common.in: set EXEEXT, add missing EXEEXTs
to run and install-common rules.
* common/configure: regenerate
And update all subdirectory ChangeLogs and configure files.
and variable renaming due to macro insn additions.
* mloop.in: Update to use CGEN_INSN_NUM.
* cpu.x,modelx.c,readx.c,semx.c: Regenerated.
* mloopx.in: Update to use CGEN_INSN_NUM.
and variable renaming due to macro insn additions.
* mloop.in: Update to use CGEN_INSN_NUM.
* cpu.x,modelx.c,readx.c,semx.c: Regenerated.
* mloopx.in: Update to use CGEN_INSN_NUM.
../common' to autoconf and autoheader. Unconditionally run
autoconf in every subdir.
(autoconf-changelog autoheader-changelog): Unconditionally run
commands in every subdir.
(autoconf-install autoheader-install): Likewise.
* config.in: Ditto.
* Makefile.in (top_builddir): New macro.
(INTLLIBS): New macro.
(INTLDEPS): Likewise.
(psim): Depend on INTLDEPS; link against INTLLIBS.
* configure.in: Call CY_GNU_GETTEXT.
* config.in: Ditto.
* acconfig.h: New file.
* Make-common.in (top_builddir): New macro.
(INTL_LIB): Removed.
(INTLLIBS): New macro.
(INTLDEPS): Likewise.
(LIBDEPS): Use INTLDEPS.
(EXTRA_LIBS): Use INTLLIBS.
* aclocal.m4 (SIM_AC_COMMON): Call CY_GNU_GETTEXT.
(CY_WITH_NLS, CY_GNU_GETTEXT, AM_PATH_PROG_WITH_TEST,
AM_LC_MESSAGES): New macros from GNU gettext.
* gen.c (insns_bit_useless): Perform unsigned bit comparisons.
* filter.c (is_filtered_out, filter_parse): Pacify GCC, len is unsigned.
* gen-icache.c (print_icache_extraction): Do not type cast pointers.
o When unpacking an r5900 FP value,
was not treating IEEE-NaN's as very
large values.
o When packing an r5900 FP result from an infinite
precision intermediate value was saturating
to IEEE-MAX instead of r5900-MAX
o The least significant bit of the FP status
register did not stick to one.
* 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.
[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.
[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.
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.
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.
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.
: ----------------------------------------------------------------------
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
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.
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
(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.
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.
* (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.
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.
* 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.
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.
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.
* 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.
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.
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.
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.
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.
* 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.