2002-07-26 Chris Demetriou <cgd@broadcom.com>
* gas/mips/elf_ase_mips16.d: New file to test ELF MIPS16 ASE marking.
* gas/mips/elf_ase_mips16.s: Likewise.
* gas/mips/mips.exp: Run the new test.
[ ld/testsuite/ChangeLog ]
2002-07-26 Chris Demetriou <cgd@broadcom.com>
* ld-mips-elf/mips16-1.d: Check that ASE flag is actually set.
* doc/c-mips.texi: Remove -mcpu. Document -mabi.
* configure.in (MIPS_CPU_STRING_DEFAULT): New configuration macro.
(USE_E_MIPS_ABI_O32, MIPS_DEFAULT_64BIT): New configuration macros.
* configure, config.in: Regenerate.
* config/tc-mips.c (file_mips_abi): Rename to mips_abi.
(mips_set_options): Remove "abi" field.
(mips_opts): Update accordingly. Replace all uses of mips_opts.abi
with mips_abi.
(mips_cpu): Remove.
(mips_arch_string, mips_arch_info): New vars.
(mips_tune_string, mips_tune_info): New vars.
(ABI_NEEDS_32BIT_REGS, ABI_NEEDS_64BIT_REGS): New macros.
(HAVE_32BIT_GPRS, HAVE_32BIT_FPRS): Don't check the ABI.
(mips_isa_to_str, mips_cpu_to_str): Remove.
(mips_ip): If the selected architecture is a generic ISA rather
than a processor, only mention the ISA level in error messages.
(OPTION_MCPU): Remove.
(OPTION_FP64): New.
(md_longopts): Add -mfp64, remove -mcpu.
(mips_set_option_string): New fn.
(md_parse_option): Make -mipsN update file_mips_isa rather than
mips_opts.isa. Use mips_set_option_string to set -march or -mtune.
Don't let -mgp32 and -mfp32 change the ABI.
(show): Move to end of file. Constify string argument.
(md_show_usage): Move to the end of the file. Read available
architectures from mips_cpu_info_table.
(mips_set_architecture): New fn.
(mips_after_parse_args): Rework. Remove -mcpu handling. -mipsN
is an alias for -march=mipsN. Don't change the ABI based on other
flags. Infer the register size from the ABI as well as the
architecture. Complain about more conflicting arguments.
Unify logic with GCC.
(s_mipsset): Don't change the ABI.
(mips_elf_final_processing): Check USE_E_MIPS_ABI_O32.
(mips_cpu_info_table): Remove Generic-MIPS* entries, keeping just
"mipsN"-type entries. Remove entries that vary only in the
manufacturer's prefix, or that have "000" replaced by "k".
Remove TARGET_CPU entries. Make r2000 entry use CPU_R3000.
(mips_strict_matching_cpu_name_p, mips_matching_cpu_name_p): New fns.
(mips_parse_cpu): New fn.
(mips_cpu_info_from_name, mips_cpu_info_from_cpu): Remove.
(mips_cpu_info_from_isa): Minor formatting tweak.
[gas/testsuite]
* gas/mips/mips-gp32-fp64.d,
* gas/mips/mips-gp32-fp64-pic.d: Add -mfp64.
(ppc_cpu): Make it unsigned long to agree with struct powerpc_opcode
flags.
(ppc_size): Delete.
(ppc_xcoff64): Rename to ppc_obj64.
(md_parse_option <m>): Encode old ppc_size value in ppc_cpu.
(ppc_set_cpu): Set PPC_OPCODE_32 too.
(ppc_arch): Use ppc_obj64 instead of ppc_size to select bfd_mach_ppc64
or bfd_mach_ppc.
(ppc_target_format): Use ppc_obj64 to select format.
(md_begin): Adjust for PPC_OPCODE_32/64 in ppc_cpu.
(ppc_insert_operand): Use ppc_obj64 instead of ppc_size.
(ppc_elf_suffix): Likewise. Don't depend on BFD_DEFAULT_TARGET_SIZE.
(tc_frob_symbol): Likewise.
(md_assemble): Use ppc_obj64 instead of ppc_size. Don't depend on
BFD_DEFAULT_TARGET_SIZE.
(ppc_tc): Likewise.
(ppc_is_toc_sym): Likewise.
(md_apply_fix3): Likewise.
* config/tc-ppc.h (TC_FORCE_RELOCATION): Don't depend on
BFD_DEFAULT_TARGET_SIZE.
(ELF_TC_SPECIAL_SECTIONS): Likewise.
(tc_frob_symbol): Likewise.
(mips_ip): Likewise.
* mips.h (INSN_MIPS16): New define.
* mips-dis.c (mips_isa_type): Add MIPS16 insn handling.
* mips-opc.c (I16): New define.
(mips_builtin_opcodes): Make jalx an I16 insn.
From Catherine Moore, Michael Meissner, Richard Sandiford, Dave Brolley:
* po/POTFILES.in: Add tc-frv.c, tc-frv.h.
* configure.in: Support frv-*-*.
* Makefile.am (CPU_TYPES): Add frv.
(TARGET_CPU_CFILES): Add tc-frv.c.
(TARGET_CPU_HFILES): Add tc-frv.h.
(DEPTC_frv_coff): New variable.
(DEPTC_frv_elf): New variable.
(DEPOBJ_frv_coff): New variable.
(DEPOBJ_frv_elf): New variable.
(DEP_frv_coff): New variable.
(DEP_frv_elf): New variable.
* tc-frv.c: New file.
* tc-frv.h: New file.
* configure.in (vax-*-netbsdelf*, vax-*-netbsdaout*)
(vax-*-netbsd*): New targets.
* configure: Regenerate.
* config/aout_gnu.h (enum machine_type): Add M_VAX4K_NETBSD.
* config/tc-vax.c: Add support for ELF and PIC.
(flag_want_pic): New flag.
(float_cons): Fix prototype.
(md_apply_fix3): Adjust for BFD_ASSEMBLER.
(md_assemble): Introduce a new is_absolute local, and use it
rather than repeating the test. Make fatal errors actually
fatal by using as_fatal as appropriate. Adjust for BFD_ASSEMBLER.
Add support for ELF. Add support for PIC.
(md_convert_frag): Adjust for BFD_ASSEMBLER.
(tc_aout_fix_to_chars): Only include if OBJ_AOUT and not
BFD_ASSEMBLER.
(vax_reg_parse): Make the % register prefix mandatory for ELF,
optional for a.out, and not allowed for VMS. Adjust all callers.
(md_create_short_jump): Add ATTRIBUTE_UNUSED to unused arguments.
(md_create_long_jump): Likewise.
(md_undefined_symbol): Likewise.
(md_section_align): Likewise.
(md_shortopts): Allow -k and -K for ELF.
(md_parse_option): Set flag_want_pic if -k or -K.
(tc_headers_hook): New function if OBJ_AOUT and not BFD_ASSEMBLER.
(tc_gen_reloc): New function if BFD_ASSEMBLER.
* config/tc-vax.h (tc_headers_hook): Remove.
(TARGET_FORMAT): Set according to object format and target
environment.
(BFD_ARCH, TARGET_ARCH): Define.
(NO_RELOC): Adjust for BFD_ASSEMBLER.
(TC_RELOC_RTSYM_LOC_FIXUP, TC_FIX_ADJUSTABLE)
(tc_fix_adjustable): Define if BFD_ASSEMBLER.
* config/vax-inst.h (VAX_JSB, VAX_CALLS, VAX_CALLG): Define.
Based on patch from Matt Green:
* config/obj-elf.h (ECOFF_DEBUGGING): Make configurable.
* config/tc-mips.c (s_mips_file): Renamed from s_file.
(s_mips_loc): New function.
(mips_nonecoff_pseudo_table): Call them.
(append_insn): Call dwarf2_emit_insn.
Based on patch from Matt Green:
* config/obj-elf.h (ECOFF_DEBUGGING): Make configurable.
* config/tc-mips.c (s_mips_file): Renamed from s_file.
(s_mips_loc): New function.
(mips_nonecoff_pseudo_table): Call them.
(append_insn): Call dwarf2_emit_insn.
to -1.
(file_ase_mips16): New veriable.
(mips_eabi64): Remove.
(CPU_HAS_MIPS16): New define.
(CPU_HAS_MDMX): Fix data type.
(md_begin): Code cleanup. Use file_ase_mips16.
(mips_elf_final_processing): Handle mips16 header flag.
Handle EABI flag without intermediate variable.
(md_begin): Add $zero as alias name for $0.
(insn_uses_reg): Use ZERO define.
(mips_ip): Add $zero as alias name for $0.
(mips16_ip): Likewise.
(s_cplocal): Demand empty rest of input line.
(tc_get_register): Likewise. Add support for $kt0, kt1 register
names. Use ZERO define. Fix input_line_pointer progress.
(symbol_find_exact): Split out from..
(symbol_find_base): ..here.
* symbols.h: Replace CONST by const throughout.
(symbol_find_exact): Declare.
* config/obj-elf.c: #include "struc-symbol.h".
(elf_frob_file): If group name matches an exported symbol, use that
symbol for the signature and ".group" as the section name.
linkonce flag. Print all warnings.
(obj_elf_section): Parse ",comdat" for groups.
(elf_frob_file): Set SEC_LINK_ONCE on COMDAT groups. Check
consistency of comdat flag.
2002-05-31 Chris G. Demetriou <cgd@broadcom.com>
Ed Satterthwaite <ehs@broadcom.com>
* mips-opc.c: Add support for SB-1 MDMX subset and extensions.
[ gas/testsuite/ChangeLog ]
2002-05-31 Chris G. Demetriou <cgd@broadcom.com>
* gas/mips/sb1-ext-mdmx.s: New file.
* gas/mips/sb1-ext-mdmx.d: Likewise.
* gas/mips/mips.exp: Run new "sb1-ext-mdmx" test.
2002-05-30 Chris G. Demetriou <cgd@broadcom.com>
Ed Satterthwaite <ehs@broadcom.com>
* config/tc-mips.c (mips_set_options): New "ase_mdmx" member.
(mips_opts): Initialize "ase_mdmx" member.
(file_ase_mdmx): New variable.
(CPU_HAS_MDMX): New macro.
(md_begin): Initialize mips_opts.ase_mdmx and file_ase_mdmx
based on command line options and configuration defaults.
(macro_build): Note in comment that use of MDMX in macros is
not currently allowed.
(validate_mips_insn): Add support for the "O", "Q", "X", "Y", and
"Z" MDMX operand types.
(mips_ip): Accept MDMX instructions if mips_opts.ase_mdmx is set,
and add support for the "O", "Q", "X", "Y", and "Z" MDMX operand
types.
(OPTION_MDMX, OPTION_NO_MDMX, md_longopts, md_parse_option):
Add support for "-mdmx" and "-no-mdmx" options.
(OPTION_ELF_BASE): Move to accomodate new options.
(s_mipsset): Support ".set mdmx" and ".set nomdmx".
(mips_elf_final_processing): Set MDMX ASE ELF header flag if
file_ase_mdmx was set.
* doc/as.texinfo: Document -mdmx and -no-mdmx options.
* doc/c-mips.texi: Likewise, and document ".set mdmx" and ".set
nomdmx" directives.
[ gas/testsuite/ChangeLog ]
2002-05-30 Chris G. Demetriou <cgd@broadcom.com>
* gas/mips/mips64-mdmx.s: New file.
* gas/mips/mips64-mdmx.d: Likewise.
* gas/mips/mips.exp: Run new "mips64-mdmx" test.
[ include/opcode/ChangeLog ]
2002-05-30 Chris G. Demetriou <cgd@broadcom.com>
* mips.h (OP_SH_ALN, OP_MASK_ALN, OP_SH_VSEL, OP_MASK_VSEL)
(MDMX_FMTSEL_IMM_QH, MDMX_FMTSEL_IMM_OB, MDMX_FMTSEL_VEC_QH)
(MDMX_FMTSEL_VEC_OB, INSN_READ_MDMX_ACC, INSN_WRITE_MDMX_ACC)
(INSN_MDMX): New constants, for MDMX support.
(opcode character list): Add "O", "Q", "X", "Y", and "Z" for MDMX.
[ opcodes/ChangeLog ]
2002-05-30 Chris G. Demetriou <cgd@broadcom.com>
Ed Satterthwaite <ehs@broadcom.com>
* mips-dis.c (print_insn_arg): Add support for 'O', 'Q', 'X', 'Y',
and 'Z' formats, for MDMX.
(mips_isa_type): Add MDMX instructions to the ISA
bit mask for bfd_mach_mipsisa64.
* mips-opc.c: Add support for MDMX instructions.
(MX): New definition.
* mips-dis.c: Update copyright years to include 2002.
(mips_big_got): Initialize.
(mips_trap): Initialize.
(load_address): Use mips_gp_register instead of hardcoded value.
Remove dbl parameter, use HAVE_32BIT_ADDRESSES instead.
(macro): Use mips_gp_register instead of hardcoded value.
(macro2): Change load_address calls.
(md_pcrel_from): Comment formatting.
(s_cpload): Use mips_gp_register instead of hardcoded value.
(s_cprestore): Likewise. Comment formatting.
(s_gpword): Fix data type.
(s_cpadd): Use mips_gp_register instead of hardcoded value.
(nopic_need_relax): Replace GP in comments by $gp.
(mips_elf_final_processing): Better comment.
* configure.in: Use ns32k-*-netbsd* instead of ns32k-pc532-netbsd*.
* configure: Regenerate.
ld:
* configure.tgt: Use ns32k-*-netbsd* instead of ns32k-pc532-netbsd*.
(SUB_SEGMENT_ALIGN): If HANDLE_ALIGN defined, pad out last frag to
section alignment.
* config/obj-coff.c (SUB_SEGMENT_ALIGN): Likewise.
* config/obj-ieee.c (SUB_SEGMENT_ALIGN): Likewise.
(write_object_file): Invoke md_do_align if available, and use
frag_align_code on text sections.
* config/obj-vms.h (SUB_SEGMENT_ALIGN): Now two args.
* config/tc-m88k.h (SUB_SEGMENT_ALIGN): Likewise.
* config/tc-ppc.h (SUB_SEGMENT_ALIGN): Likewise.
* config/tc-sh.h (SUB_SEGMENT_ALIGN): Likewise.
* config/tc-i386.h (SUB_SEGMENT_ALIGN): Likewise. Define for
BFD_ASSEMBLER too.