* mips-tdep.c (unpack_mips16): Fixed instruction decoding, lots of
bit pattern interpretations. mips_fetch_instruction does not work
for 16 bit instructions. Some confusion remains about sign
extension in backward branches.
(mips32_relative_offset): Sign extension
(mips32_next_pc): Major debugging, bit pattern interpretation
(print_unpack): debugging printf
(fetch_mips_16): new funtion, key on PC low bit, not symbol table
(mips16_next_16): Initial major debugging of this function. Lots
of bit pattern mistakes.
(mips_next_pc): key on low bit of PC, not symbol table.
* symfile.c(generic_load) : Added a download verification which
reads back the loade code. Download chunk size is now a defined
macro. Fixed a bug in which downloading slips into loading one
byte at a time. Lower level functions in monitor.c can load long
sequences of bytes and make use of these fixups. Referencing
bfd-start_address directly was incorrectly getting zero for start.
(compute_mpgloc): New function.
(eval_expr): New arg `cpu'. All callers updated.
(non_vu_insn_seen_p): New static global.
(RELAX_{MPG,DIRECT,VU,ENCODE,GROWTH,DONE_}): New macros.
(struct dvp_fixup): New member `cpu'.
(assemble_one_insn): New args init_fixup_count, fixup_offset.
All callers updated.
(md_assemble): Set non_vu_insn_seen_p as appropriate.
(assemble_vif): Set `cpu' field of fixup.
Clean up calls to frag_var. Recorded mpgloc is now in bytes.
(assemble_vu_insn): Delete, contents moved into ...
(assemble_vu): ... here. Don't record fixups until after parsing
both upper and lower insns. If branch insn inside mpg, properly
compute target address.
(dvp_frob_label): Create copies of vu labels inside mpg's.
(dvp_relax_frag): Clean up.
(md_convert_frag): Ditto.
(md_apply_fix3): Signal error if mpg embedded vu code has branch
to undefined label (not currently supported).
(eval_expr): New arg `cpu'. All callers updated.
(insert_operand_final): Convert mpgloc from bytes to dwords.
(s_endmpg): Use compute_mpgloc to update $.mpgloc.
(s_state): If switching to vu state, initialize $.mpgloc.
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.
section in an ELF file, override a symbol's ECOFF section with its
ELF section. Also, fix stabs continuation where a stabs string
continues for more than one continuation.
addr_size.
(read_address): Replace 'bdf*' argument with 'comp_unit*' argument.
Use addr_size for address size, rather than sizeof(bfd_vma).
(read_attribute): Replace bdf* argument with 'comp_unit*' argument.
Fix call to read_address.
(decode_line_info): Replace bdf* argument with 'comp_unit*' argument.
Scrap other unneeded arguments. Fix call to read_address.
(scan_unit_for_functions): Fix call to read_attribute.
(parse_comp_unit): We now handle more values for addr_size.
Set addr_size in unit. Fix call to read_attribute and
decode_line_info.