printing references the symbol table to determine whether the
instruction resides in a block regular instructions or mips16
instructions. However, when the disassembler gets used in other
environments where the symbol table is not present, we no longer
rely in the symbol table, rather, use the low bit of the
instructions address to guess. There should be no change for usage
of the disassembler in host based programse, gdb ,objdump.
(print_insn_big_mips): ditto.
(print_insn_mips): ditto
* m10300-opc.c (USP, SSP, MSP, PC, IMM4, EPSW, RN0, RM1): New
operands for the am33.
(mn10300_opcodes): Add new instructions from the am33.
end-sanitize-am33
* m10300-opc.c (mn10300_opcodes): Change opcode for "syscall".
Snapshot current work.
* i386-dis.c: Don't print opcode suffix when we can figure out the
size (and gas can!) by register operands, or from the default
size.
(putop): Handle 'A', 'B', 'L', 'P', 'Q', 'R' macros. Rename 'C'
macro to 'E'.
(dis386, dis386_twobyte, grps): Use new suffix macros.
(dis386): Correct imul Ib to imul sIb. Change jnl to jge to be
consistent. Add suffix for call, jmp, lcall, ljmp, iret. Reverse
order of cmps operands to agree with Intel docs. Correct operand
of aad and aam (Ib -> sIb). Change ud2b from 0fb8 to 0fb9 to
agree with Intel docs.
(print_insn_x86): Print orphan fwait before other prefixes.
Return correct byte count for orphan fwait with prefixes. Don't
print `bound' operands in reverse order.
(ckprefix): Stop accumulating prefixes if we get fwait.
(OP_DIR): Print `$' before Ap operands of ljmp, lcall.
Fix problems when bfd_vma is wider than long.
* i386-dis.c: Make op_address and start_pc unsigned.
(set_op): Make parameter unsigned.
(print_insn_x86): Cast to bfd_vma when passing a value to
print_address_func.
* ns32k-dis.c (CORE_ADDR): Don't define.
(print_insn_ns32k): Change type of addr to bfd_vma. Use
bfd_scan_vma to read back address.
(print_insn_arg): Change type of addr to bfd_vma. Use sprintf_vma
to format it.
* m68k-dis.c (COERCE32): Cast to bfd_signed_vma to avoid overflow.
(NEXTULONG): New definition.
(print_insn_m68k): Avoid overflow when computing third argument of
print_insn_arg.
(print_insn_arg): Use NEXTULONG to fetch 32 bit address values.
Use disp instead of val to store offset values.
(print_indexed): Use base_disp instead of word to store base
displacement, to avoid overflow.
* m10300-dis.c (disassemble): Cast value to long when computing
pc-relative address, to get correct sign extension.
* i386-dis.c: Combine aflag and dflag into sizeflag. Change OP_*
functions to void.
(OP_DSreg): Rename from OP_DSSI.
(OP_ESreg): Rename from OP_ESDI.
(Xb, Xv, Yb, Yv): Use index reg code, not b_mode or v_mode.
(DSBX): Define.
(append_seg): Rename from append_prefix.
(ptr_reg): New function.
(dis386): Add S suffix to pushf, popf, ret, lret, enter, leave.
Add DSBX for xlat.
(PREFIX_ADDR): Rename from PREFIX_ADR.
(float_reg): Add non-broken opcodes for people who don't want
UNIXWARE_COMPAT.
* ppc-opc.c (powerpc_macros): Support shifts and rotates of size
0; produce error message for shifts of size 32 (or 64 for 64-bit
shifts), because the hardware doesn't support them.
Thu May 7 12:49:46 1998 Frank Ch. Eigler <fche@cygnus.com>
* mips-opc.c (teq,tge,tgeu,tlt,tltu,tne): Added three-operand
variety of ISA2 instructions to set bottom ten bits of trap code.
(asm_hash_table_entries): New variable.
(cgen_asm_init): Free asm_hash_table_entries.
(hash_insn_array,hash_insn_list): New functions.
(build_asm_hash_table): Use them. Hash macro insns as well.
(cgen_asm_lookup_insn): Update.
* cgen_dis.c (cgen_current_opcode_table): Renamed from ..._data.
(dis_hash_table_entries): New variable.
(cgen_dis_init): Free dis_hash_table_entries.
(hash_insn_array,hash_insn_list): New functions.
(build_dis_hash_table): Use them. Hash macro insns as well.
(cgen_dis_lookup_insn): Update.
* cgen-opc.c (cgen_current_opcode_table): Renamed from ..._data.
(cgen_set_cpu,cgen_hw_lookup,cgen_insn_count): Update.
(cgen_macro_insn_count): New function.
* cgen-opc.in (@arch@_cgen_lookup_insn): New arg alias_p.
All callers updated. Sanity check result of extract fn.
(@arch@_cgen_get_insn_operands): Change result type to void.
Delete args insn_value, length. New arg fields. All callers updated.
(@arch@_cgen_lookup_get_insn_operands): New function.
now correctly disassemble during runs under the sky VU0 simulator.
[ChangeLog]
Mon Apr 13 16:02:02 1998 Frank Ch. Eigler <fche@cygnus.com>
* vu0.h: Corrected bit pattern for VMAXI opcode.
(dvp_expand_macro): Implement.
(insert_vif_datalen): Record value with max+1 -> 0 conversion.
(vif_unpack_len): Perform 0 -> max+1 conversion on `wl' value.
* ns32k-dis.c (bit_extract_simple): New function to extract bits
from an arbitrary valid buffer instead of fetching them on demand
using fetch_data().
(invalid_float): use bit_extract_simple() instead of bit_extract().
contributed to me for gdb 4.17.
* dvp-opc.c (parse_vif_mpgloc): Renamed from parse_vif_mpgloc_star.
Don't skip over '*', just record it.
(insert_vif_mpgloc): Don't update state_vif_mpgloc if '*' value.
(parse_vif_unpackloc): Renamed from parse_vif_unpackloc_star.
Don't skip over '*', just record it.
(insert_vif_unpackloc): Don't update state_vif_unpackloc if '*' value.
(vif_operands): Delete VIF_MPGLOC_STAR,VIF_UNPACKLOC_STAR entries.
(vif_opcodes): Likewise.
(state_vif_{mpg,unpack}loc_star_p): New static locals.
(vif_macros,vif_macro_count): New globals.
(vif_unpack_len_value): New arguments wl,cl. All callers updated.
(vif_set_{mpg,unpack}loc): Delete. All callers updated.
(vif_get_wl_cl): New function.
(dvp_opcode_init_parse): Init mpgloc,unpackloc state.
* i960-dis.c (pinsn): Change type of first argument to bfd_vma.
(ctrl, cobr, mem, ea): Likewise.
(print_addr): Likewise. Remove cast.
(ea): Cast argument of print_addr to bfd_vma.
* cgen-asm.c (cgen_parse_signed_integer): Fix type of local
variable value.
(cgen_parse_unsigned_integer): Likewise.
(cgen_parse_address): Likewise.
Wed Mar 25 14:31:31 1998 Ian Lance Taylor <ian@cygnus.com>
* i960-dis.c (ctrl): Add full braces to structure initialization.
(cobr, mem, reg): Likewise.
(ea): Correct parenthesization in expression.
* cgen-asm.c: Include <ctype.h>.
(build_asm_hash_table): Remove unused local variable i.
(cgen_parse_keyword): Add casts to avoid warnings.
* arm-dis.c (print_insn_big_arm): Only call coffsymbol for a COFF
symbol. Fix indentation.
(print_insn_little_arm): Likewise.
* mips-opc.c: Include vu0.h.
* mips-dis.c (print_insn_arg): Handle new args 0-9, +, -, %, K, &,
J, Q, X, and U.
(print_insn_mips): Do not emit a tab after an instruction if the
first arg is an instruction completer (&). If the next arg is an
escape character (%), then print the next arg verbatim.
* Makefile.am (mips-opc.lo): Depend on vu0.h