Commit Graph

2460 Commits

Author SHA1 Message Date
Alexandre Oliva 45f8dfe8f6 * config/tc-mips.c (mips_validate_fix): New function.
* config/tc-mips.h (TC_VALIDATE_FIX): Define.
(mips_validate_fix): Declare.
2003-03-12 23:07:38 +00:00
Alexandre Oliva d17b874b6c * gas/mips/branch-misc-2.s: Add branch to symbol in another
section.
* gas/mips/branch-misc-2.l: Update error messages and warnings.
2003-03-12 23:07:22 +00:00
Alexandre Oliva 0b25d3e680 * Reverted 2003-03-02's patch. 2003-03-12 23:06:08 +00:00
Alexandre Oliva f958455d3b * Reverted previous patch. 2003-03-12 23:05:31 +00:00
Richard Henderson 6174d9c85e * dwarf2dbg.c (generic_dwarf2_emit_offset): New.
(TC_DWARF2_EMIT_OFFSET): Provide default.
        (out_debug_aranges, out_debug_info): Use it.
        * config/tc-ia64.c (ia64_dwarf2_emit_offset): New.
        (ia64_cons_fix_new): Move FUNC_DTP_RELATIVE handling ...
        (ia64_gen_real_reloc_type): ... here.
        * config/tc-ia64.h (TC_DWARF2_EMIT_OFFSET): New.
2003-03-11 22:00:33 +00:00
Thiemo Seufer 149495708c * config/tc-mips.c (s_mips_end): Remove !BFD_ASSEMBLER case.
(s_mips_ent): Likewise.
2003-03-09 16:16:31 +00:00
Nick Clifton 7ae35b5a60 fix spelling typo. 2003-03-04 16:36:40 +00:00
Nick Clifton 11d78a8931 (mcu_types): Add recenly announced x1122 and x1123 devices, add missed x437.
(md_show_usage): Sort device list.
2003-03-04 16:34:40 +00:00
Joern Rennecke bdfaef528f Fix sh-elf linker relaxation:
gcc:
	* config/sh/sh.h (EXTRA_SPECS): Add subtarget_asm_relax_spec and
	subtarget_asm_isa_spec.
	(SUBTARGET_ASM_RELAX_SPEC, SUBTARGET_ASM_ISA_SPEC): Define.
	(ASM_SPEC): Define as SH_ASM_SPEC.
	(SH_ASM_SPEC): New; take the role of ASM_SPEC, but safe from svr4.h.
	Use subtarget_asm_relax_spec and subtarget_asm_isa_spec.
	* config/sh/elf.h (ASM_SPEC): Use SH_ASM_SPEC.
	(SUBTARGET_ASM_ISA_SPEC): Undef / define.
gcc/testsuite:
	gcc.dg/sh-relax.c: New test.

include/elf:
	* sh.h (EF_SH_MERGE_MACH): Make sure SH2E & SH3/SH3E merge to SH3E,
	and SH2E & SH4 merge to SH4, not SH2E.

gas:
	* config/tc-sh.c (sh_dsp): Replace with preset_target_arch.
	(md_begin): Use preset_target_arch.
	(md_longopts): Make isa option unconditional.
	(md_parse_option): Make OPTION_DSP and OPTION_ISA sh4 / any
	set preset_target_arch.
	(md_apply_fix3): If BFD_ASSEMBLER, adjust SWITCH_TABLE fixups
	by -S_GET_VALUE  (fixP->fx_subsy).
	(tc_gen_reloc): For SWITCH_TABLE fixups, the symbol is fixp->fx_subsy,
	and the addend is 0.
	Adjust addend of R_SH_IND12W relocations by fixp->fx_offset - 4.
	* config/tc-sh.h (TC_FORCE_RELOCATION_SUB_LOCAL): Define.

bfd:
	elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
	relocation (no special function), and make it non-partial_inplace.
	(sh_elf_relax_section): When creating a bsr, use a consistent value
	no matter if the symbol is extern or not;  set addend to -4.
	Don't swap load / non-load instructions for SH4.
	(sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
	rather than if the symbol is external to determine if adjusting the
	offset makes sense.  Adjust the addend too if appropriate.
	(sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
	relocation.
2003-03-03 21:04:01 +00:00
Thiemo Seufer 23b746d400 Leftover from previous commit. 2003-03-02 22:28:51 +00:00
Thiemo Seufer 7c2be35cae * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
R_MIPS_PC16 to rightshift 2.
	(elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
	(bfd_elf32_bfd_reloc_type_lookup): Support
	BFD_RELOC_MIPSEMB_16_PCREL_S2.
	* elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
	R_MIPS_PC16 to rightshift 2.
	(mips_elf64_howto_table_rela): Likewise.
	(mips_reloc_map): Map to rightshifted BFD reloc.
	* elfn32-mips.c: The same as in elf64-mips.c.
	* elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
	(mips_elf_calculate_relocation): Handle rightshifted addends for
	R_MIPS_PC16.
	* reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
	MIPS Embedded PIC. Remove superfluous empty COMMENT.
	* libbfd.h: Regenerate.
	* bfd-in2.h: Regenerate.
	* config/tc-mips.c (append_insn): Add handling of
	BFD_RELOC_MIPSEMB_16_PCREL_S2. Avoid emitting unneeded
	BFD_RELOC_16_PCREL_S2 relocs and add earlier warnings about
	misaligned address and reange overflow.
	(macro_build): Add handling of BFD_RELOC_MIPSEMB_16_PCREL_S2. Add
	earlier warnings about misaligned address and reange overflow.
	(mips_ip): Add handling of BFD_RELOC_MIPSEMB_16_PCREL_S2.
	(md_apply_fix): Likewise. Fix warning output.
	(tc_gen_reloc): Add handling of BFD_RELOC_MIPSEMB_16_PCREL_S2.
	Allow BFD_RELOC_16_PCREL_S2 for all ABIs.
	(md_convert_frag): Add handling of BFD_RELOC_MIPSEMB_16_PCREL_S2.
	* gas/mips/bge.d: Reactivate external branch tests.
	* gas/mips/bge.s: Likewise.
	* gas/mips/bgeu.d: Likewise.
	* gas/mips/bgeu.s: Likewise.
	* gas/mips/blt.d: Likewise.
	* gas/mips/blt.s: Likewise.
	* gas/mips/bltu.d: Likewise.
	* gas/mips/bltu.s: Likewise.
	* gas/mips/branch-misc-2.d: New File.
	* gas/mips/branch-misc-2.l: Remove.
	* gas/mips/mips.exp: Adjust branch-misc-2 test.
2003-03-02 21:30:15 +00:00
Nick Clifton cce4814f14 Update Maverick tests.
Contribute test generator.
2003-02-21 19:05:02 +00:00
Nick Clifton 77c6dd379a Add v850e debug registers. 2003-02-21 12:33:34 +00:00
Nick Clifton c125362777 Applied Bob Wilson's documentation fixes. 2003-02-21 10:35:07 +00:00
Richard Sandiford 64bdfcaf0d * config/tc-mips.c (prev_reloc_op_frag): New variable.
(macro): Check it to decide whether a new frag is needed.
	(my_getSmallExpression): Set it.
2003-02-21 10:28:27 +00:00
Nick Clifton 2ab1486e70 Fix typo: intial -> initial. 2003-02-20 18:59:32 +00:00
Alan Modra b1ac4c66ea * app.c (do_scrub_chars): Handle '||' in two states. 2003-02-19 10:46:52 +00:00
Alan Modra 426318c599 * write.c (TC_FORCE_RELOCATION_SUB_SAME): Revert last change.
* config/tc-s390.h (TC_FORCE_RELOCATION_SUB_SAME): Define.
2003-02-12 23:21:08 +00:00
Nick Clifton 42b5d0eaa9 Add support for configuring *-*-kaos targets. 2003-02-11 13:47:08 +00:00
Nick Clifton fde78edd7a Add support for marking ARM ELF binaries as support the Cirrus EP9312 Maverick
floating point co-processor.
2003-02-10 10:44:48 +00:00
Richard Sandiford 5919d0127e gas/
* config/tc-mips.c (reloc_needs_lo_p): New function.
	(fixup_has_matching_lo_p): New function.
	(append_insn): Use reloc_needs_lo_p to check whether a relocation
	might need a matching %lo().  Reuse the head of mips_hi_fixup_list
	if that fixup already has a matching %lo().  Don't call frag_wane here.
	(macro): Call frag_wane here if the last unmatched hi was in the
	current frag.
	(pic_need_relax): New function, split out from...
	(md_estimate_size_before_relax): ...here.
	(mips_frob_file): Use reloc_needs_lo_p.  Use pic_need_relax to test
	whether BFD_RELOC_MIPS_GOT16 fixups refer to global symbols.

gas/testsuite/
	* gas/mips/rel12.[sd], gas/mips/rel13.[sd]: New tests.
	* gas/mips/mips.exp: Run them.
2003-02-08 17:05:55 +00:00
Richard Sandiford 09b8f35ab2 * config/tc-mips.c (my_getSmallExpression): Rework bracket handling.
testsuite/
	* gas/mips/expr1.[sd]: New test.
	* gas/mips/mips.exp: Run it.
2003-02-07 15:06:33 +00:00
Alan Modra 43e9b45076 * gas/i386/x86-64-opcode.s: More tests for x86-64 MOVD opcodes.
* gas/i386/x86-64-opcode.d: Adjust to suit.
2003-02-06 01:49:39 +00:00
Alan Modra 5f6db75ada * config/tc-ppc.c (ppc_elf_suffix): Undo part of last change so that
x@toc+off works.
2003-02-06 01:24:17 +00:00
Alan Modra cdba85ecf4 * config/tc-ppc.c (mapping): Handle new TLS reloc specs.
(ppc_elf_suffix): Don't warn for x+off@got when ppc64 and don't
	accept x@got+off etc.
	(md_assemble): Handle TLS relocs.
	(ppc_force_relocation): Force for all TLS relocs.
	(ppc_fix_adjustable): Likewise.
	(md_apply_fix3): Handle TLS relocs.
2003-02-04 14:51:13 +00:00
Alan Modra 68bfbfcc5a bfd
* elf-bfd.h (enum elf_link_info_type): Remove.
	(struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
	to struct sec.  Remove linkonce_p field.
	(elf_linkonce_p): Delete.
	(elf_discarded_section): Update for sec_info_type change.
	* section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
	flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
	(ELF_INFO_TYPE_NONE): Define.
	(ELF_INFO_TYPE_STABS): Define.
	(ELF_INFO_TYPE_MERGE): Define.
	(ELF_INFO_TYPE_EH_FRAME): Define.
	(ELF_INFO_TYPE_JUST_SYMS): Define.
	(STD_SECTION): Update struct sec initializer.
	* ecoff.c (bfd_debug_section): Likewise.
	* elf.c: Likewise.  Update occurrences of sec_info_type and use_rela_p.
	* elflink.h: Likewise.
	* elf-eh-frame.c: Likewise.
	* elf64-alpha.c: Likewise.
	* elfxx-ia64.c: Likewise.
	* elfxx-mips.c: Likewise.
	* bfd-in2.h: Regenerate.

	* elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
	referring to used_by_bfd.
	* elf64-sparc.c (sec_do_relax): Likewise.
	* elf64-mmix.c (mmix_elf_section_data): Likewise.
	* elfxx-mips.c (mips_elf_section_data): Likewise.
	* ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
	(ieee_get_section_contents): Likewise.
	(ieee_new_section_hook): Formatting.
	(ieee_canonicalize_reloc): Remove commented out code.
	* mmo.c (mmo_section_data): Define.  Use throughout file.
	* oasys.c (oasys_get_section_contents): Use oasys_per_section macro.

gas
	* config/obj-elf.c (obj_elf_change_section): Set SEC_LINK_ONCE and
	SEC_LINK_DUPLICATES_DISCARD directly rather than using elf_linkonce_p.
2003-02-04 12:34:08 +00:00
Hans-Peter Nilsson 24fdaefe94 * gas/cris/rd-dw2-1.d: Adjust for dwarf2 directory table change. 2003-02-04 00:01:53 +00:00
Richard Sandiford 5e0116d519 gas/
* config/tc-mips.c (enum small_ex_type): Remove.
	(imm_unmatched_hi): Remove.
	(md_assemble): Remove use of imm_unmatched_hi.  Remove the last
	argument from calls to append_insn.
	(append_insn): Remove unmatched_hi parameter; check reloc_type[0]
	instead.
	(macro_build): Update append_insn calls.
	(mips16_macro_build, macro_build_lui): Likewise.
	(mips_ip): Rework handling of small expressions.  Move explicit
	relocation handling into my_getSmallExpression.  Assume that the
	value of 'o' operands is zero if there is only one bracketed
	expression left.
	(percent_op): Make constant.  Record the BFD relocation code
	associated with each operator.
	(my_getSmallParser, my_getPercentOp): Remove.
	(parse_relocation): New function.
	(my_getSamllExpression): Rework.  Fill in relocations here
	rather than in mips_ip.

gas/testsuite
	* gas/mips/elf-rel8.[sd], gas/mips/elf-rel9.[sd],
	gas/mips/elf-rel10.[sd], gas/mips/elf-rel11.[sd]: New tests.
	* gas/mips/mips.exp: Run elf-rel8 and elf-rel9 for all elf
	targets.  Run elf-rel10 and elf-rel11 for NewABI targets.
2003-02-02 19:37:20 +00:00
Nick Clifton 0d9f6d04b2 line_comment_chars: Add '#'. This makes the assembler's handling of
# <linenum> "<filename>" directives work.
2003-01-29 10:05:52 +00:00
Nick Clifton a7ed1ca202 Add code to create and use directory tables. 2003-01-28 11:20:36 +00:00
Nick Clifton df25fda59c Replace occurences of 'tolower' with 'TOLOWER'. 2003-01-28 11:02:40 +00:00
Jim Wilson 69906a9b3a Patch from David Mosberger.
* config/tc-ia64.c (dot_vframesp): Correct error message.
	(dot_vframepsp): Ditto.
2003-01-28 03:24:12 +00:00
Alexandre Oliva a4cb6c4d87 * gas/mips/n32-consec.d: New.
* gas/mips/n32-consec.s: New.
* gas/mips/mips.exp (run_list_test_arches): Run it on irix6 and
mips64*-linux* systems.
2003-01-27 23:01:55 +00:00
Alexandre Oliva 1de5b6a1a2 * configure.in (em): Set to irix on all Irix systems.
* configure: Rebuilt.
* config/te-irix.h: New file.
* config/tc-mips.c (mips_dwarf2_format): Use TE_IRIX to decide
whether to use Irix-specific 64-bit format.
2003-01-27 22:45:58 +00:00
Martin Schwidefsky 5cfbfc2b20 * Avoid designated initializers. 2003-01-27 08:44:21 +00:00
Jakub Jelinek b9734f3572 bfd/
* elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
	(elf32_sparc_rev32_howto): New variable.
	(sparc_reloc_map): Add TLS relocs.
	(elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
	Handle REV32.
	(sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
	New functions.
	(struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
	struct elf32_sparc_link_hash_table):
	New structures.
	(elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
	elf32_sparc_hash_table): Define.
	(link_hash_newfunc, elf32_sparc_link_hash_table_create,
	create_got_section, elf32_sparc_create_dynamic_sections,
	elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
	functions.
	(elf32_sparc_check_relocs): Handle TLS relocs.  Add dynamic reloc
	reference counting.
	(elf32_sparc_gc_sweep_hook): Likewise.
	(elf32_sparc_adjust_dynamic_symbol): Likewise.
	(elf32_sparc_size_dynamic_sections): Likewise.
	(elf32_sparc_relocate_section): Likewise.
	(allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
	New functions.
	(elf32_sparc_object_p): Allocate backend private object data.
	(bfd_elf32_bfd_link_hash_table_create,
	elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
	elf_backend_can_refcount): Define.
	(elf_backend_create_dynamic_sections): Define to
	elf32_sparc_create_dynamic_sections.
	* reloc.c: Add SPARC TLS relocs.
	* bfd-in2.h, libbfd.h: Rebuilt.
	* elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
	(sparc_reloc_map): Likewise.
gas/
	* config/tc-sparc.c (sparc_ip): Handle TLS % operators.
	(tc_gen_reloc): Handle TLS relocs.
	(sparc_cons, cons_fix_new_sparc): Handle %r_tls_dtpoff.
	* config/tc-sparc.h (tc_fix_adjustable): Don't adjust TLS
	relocs.
	* config/obj-elf.c (obj_elf_section_word): Handle tls.
	(obj_elf_type): Handle tls_object.
include/
	* elf/sparc.h: Add TLS relocs.  Move R_SPARC_REV32 to 252.
ld/testsuite/
	* ld-sparc/sparc.exp: New.
	* ld-sparc/tlsg32.s: New test.
	* ld-sparc/tlsg32.sd: Likewise.
	* ld-sparc/tlsg64.s: Likewise.
	* ld-sparc/tlsg64.sd: Likewise.
	* ld-sparc/tlslib.s: Likewise.
	* ld-sparc/tlsnopic.s: Likewise.
	* ld-sparc/tlspic.s: Likewise.
	* ld-sparc/tlssunbin32.dd: Likewise.
	* ld-sparc/tlssunbin32.rd: Likewise.
	* ld-sparc/tlssunbin32.s: Likewise.
	* ld-sparc/tlssunbin32.sd: Likewise.
	* ld-sparc/tlssunbin32.td: Likewise.
	* ld-sparc/tlssunbin64.dd: Likewise.
	* ld-sparc/tlssunbin64.rd: Likewise.
	* ld-sparc/tlssunbin64.s: Likewise.
	* ld-sparc/tlssunbin64.sd: Likewise.
	* ld-sparc/tlssunbin64.td: Likewise.
	* ld-sparc/tlssunbinpic32.s: Likewise.
	* ld-sparc/tlssunbinpic64.s: Likewise.
	* ld-sparc/tlssunnopic32.dd: Likewise.
	* ld-sparc/tlssunnopic32.rd: Likewise.
	* ld-sparc/tlssunnopic32.s: Likewise.
	* ld-sparc/tlssunnopic32.sd: Likewise.
	* ld-sparc/tlssunnopic64.dd: Likewise.
	* ld-sparc/tlssunnopic64.rd: Likewise.
	* ld-sparc/tlssunnopic64.s: Likewise.
	* ld-sparc/tlssunnopic64.sd: Likewise.
	* ld-sparc/tlssunpic32.dd: Likewise.
	* ld-sparc/tlssunpic32.rd: Likewise.
	* ld-sparc/tlssunpic32.s: Likewise.
	* ld-sparc/tlssunpic32.sd: Likewise.
	* ld-sparc/tlssunpic32.td: Likewise.
	* ld-sparc/tlssunpic64.dd: Likewise.
	* ld-sparc/tlssunpic64.rd: Likewise.
	* ld-sparc/tlssunpic64.s: Likewise.
	* ld-sparc/tlssunpic64.sd: Likewise.
	* ld-sparc/tlssunpic64.td: Likewise.
2003-01-24 23:44:45 +00:00
Martin Schwidefsky 1971b29d35 * config/tc-s390.c (s390_tls_suffix): New function.
(elf_suffix_type): Add suffix enums for TLS relocations.
	(s390_elf_suffix): Add suffix strings for TLS relocations.
	(s390_elf_cons): Map new lenght/elf suffix combinations for TLS to
	bfd relocations.
	(md_gather_operands): Map new instruction operand/elf suffix
	combinations for TLS to bfd relocations.
	(tc_s390_fix_adjustable): Add new TLS relocations.
	(tc_s390_force_relocation): Likewise.
	(md_apply_fix3): Likewise.
2003-01-24 17:14:25 +00:00
Alan Modra 1d3b2b274b Update copyright date 2003-01-24 01:12:30 +00:00
Alan Modra d4c7c97146 * config/tc-hppa.h (DIFF_EXPR_OK): Define.
(MD_APPLY_SYM_VALUE): Move.
2003-01-23 23:17:57 +00:00
Nick Clifton 5177500f26 Add SH2E support 2003-01-23 18:50:57 +00:00
Martin Schwidefsky 3434109f52 * gas/s390/reloc.s: Add test for PLT reloc against locally defined
but global function.
	* gas/s390/reloc.d: Likewise.
	* gas/s390/reloc64.s: Likewise.
	* gas/s390/reloc64.d: Likewise.
2003-01-23 17:34:38 +00:00
Alan Modra ae6063d440 * symbols.c (S_FORCE_RELOC): Add "strict" param.
* symbols.h (S_FORCE_RELOC): Likewise.
	* config/obj-aout.h (S_FORCE_RELOC): Likewise.
	* config/obj-bout.h (S_FORCE_RELOC): Likewise.
	* config/obj-coff.h (S_FORCE_RELOC): Likewise.
	* config/obj-ieee.h (S_FORCE_RELOC): Likewise.
	* config/obj-vms.h (S_FORCE_RELOC): Likewise.
	* write.c (generic_force_reloc): New function.
	(TC_FORCE_RELOCATION): Use it here instead of S_FORCE_RELOC.
	(TC_FORCE_RELOCATION_SUB_SAME): Test TC_FORCE_RELOCATION too.
	(adjust_reloc_syms): Adjust S_FORCE_RELOC call.
	* as.h (generic_force_reloc): Declare.
	* doc/internals.texi (S_FORCE_RELOC): Update.
	(TC_FORCE_RELOCATION_SUB_SAME): Update.

	* config/tc-alpha.c (alpha_force_relocation): Adjust to use
	generic_force_reloc.
	(alpha_fix_adjustable): Likewise.
	* config/tc-arm.c (arm_force_relocation): Likewise.
	* config/tc-cris.c (md_cris_force_relocation): Likewise.
	* config/tc-frv.c (frv_force_relocation): Likewise.
	* config/tc-i386.c (md_apply_fix3): Likewise.
	* config/tc-ia64.c (ia64_force_relocation): Likewise.
	* config/tc-ip2k.c (ip2k_force_relocation): Likewise.
	* config/tc-m32r.c (m32r_force_relocation): Likewise.
	* config/tc-m68hc11.c (tc_m68hc11_force_relocation): Likewise.
	* config/tc-mcore.c (mcore_force_relocation): Likewise.
	* config/tc-mips.c (mips_force_relocation): Likewise.
	* config/tc-mmix.c (mmix_force_relocation): Likewise.
	* config/tc-ppc.c (ppc_force_relocation): Likewise.
	* config/tc-s390.c (tc_s390_force_relocation): Likewise.
	* config/tc-sh.c (sh_force_relocation): Likewise.
	(md_pcrel_from_section): Likewise.
	* config/tc-sparc.c (tc_gen_reloc): Likewise.
	* config/tc-v850.c (v850_force_relocation): Likewise.
	* config/tc-xstormy16.c (xstormy16_force_relocation): Likewise.
	* config/tc-i386.h (TC_FORCE_RELOCATION): Likewise.
	* config/tc-mcore.h (TC_FORCE_RELOCATION): Likewise.
	* config/tc-sparc.h (tc_fix_adjustable): Likewise.

	* config/tc-d10v.c (d10v_force_relocation): Delete.
	* config/tc-d10v.h (TC_FORCE_RELOCATION): Don't define.
	* config/tc-dlx.c (md_dlx_force_relocation): Delete.
	* config/tc-dlx.h (TC_FORCE_RELOCATION): Don't define.
	* config/tc-fr30.c (fr30_force_relocation): Delete.
	* config/tc-fr30.h (TC_FORCE_RELOCATION): Don't define.
	* config/tc-mn10300.c (mn10300_force_relocation): Delete.
	* config/tc-mn10300.h (TC_FORCE_RELOCATION): Don't define.
	(TC_FORCE_RELOCATION_SUB_SAME): Test TC_FORCE_RELOCATION too.
	* config/tc-i960.h (TC_FORCE_RELOCATION_SUB_SAME): Likewise.
	* config/tc-hppa.c (hppa_force_relocation): Adjust S_FORCE_RELOC call.
	* config/tc-mips.c (RELAX_BRANCH_TOOFAR): Warning fix.
	* config/tc-mips.h (TC_FORCE_RELOCATION_SUB_SAME): Don't define.
	* config/tc-openrisc.c (openrisc_force_relocation): Delete.
	* config/tc-openrisc.h (TC_FORCE_RELOCATION): Don't define.
	* config/tc-sparc.c (elf32_sparc_force_relocation): Delete.
	* config/tc-sparc.h (TC_FORCE_RELOCATION): Don't define for ELF.
	* config/tc-i386.c (i386_force_relocation): Delete.
	* config/tc-i386.h (TC_FORCE_RELOCATION): Don't define for
	BFD_ASSEMBLER.
	(EXTERN_FORCE_RELOC): Fix TE_PE and STRICT_PE_FORMAT nesting.
	* config/tc-m68k.h (TC_FORCE_RELOCATION): Don't define.
	* config/tc-pj.h (TC_FORCE_RELOCATION): Don't define.
	* config/tc-sh.h (TC_FORCE_RELOCATION_SUB_ABS): Don't call
	S_FORCE_RELOC.
	(TC_FORCE_RELOCATION_SUB_SAME): Test TC_FORCE_RELOCATION too.
	* config/tc-sh64.h (TC_FORCE_RELOCATION_SUB_SAME): Likewise.
2003-01-23 12:51:05 +00:00
Alan Modra f0abc2a11f include/elf/ChangeLog
* sh.h: Split out various bits to bfd/elf32-sh64.h.

include/opcode/ChangeLog
	* m68hc11.h (cpu6812s): Define.

bfd/ChangeLog
	* elf-bfd.h (struct bfd_elf_section_data): Remove tdata.  Change
	dynindx to an int.  Rearrange for better packing.
	* elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
	* elf32-mips.c (bfd_elf32_new_section_hook): Define.
	* elf32-sh64.h: New.  Split out from include/elf/sh.h.
	(struct _sh64_elf_section_data): New struct.
	(sh64_elf_section_data): Don't dereference sh64_info (was tdata).
	* elf32-sh64-com.c: Include elf32-sh64.h.
	* elf32-sh64.c: Likewise.
	(sh64_elf_new_section_hook): New function.
	(bfd_elf32_new_section_hook): Define.
	(sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
	(sh64_bfd_elf_copy_private_section_data): Likewise.
	(sh64_elf_final_write_processing): Likewise.
	* elf32-sparc.c (struct elf32_sparc_section_data): New.
	(elf32_sparc_new_section_hook): New function.
	(SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
	(sec_do_relax): Define.
	(elf32_sparc_relax_section): Adjust to use sec_do_relax.
	(elf32_sparc_relocate_section): Likewise.
	* elf64-mips.c (bfd_elf64_new_section_hook): Define.
	* elf64-mmix.c (struct _mmix_elf_section_data): New.
	(mmix_elf_section_data): Define.  Use throughout file.
	(mmix_elf_new_section_hook): New function.
	(bfd_elf64_new_section_hook): Define.
	* elf64-ppc.c (struct _ppc64_elf_section_data): New.
	(ppc64_elf_section_data): Define.  Use throughout.
	(ppc64_elf_new_section_hook): New function.
	(bfd_elf64_new_section_hook): Define.
	* elf64-sparc.c (struct sparc64_elf_section_data): New.
	(sparc64_elf_new_section_hook): New function.
	(SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
	(sec_do_relax): Define.
	(sparc64_elf_relax_section): Adjust to use sec_do_relax.
	(sparc64_elf_relocate_section): Likewise.
	(bfd_elf64_new_section_hook): Define.
	* elfn32-mips.c (bfd_elf32_new_section_hook): Define.
	* elfxx-mips.c (struct _mips_elf_section_data): New.
	(mips_elf_section_data): Define.  Use throughout.
	(_bfd_mips_elf_new_section_hook): New function.
	(mips_elf_create_got_section): Don't alloc used_by_bfd.
	* elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
	* elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.

opcodes/ChangeLog
	* sh64-dis.c: Include elf32-sh64.h.
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.

gas/ChangeLog
	* config/tc-sh64.c (shmedia_frob_section_type): Adjust for changed
	sh64_elf_section_data.
	* config/tc-sh64.h: Include elf32-sh64.h.
	* config/tc-m68hc11.c: Don't include stdio.h.
	(md_show_usage): Fix missing continuation.
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.

ld/ChangeLog
	* emultempl/sh64elf.em: Include elf32-sh64.h.
	(sh64_elf_${EMULATION_NAME}_before_allocation): Adjust for changed
	sh64_elf_section_data.
	(sh64_elf_${EMULATION_NAME}_after_allocation): Likewise.
2003-01-23 11:51:35 +00:00
Nick Clifton 177a493c21 Include fopen-bin.h not fopen-same.h for mingw32 hosts. 2003-01-22 10:10:25 +00:00
Nick Clifton da896d3fcc Add support for i386-*-aros triple. 2003-01-21 16:08:31 +00:00
Nick Clifton 3dbe594b71 All NetBSD ELF targets should pass these tests. 2003-01-21 15:54:09 +00:00
Martin Schwidefsky fa87107f6d * gas/s390/reloc.d: Add tests for the new gotoff, gotplt and pltoff
relocations.
	* gas/s390/reloc.s: Likewise.
	* gas/s390/reloc64.d: Likewise.
	* gas/s390/reloc64.s: Likewise.
2003-01-20 11:50:38 +00:00
Martin Schwidefsky 2a19f73f87 * config/tc-s390.c (elf_suffix_type): Add suffix enums for gotoff,
gotplt and pltoff relocations.
	(s390_elf_suffix): Add suffix strings for gotoff, gotplt and pltoff.
	(s390_elf_cons): Map new lenght/elf suffix combinations for gotoff,
	gotplt and pltoff to bfd relocations.
	(md_gather_operands): Map new instruction operand/elf suffix
	combinations to bfd relocations.
	(tc_s390_fix_adjustable): Add new gotoff, gotplt and pltoff relocations
	to the list of unadjustable relocations.
	(tc_s390_force_relocation): Always emit relocations for gotoff, gotplt
	and pltoff relocations.
	(md_apply_fix3): Add the new relocations.
2003-01-20 11:48:32 +00:00
Martin Schwidefsky f1fc51dabb * config/tc-s390.c (md_apply_fix3): Emit error message for relocations
with a subsy symbol.
2003-01-20 10:22:26 +00:00
Stephane Carrez 2d94a61ae4 * config/tc-m68hc11.c (tc_m68hc11_fix_adjustable): Prevent adjustment
of relocs for memory bank addressing.
2003-01-17 22:51:28 +00:00
Stephane Carrez d01030e6e8 * config/tc-m68hc11.c (md_show_usage): Update usage.
(md_parse_option): Recognize -m68hcs12.
	(m68hc11_elf_final_processing): Set EF_M68HCS12_MACH flag to identify
	HCS12.
	* doc/as.texinfo (Overview): Document new option -m68hcs12.
2003-01-17 22:29:54 +00:00
Jakub Jelinek b3dfd7fe24 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
self_dtpmod_done and self_dtpmod_offset.
	(allocate_global_data_got): Only use one got entry for all
	dtpmod relocs against local symbols.
	(allocate_dynrel_entries): Only need .rela.got entry for
	dtpmod against global symbol.
	(elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
	Reserve space in .rela.got for the local dtpmod entry.
	(set_got_entry): Initialize the common local dtpmod .got entry.
	(elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
	and R_IA_64_DTPREL64MSB.

	* config/tc-ia64.c (ia64_cons_fix_new): Handle @dtprel() in data.

	* ld-ia64/ia64.exp: New.
	* ld-ia64/tlsbin.dd: New test.
	* ld-ia64/tlsbinpic.s: New test.
	* ld-ia64/tlsbin.rd: New test.
	* ld-ia64/tlsbin.s: New test.
	* ld-ia64/tlsbin.sd: New test.
	* ld-ia64/tlsbin.td: New test.
	* ld-ia64/tlsg.s: New test.
	* ld-ia64/tlsg.sd: New test.
	* ld-ia64/tlslib.s: New test.
	* ld-ia64/tlspic1.s: New test.
	* ld-ia64/tlspic2.s: New test.
	* ld-ia64/tlspic.dd: New test.
	* ld-ia64/tlspic.rd: New test.
	* ld-ia64/tlspic.sd: New test.
	* ld-ia64/tlspic.td: New test.
2003-01-16 21:31:18 +00:00
Alan Modra f62ba8f237 * Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
	* po/POTFILES.in: Regenerate.
2003-01-16 04:11:36 +00:00
Alan Modra a0ea3e1db8 * read.c (get_absolute_expr): New, split out from..
(get_absolute_expression): ..here.
	* read.h (get_absolute_expr): Declare.
	* config/obj-elf.c (elf_common): Use offsetT for "temp" and "size".
	Trim size to arch bits_per_address, and test for negative input
	via get_absolute_expr.
2003-01-11 06:24:12 +00:00
DJ Delorie 2d10acd2e4 * config/tc-xstormy16.c (md_cgen_lookup_reloc): Adjust value based
on operand type.
(xstormy16_md_apply_fix3): Use adjustment.
2003-01-07 21:27:58 +00:00
DJ Delorie 33d9fdd0d8 * gas/xstormy16/reloc-2.d: Adjust for fixed REL12 relocs. 2003-01-07 21:26:29 +00:00
Stan Cox 1c53c80da3 * configure.in: Add iq2000-elf target.
* configure: Regenerate.
	* config/tc-iq2000.c: New file.
	* config/tc-iq2000.h: Likewise.
2003-01-03 21:47:21 +00:00
Stan Cox a99bcdd0d5 * gas/iq2000: New testsuite. 2003-01-03 21:38:50 +00:00
Chris Demetriou 071742cf97 [ gas/ChangeLog ]
2003-01-02  Chris Demetriou  <cgd@broadcom.com>

        * config/tc-mips.c: Update copyright years to include 2003.
        (mips_ip): Fix indentation of "+A", "+B", and "+C" handling.
        Additionally, clean up their code slightly and clean up their
        comments some more.


        * doc/c-mips.texi: Add MIPS32r2 to ".set mipsN" documentation.

[ gas/testsuite/ChangeLog ]
2003-01-02  Chris Demetriou  <cgd@broadcom.com>

        * gas/mips/elf_arch_mips32r2.d: Fix file description comment.

[ include/opcode/ChangeLog ]
2003-01-02  Chris Demetriou  <cgd@broadcom.com>

        * mips.h: Update copyright years to include 2002 (which had
        been missed previously) and 2003.  Make comments about "+A",
        "+B", and "+C" operand types more descriptive.
2003-01-02 20:03:09 +00:00
Daniel Jacobowitz 55ac548dfb * doc/Makefile.am (as.1): Depend on "asconfig.texi gasver.texi
$(CPU_DOCS)".
	* doc/Makefile.in: Regenerate.
2003-01-02 01:20:26 +00:00
Dave Anglin db66b2925e * config/obj-elf.c (special_sections): Work around HP's incorrect usage
of .init and .fini sections for array initializers and finalizers.
2003-01-01 16:56:34 +00:00
Chris Demetriou bbcc08074f [ gas/ChangeLog ]
2002-12-31  Chris Demetriou  <cgd@broadcom.com>

	* config/tc-mips.c (validate_mips_insn, mips_ip): Recognize
	the "+D" operand, which will be used only by the disassembler.

[ gas/testsuite/ChangeLog ]
2002-12-31  Chris Demetriou  <cgd@broadcom.com>

	* gas/mips/cp0sel-names-mips32.d: New test.
	* gas/mips/cp0sel-names-mips32r2.d: New test.
	* gas/mips/cp0sel-names-mips64.d: New test.
	* gas/mips/cp0sel-names-numeric.d: New test.
	* gas/mips/cp0sel-names-sb1.d: New test.
	* gas/mips/cp0sel-names.s: New test source file.
	* gas/mips/mips.exp: Run new tests.

[ include/opcode/ChangeLog ]
2002-12-31  Chris Demetriou  <cgd@broadcom.com>

	* mips.h: Note that the "+D" operand type name is now used.

[ opcodes/ChangeLog ]
2002-12-31  Chris Demetriou  <cgd@broadcom.com>

	* mips-dis.c (mips_cp0sel_name): New structure.
	(mips_cp0sel_names_mips3264, mips_cp0sel_names_mips3264r2)
	(mips_cp0sel_names_sb1): New arrays.
	(mips_arch_choice): New structure members "cp0sel_names" and
	"cp0sel_names_len".
	(mips_arch_choices): Add references to new cp0sel_names arrays
	as appropriate, and make all existing entries reference
	appropriate mips_XXX_names_numeric arrays rather than simply
	using NULL.
	(mips_cp0sel_names, mips_cp0sel_names_len): New variables.
	(lookup_mips_cp0sel_name): New function.
	(set_default_mips_dis_options): Set mips_cp0sel_names and
	mips_cp0sel_names_len as appropriate.  Remove now-unnecessary
	checks for NULL register name arrays.
	(parse_mips_dis_option): Likewise.
	(print_insn_arg): Handle "+D" operand type.
	* mips-opc.c (mips_builtin_opcodes): Add new "+D" variants
	of mfc0, mtc0, dmfc0, and dmtc0 to print CP0+sel register
	names symbolically.
2002-12-31 08:11:18 +00:00
Chris Demetriou b337e146e5 [ gas/testsuite/ChangeLog ]
2002-12-30  Chris Demetriou  <cgd@broadcom.com>

	* gas/mips/elf_arch_mips1.d: New test.
	* gas/mips/elf_arch_mips2.d: New test.
	* gas/mips/elf_arch_mips3.d: New test.
	* gas/mips/elf_arch_mips4.d: New test.
	* gas/mips/elf_arch_mips5.d: New test.
	* gas/mips/elf_arch_mips32.d: New test.
	* gas/mips/elf_arch_mips32r2.d: New test.
	* gas/mips/elf_arch_mips64.d: New test.
	* gas/mips/empty.s: New test source file.
	* gas/mips/mips.exp: Run new tests.

	* gas/mips/elf_ase_mips16.d: Change to use empty.s
	* gas/mips/elf_ase_mips16.s: Remove.
2002-12-31 07:42:20 +00:00
Nick Clifton 4630c8033a oops - omitted from previous delta 2002-12-31 07:40:56 +00:00
Chris Demetriou 54610ba2f8 fix date on last entry. *sigh* 2002-12-31 07:35:09 +00:00
Chris Demetriou af7ee8bfa9 [ bfd/ChangeLog ]
2002-12-30  Chris Demetriou  <cgd@broadcom.com>

	* aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
	* archures.c (bfd_mach_mipsisa32r2): New define.
	* bfd-in2.h: Regenerate.
	* cpu-mips.c (I_mipsisa32r2): New enum value.
	(arch_info_struct): Add entry for I_mipsisa32r2.
	* elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
	(_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
	(_bfd_mips_elf_final_write_processing): Add
	bfd_mach_mipsisa32r2 case.
	(_bfd_mips_elf_merge_private_bfd_data): Handle merging of
	binaries marked as using MIPS32 Release 2.

[ binutils/ChangeLog ]
2002-12-30  Chris Demetriou  <cgd@broadcom.com>

	* doc/binutils.texi (objdump): Note MIPS HWR (Hardware Register)
	changes in MIPS -M options.

[ gas/ChangeLog ]
2002-12-30  Chris Demetriou  <cgd@broadcom.com>

	* configure.in: Recognize mipsisa32r2, mipsisa32r2el, and
	CPU variants.
	* configure: Regenerate.
	* config/tc-mips.c (ISA_HAS_DROR, ISA_HAS_ROR): New defines.
	(macro_build): Handle "K" operand.
	(macro2): Use ISA_HAS_DROR and ISA_HAS_ROR in the places where
	CPU_HAS_DROR and CPU_HAS_ROR are currently used.
	(mips_ip): New variable "lastpos", and implement "+A", "+B",
	and "+C" operands for MIPS32 Release 2 ins/ext instructions.
	Implement "K" operand for MIPS32 Release 2 rdhwr instruction.
	(validate_mips_insn): Implement "+" as a way to extend the
	allowed operands, and implement "K", "+A", "+B", and "+C"
	operands.
	(OPTION_MIPS32R2): New define.
	(md_longopts): Add entry for OPTION_MIPS32R2.
	(OPTION_ELF_BASE): Adjust to accomodate OPTIONS_MIPS32R2.
	(md_parse_option): Handle OPTION_MIPS32R2.
	(s_mipsset): Reimplement handling of ".set mipsN" options
	and add support for ".set mips32r2".
	(mips_cpu_info_table): Add entry for "mips32r2" (MIPS32 Release 2).
	(md_show_usage): Document "-mips32r2" option.
	* doc/as.texinfo: Document "-mips32r2" option.
	* doc/c-mips.texi: Likewise.

[ gas/testsuite/ChangeLog ]
2002-12-30  Chris Demetriou  <cgd@broadcom.com>

	* gas/mips/cp0-names-mips32r2.d: New test.
	* gas/mips/hwr-names-mips32r2.d: New test.
	* gas/mips/hwr-names-numeric.d: New test.
	* gas/mips/hwr-names.s: New test source file.
	* gas/mips/mips32r2.d: New test.
	* gas/mips/mips32r2.s: New test source file.
	* gas/mips/mips32r2-ill.l: New test.
	* gas/mips/mips32r2-ill.s: New test source file.
	* gas/mips/mips.exp: Add mips32r2 architecture data array
	entry.  Run new tests mentioned above.

[ include/elf/ChangeLog ]
2002-12-30  Chris Demetriou  <cgd@broadcom.com>

	* mips.h (E_MIPS_ARCH_32R2): New define.

[ include/opcode/ChangeLog ]
2002-12-30  Chris Demetriou  <cgd@broadcom.com>

	* mips.h: Document "+" as the start of two-character operand
	type names, and add new "K", "+A", "+B", and "+C" operand types.
	(OP_MASK_INSMSB, OP_SH_INSMSB, OP_MASK_EXTMSB)
	(OP_SH_EXTMSB, INSN_ISA32R2, ISA_MIPS32R2, CPU_MIPS32R2): New
	defines.

[ opcodes/ChangeLog ]
2002-12-30  Chris Demetriou  <cgd@broadcom.com>

	* mips-dis.c (mips_cp0_names_mips3264r2, mips_hwr_names_numeric)
	(mips_hwr_names_mips3264r2): New arrays.
	(mips_arch_choice): New "hwr_names" member.
	(mips_arch_choices): Adjust for structure change, and add a new
	entry for "mips32r2" ISA.
	(mips_hwr_names): New variable.
	(set_default_mips_dis_options): Set mips_hwr_names.
	(parse_mips_dis_option): New "hwr-names" option which sets
	mips_hwr_names, and adjust "reg-names=ARCH" to set mips_hwr_names.
	(print_insn_arg): Change return type to "int"
	and use that to indicate number of characters consumed.
	Add support for "+" operand extension character, "+A", "+B",
	"+C", and "K" operands.
	(print_insn_mips): Adjust for changes to print_insn_arg.
	(print_mips_disassembler_options): Adjust for "hwr-names"
	addition and "reg-names" change.
	* mips-opc (I33): New define (shorthand for INSN_ISA32R2).
	(mips_builtin_opcodes): Note that "nop" and "ssnop" are special
	forms of "sll".  Add new MIPS32 Release 2 instructions: ehb,
	di, ei, ext, ins, jr.hb, jalr.hb, mfhc1, mfhc2, mthc1, mthc2,
	rdhwr, rdpgpr, seb, seh, synci, wrpgpr, wsbh.
	Note that hardware rotate instructions (ror, rorv) can be
	used on MIPS32 Release 2, and add the official mnemonics
	for them (rotr, rotrv) and the similar "rotl" mnemonic for
	left-rotate.
2002-12-31 07:29:29 +00:00
Nick Clifton 2469cfa284 Add support for msp430. 2002-12-30 19:25:13 +00:00
Chris Demetriou 5915a74a94 2002-12-27 Chris Demetriou <cgd@broadcom.com>
* gas/mips/mips.exp: Define the notion of an "architecture data
        array," add comments indicating how to add a new architecture and
        suggestions for adding new tests.  Populate the architecture data
        array with many known architectures and convert many tests to
        be run for multiple architectures.
        (mips_arches): New global array.
        (mips_arch_create, mips_arch_list_all, mips_arch_data)
        (mips_arch_displayname, mips_arch_properties)
        (mips_arch_as_flags, mips_arch_objdump_flags, mips_arch_matches)
        (mips_arch_list_matching): New functions to operate on mips_arches.
        (run_dump_test_arch, run_dump_test_arches, run_list_test_arch)
        (run_list_test_arches): New functions.
        (run_list_test): Document and add an optional "test name" argument.
        * gas/mips/abs.d: Remove CPU-specific assembler and objdump flags,
        and CPU names from test names.
        * gas/mips/add.d: Likewise.
        * gas/mips/and.d: Likewise.
        * gas/mips/dli.d: Likewise.
        * gas/mips/jal-empic-elf-2.d: Likewise.
        * gas/mips/jal-empic-elf-3.d: Likewise.
        * gas/mips/jal-empic-elf.d: Likewise.
        * gas/mips/lb-svr4pic.d: Likewise.
        * gas/mips/lb.d: Likewise.
        * gas/mips/mips32.d: Likewise.
        * gas/mips/mips4.d: Likewise.
        * gas/mips/mips64.d: Likewise.
        * gas/mips/rol-hw.d: Likewise.
        * gas/mips/rol.d: Likewise.
        * gas/mips/rol64-hw.d: Likewise.
        * gas/mips/rol64.d: Likewise.
        * gas/mips/elf-jal.d: Likewise.  Also, indicate ELF in test name.
        * gas/mips/mips64-mdmx.d: Tweak printed name to indicate that this
        test uses the -mdmx flag.
        * gas/mips/mips64-mips3d.d: Tweak printed name to indicate that
        this test uses the -mips3d flag.
        * gas/mips/mips64-mips3d-incl.d: New file.
2002-12-27 23:51:49 +00:00
Chris Demetriou 640c0ccdc9 [ binutils/ChangeLog ]
2002-12-27  Chris Demetriou  <cgd@broadcom.com>

        * doc/binutils.texi (objdump): Document MIPS -M options.

[ gas/testsuite/ChangeLog ]
2002-12-27  Chris Demetriou  <cgd@broadcom.com>

        * gas/mips/cp0-names-mips32.d: New file.
        * gas/mips/cp0-names-mips64.d: New file.
        * gas/mips/cp0-names-numeric.d: New file.
        * gas/mips/cp0-names-sb1.d: New file.
        * gas/mips/cp0-names.s: New file.
        * gas/mips/fpr-names-32.d: New file.
        * gas/mips/fpr-names-64.d: New file.
        * gas/mips/fpr-names-n32.d: New file.
        * gas/mips/fpr-names-numeric.d: New file.
        * gas/mips/fpr-names.s: New file.
        * gas/mips/gpr-names-32.d: New file.
        * gas/mips/gpr-names-64.d: New file.
        * gas/mips/gpr-names-n32.d: New file.
        * gas/mips/gpr-names-numeric.d: New file.
        * gas/mips/gpr-names.s: New file.
        * gas/mips/mips.exp: Run new tests.

[ include/ChangeLog ]
2002-12-27  Chris Demetriou  <cgd@broadcom.com>

        * dis-asm.h (print_mips_disassembler_options): Prototype.

[ include/opcode/ChangeLog ]
2002-12-19  Chris Demetriou  <cgd@broadcom.com>

        * mips.h (OP_OP_COP0, OP_OP_COP1, OP_OP_COP2, OP_OP_COP3)
        (OP_OP_LWC1, OP_OP_LWC2, OP_OP_LWC3, OP_OP_LDC1, OP_OP_LDC2)
        (OP_OP_LDC3, OP_OP_SWC1, OP_OP_SWC2, OP_OP_SWC3, OP_OP_SDC1)
        (OP_OP_SDC2, OP_OP_SDC3): Define.

[ opcodes/ChangeLog ]
2002-12-27  Chris Demetriou  <cgd@broadcom.com>

        * disassemble.c (disassembler_usage): Add invocation of
        print_mips_disassembler_options.
        * mips-dis.c (print_mips_disassembler_options)
        (set_default_mips_dis_options, parse_mips_dis_option)
        (parse_mips_dis_options, choose_abi_by_name, choose_arch_by_name)
        (choose_arch_by_number): New functions.
        (mips_abi_choice, mips_arch_choice): New structures.
        (mips32_reg_names, mips64_reg_names, reg_names): Remove.
        (mips_gpr_names_numeric, mips_gpr_names_oldabi)
        (mips_gpr_names_newabi, mips_fpr_names_numeric)
        (mips_fpr_names_32, mips_fpr_names_n32, mips_fpr_names_64)
        (mips_cp0_names_numeric, mips_cp0_names_mips3264)
        (mips_cp0_names_sb1, mips_abi_choices, mips_arch_choices)
        (mips_processor, mips_isa, mips_gpr_names, mips_fpr_names)
        (mips_cp0_names): New variables.
        (print_insn_args): Use new variables to print GPR, FPR, and CP0
        register names.
        (mips_isa_type): Remove.
        (print_insn_mips): Remove ISA and CPU setup since it is now done...
        (_print_insn_mips): Here.  Remove register setup code, and
        call set_default_mips_dis_options and parse_mips_dis_options
        instead.
        (print_mips16_insn_arg): Use mips_gpr_names instead of mips32_names.
2002-12-27 08:00:31 +00:00
Alexandre Oliva 9605f328cd * dwarf2dbg.c (DWARF2_ADDR_SIZE): New macro.
(dwarf2_finish): Use it.
* doc/internals.texi (DWARF2_ADDR_SIZE): Document it.
* config/tc-mips.h (DWARF2_ADDR_SIZE): Override.
2002-12-25 21:20:31 +00:00
Chris Demetriou e8119602a5 2002-12-20 Chris Demetriou <cgd@broadcom.com>
* lib/gas-defs.exp (run_dump_test): Add a new optional argument,
        "extra_options".
2002-12-21 02:50:46 +00:00
DJ Delorie 8f46beda1f * config/tc-xstormy16.c (md_cgen_lookup_reloc): Support
BFD_RELOC_XSTORMY16_12.
2002-12-20 21:14:20 +00:00
DJ Delorie 9a7e42b63f * gas/xstormy16/allinsn.sh: Add tests for 12-bit reloc.
* gas/xstormy16/allinsn.s: Likewise.
* gas/xstormy16/allinsn.d: Likewise.
2002-12-20 21:14:04 +00:00
Alan Modra 5f5e16be30 * doc/as.texinfo (Invoking): Typo fix.
* config/tc-tic54x.c (encode_operand): Comment typo fix.
2002-12-19 05:47:45 +00:00
Kazu Hirata 062b7c0c14 * doc/c-alpha.texi: Fix typos.
* doc/c-arm.texi: Likewise.
	* doc/c-d10v.texi: Likewise.
	* doc/c-i370.texi: Likewise.
	* doc/c-i960.texi: Likewise.
	* doc/c-ia64.texi: Likewise.
	* doc/c-mmix.texi: Likewise.
	* doc/c-ns32k.texi: Likewise.
	* doc/c-pdp11.texi: Likewise.
	* doc/c-pj.texi: Likewise.
	* doc/c-sh64.texi: Likewise.
	* doc/c-sparc.texi: Likewise.
	* doc/c-tic54x.texi: Likewise.
	* doc/c-v850.texi: Likewise.
	* doc/c-vax.texi: Likewise.
	* doc/internals.texi: Likewise.
2002-12-19 01:11:31 +00:00
Chris Demetriou 82dd009716 [ opcodes/ChangeLog ]
2002-12-18  Chris Demetriou  <cgd@broadcom.com>

	* mips-opc.c (mips_builtin_opcodes): Remove one "ror" and two
	"dror" entries, and reorder the remaining "dror" and "ror" entries.

[ gas/ChangeLog ]
2002-12-18  Chris Demetriou  <cgd@broadcom.com>

	* config/tc-mips.c (macro): In M_DROL, M_DROR, M_ROL, and M_ROR,
	use hardware rotate ops as appropriate.  In M_DROL_I, M_DROR_I,
	M_ROL_I, and M_ROR_I, simplify code, clean up warnings, and
	arrange not to issue warnings about use of AT when AT is not
	actually used.

[ gas/testsuite/ChangeLog ]
2002-12-18  Chris Demetriou  <cgd@broadcom.com>

	* gas/mips/rol.s: Add ".set noat" and some new instructions to test.
	* gas/mips/rol64.s: Likewise.
	* gas/mips/rol.l: New file.
	* gas/mips/rol.d: Adjust to use rol.l and for rol.s changes.
	* gas/mips/rol64.l: New file.
	* gas/mips/rol64.d: Adjust to use rol64.l and for rol64.s changes.
	* gas/mips/rol-hw.d: New file.
	* gas/mips/rol-hw.l: New file.
	* gas/mips/rol64-hw.d: New file.
	* gas/mips/rol64-hw.l: New file.
	* gas/mips/mips.exp: Run rol-hw and rol64-hw tests.
2002-12-18 22:52:48 +00:00
Chris Demetriou ec83c154bc kill bogus line between the last 2 entries 2002-12-18 21:11:30 +00:00
Nick Clifton 9c3b31c636 Duplicate --keep-locals entry in order to prevent it being confused with -k. 2002-12-17 12:02:41 +00:00
DJ Delorie 9bb76eb8a6 * config/tc-xstormy16.c (md_cgen_lookup_reloc): If a relocation
has already been set up, use it.
2002-12-17 03:55:46 +00:00
Kazu Hirata c03099e682 * ChangeLog-9295: Fix a typo.
* README: Likewise.
	* config/tc-d10v.c: Fix a comment typo.
	* config/tc-dlx.c: Likewise.
	* config/tc-h8300.h: Likewise.
	* config/tc-h8500.h: Likewise.
	* config/tc-mips.c: Likewise.
	* config/tc-s390.c: Likewise.
	* config/tc-sh.h: Likewise.
	* config/tc-tic80.h: Likewise.
	* config/tc-w65.h: Likewise.
	* config/tc-z8k.c: Likewise.
	* config/tc-z8k.h: Likewise.
	* testsuite/gas/h8300/cmpsi2.s: Likewise.
2002-12-17 01:13:56 +00:00
Alan Modra 30cdfbed02 * config/tc-d30v.c (check_range): Warning fixes, formatting.
Simplify sign extension.  Remove redundant unsigned < 0 test.
	* config/tc-i960.c (md_ri_to_chars): Prototype.
	* config/tc-mcore.c (md_pseudo_table): Fix typo.
	(dump_literals): Init brarsym, and test later instead of isforce.
2002-12-16 09:57:49 +00:00
Alan Modra 4cd62c96f7 * config/tc-ns32k.c (encode_operand): Constify operandsP and suffixP.
(parse): Constify line and lineptr.
	(md_begin): Calculate endop here.
2002-12-16 09:54:39 +00:00
Alan Modra 4eb4336cef * config/obj-vms.c: Formatting. Include fnctl.h.
(Create_VMS_Object_File): Fix creat call for sane unix systems.
	(Object_Record_Offset): Make it a size_t.
	(Flush_VMS_Object_Record_Buffer): Fix signed/unsigned warning.
	(VMS_TBT_Routine_End <Size>): Make var unsigned long.
	(VMS_Fix_Indirect_Reference <Offset>): Make arg addressT.
	(synthesize_data_segment <data_size>): Remove ATTRIBUTE_UNUSED.
	(vms_fixup_data_section <data_size>): Add here instead.
	* config/e-criself.c: Fix typo in last change.
2002-12-13 00:01:47 +00:00
Alan Modra ebd0428ffe * config/e-criself.c: Fix typo in last change. 2002-12-12 23:12:34 +00:00
Alan Modra 17fc154eac * write.c (write_object_file): Fix signed/unsigned warning.
* config/e-crisaout.c (crisaout_bfd_name): Prototype.
	* config/e-criself.c (criself_bfd_name): Prototype.
	* config/obj-aout.c (s_sect): Remove unused function.
	* config/obj-bout.c (obj_bout_line <ignore>): Add ATTRIBUTE_UNUSED.
	* config/obj-coff.c (coff_last_bf): Don't declare for OBJ_XCOFF.
	(fixup_mdeps <h>): Add ATTRIBUTE_UNUSED.
	* config/obj-ecoff.c (ecoff_frob_file <addr>): Likewise.
	* config/obj-vms.c (setup_basic_type <spnt>): Likewise.
	(VMS_RSYM_Parse <Current_Routine>): Likewise.
	(vms_fixup_text_section <text_siz>): Likewise.
	(synthesize_data_segment <data_size>): Likewise.
	(vms_fixup_xtors_section <sect_no>): Likewise.
	(structure_count): Don't use implicit int type.
2002-12-12 22:46:47 +00:00
Alan Modra bfc866a6e6 * config/tc-a29k.c (insert_sreg): Prototype.
(define_some_regs): Prototype, make static.
	(parse_operand): Likewise.
	(md_parse_option <c,arg>): Add ATTRIBUTE_UNUSED.
	(md_show_usage <stream>): Likewise.
	(md_section_align <segment>): Likewise.
	(md_convert_frag <all args>): Likewise.
	(md_estimate_size_before_relax <all args>): Likewise.
	(md_apply_fix3): Don't cast valP pointer type.  Fix bogus >>='s.
	* config/tc-arm.c (arm_validate_fix): Only for OBJ_COFF or OBJ_ELF.
2002-12-12 22:43:45 +00:00
Alan Modra ebf19f1b15 * config/tc-d30v.c (md_parse_option <arg>): Add ATTRIBUTE_UNUSED.
(md_undefined_symbol <name>): Likewise.
	(md_convert_frag <all args>): Likewise.
	(write_long <opcode>): Likewise.
	(tc_gen_reloc <seg>): Likewise.
	(md_estimate_size_before_relax <all args>): Likewise.
	(md_apply_fix3 <seg>): Likewise.
	(s_d30v_align <ignore>): Likewise.
	(build_insn): Correct format string.
	(md_apply_fix3): Likewise.
2002-12-12 22:41:25 +00:00
Alan Modra 33b5881a60 * config/tc-fr30.c (md_parse_option <c,arg>): Add ATTRIBUTE_UNUSED.
(md_undefined_symbol <name>): Likewise.
	(md_convert_frag <all args>): Likewise.
	(md_cgen_lookup_reloc <insn>): Likewise.
	(md_begin): Delete unused vars.
	(md_assemble): Likewise.
	(md_estimate_size_before_relax): Likewise.
	(fr30_relax_frag): #if 0 out, seems unused.
	(md_atof): Remove declaration of atof_ieee.
	(restore_colon): Prototype.
2002-12-12 22:39:40 +00:00
Alan Modra a08333bb26 * config/tc-frv.c (frv_insert_vliw_insn): Prototype.
(frv_find_in_vliw): Likewise.
	(frv_debug_tomcat): Likewise.
	(frv_adjust_vliw_count): Likewise.
	(frv_tomcat_shuffle): Likewise.
	(frv_tomcat_analyze_vliw_chains): Likewise.  Correct args to
	frv_find_in_vliw call.
	(md_atof): Remove declaration of atof_ieee.
2002-12-12 22:37:47 +00:00
Alan Modra 45e85b8790 * h8500-opc.h (h8500_table): Add missing initializers to quiet
warnings.

	* config/tc-h8500.c (cons): Delete declaration.
	(md_begin <opcode>): Constify.
	(displacement_size, immediate_size, absolute_size): Remove.
	(build_relaxable_instruction <operand>): Add ATTRIBUTE_UNUSED.
	(tc_crawl_symbol_chain <headers>): Likewise.
	(md_undefined_symbol <name>): Likewise.
	(tc_headers_hook <headers>): Likewise.
	(md_parse_option <c,arg>): Likewise.
	(md_show_usage <stream>): Likewise.
	(md_convert_frag <headers, seg>): Likewise.
	(tc_coff_symbol_emit_hook <ignore>): Likewise.
	(md_atof): Remove declaration of atof_ieee.
	(tc_aout_fix_to_chars): Remove unused function.
	(parse_reg): Prototype.
	(parse_exp): Prototype.
	(skip_colonthing): Prototype.  Use &&, not & in logical expressions.
	(parse_reglist): Prototype.
	(get_operand): Prototype.
	(get_operands): Prototype.
	(get_specific): Prototype.  Make "this_index" signed.
	(check): Prototype, make static.
	(insert): Prototype
	(build_relaxable_instruction): Prototype, make static.
	(build_bytes): Prototype.
	(wordify_scb): Prototype.
	* config/tc-h8500.h (start_label): Declare.
	(tc_coff_sizemachdep): Declare.
2002-12-12 22:34:05 +00:00
Alan Modra 650f02e951 * config/tc-i370.c (i370_ebcdic <unused>): Add ATTRIBUTE_UNUSED.
(i370_rmode <unused>): Likewise.
	(i370_csect <unused>): Likewise.
	(i370_dc <unused>): Likewise.
	(i370_ds <unused>): Likewise.
	(i370_elf_lcomm <unused>): Likewise.
	(i370_ltorg <ignore>): Likewise.
	(i370_using <ignore>): Likewise.
	(i370_drop <ignore>): Likewise.
	(i370_byte <ignore>): Likewise.
	(i370_tc <ignore>): Likewise.
	(md_estimate_size_before_relax <fragp, seg>): Likewise.
	(md_convert_frag <all args>): Likewise.
	(md_undefined_symbol <name>): Likewise.
	(md_pcrel_from_section <sec>): Likewise.
	(tc_gen_reloc <seg>): Likewise.
	(i370_section_letter): #if 0 unused functions.
	(i370_section_word, i370_section_type, i370_section_flags): Likewise.
	(symbol_locate): Prototype.
2002-12-12 22:29:00 +00:00
Alan Modra d444b72608 * config/tc-i860.c (md_atof): Remove declaration of atof_ieee.
(md_number_to_disp, md_number_to_field): Remove.
	(md_apply_fix3): Correct format string and cast "fup".
2002-12-12 22:27:07 +00:00
Alan Modra b9195351ad * config/tc-i960.c (md_convert_frag): Add ATTRIBUTE_UNUSED to args.
(s_endian <ignore>): Likewise.
	(md_undefined_symbol <name>): Likewise.
	(tc_crawl_symbol_chain <headers>): Likewise.
	(tc_set_bal_of_call): Likewise.
	(tc_coff_symbol_emit_hook <symbolP>): Likewise.
	(i960_handle_align <fragp>): Likewise.
	(i960_validate_fix <this_segment_type>): Likewise
	(tc_gen_reloc <section>): Likewise.
	(tc_coff_symbol_emit_hook): Only define for OBJ_COFF.
	(struct memS, struct regop): Forward declare.
	(brcnt_emit, brlab_next, cobr_fmt, ctrl_fmt, emit, get_args,
	get_cdisp, get_ispec, get_regnum, i_scan, mem_fmt, mema_to_memb,
	parse_expr, parse_ldconst, parse_memop, parse_po, parse_regop,
	reg_fmt, relax_cobr, s_leafproc, s_sysproc, shift_ok, syntax,
	targ_has_sfr, targ_has_iclass, tc_bfd_fix2rtype): Prototype.
	(md_chars_to_number, md_number_to_imm): Make static, prototype.
	(md_number_to_field): Likewise.
	(md_number_to_disp): Remove unused function.
	(md_atof): Remove declaration of atof_ieee.
	(md_apply_fix3): Correct md_number_to_imm call.
2002-12-12 22:25:00 +00:00
Alan Modra 64384dfd06 * config/tc-ip2k.c (md_assemble): Warning fix. 2002-12-12 22:21:04 +00:00
Alan Modra 78a0c6fb2d * config/tc-m32r.c (md_parse_option <arg>): Add ATTRIBUTE_UNUSED.
(fill_insn <ignore>): Likewise.
	(debug_sym <ignore>): Likewise.
	(md_undefined_symbol <name>): Likewise.
	(m32r_scomm <ignore>): Likewise.
	(md_convert_frag <abfd>): Likewise.
	(md_cgen_lookup_reloc <insn>): Likewise.
	(m32r_record_hi16 <seg>): Likewise.
	(md_estimate_size_before_relax): #if 0 old_fr_fix.
	(allow_m32rx): Prototype.
	(first_writes_to_seconds_operands): Prototype.
	(writes_to_pc): Prototype.
	(can_make_parallel): Prototype.
	(make_parallel): Prototype.
	(target_make_parallel): Prototype.
	(assemble_two_insns): Prototype.
	(m32r_record_hi16): Prototype.
	(md_atof): Remove declaration of atof_ieee.
	* config/tc-m32r.h (m32r_fix_adjustable): Declare.
	(m32r_force_relocation): Prototype.
	(m32r_elf_section_change_hook): Prototype.
2002-12-12 22:18:10 +00:00
Alan Modra f1f5ef86e3 * config/tc-m68k.c (tc_gen_reloc <section>): Add ATTRIBUTE_UNUSED.
(md_show_usage): Fix signed/unsigned warning.
2002-12-12 22:16:16 +00:00
Alan Modra 38b9ac49eb * config/tc-m88k.c (get_reg): Make reg_prefix param unsigned.
(calcop): Ditto for reg_prefix var.
	(hexval): Add cast to fix signed/unsigned warning.
	(md_number_to_disp): Delete unused function.
	(md_number_to_field): Likewise.
	(float_cons, cons, s_globl, s_space, s_set, s_lcomm): Remove decl.
	(match_name): Prototype.
	(get_bf2): Prototype.
	(get_bf_offset_expression): Prototype.
2002-12-12 22:14:13 +00:00
Alan Modra aa699a2caf * config/tc-mcore.c (mcore_s_literals <ignore>): Add ATTRIBUTE_UNUSED.
(md_undefined_symbol <ignore>): Likewise.
	(md_create_short_jump <all args>): Likewise.
	(md_create_long_jump <all args>): Likewise.
	(md_convert_frag <abfd, sec>): Likewise.
	(md_apply_fix3 <segment>): Likewise.
	(md_section_align <segment>): Likewise.
	(md_pcrel_from_section <sec>): Likewise.
	(tc_gen_reloc <section>): Likewise.
	(reg_m, reg_n, immediate): Delete unused vars.
	(dump_literals): Fix signed/unsigned warning.
	(enter_literal): Likewise.
	(parse_imm): Likewise.  Also fix format string.
	(parse_mem): Remove unused var.
	(md_assemble <LS>): Abort on unexpected inst.
	(md_atof): Remove declaration of atof_ieee.
	(md_parse_option): Remove unused vars.
	(md_apply_fix3): Fix format strings, cast args.
	(tc_gen_reloc): Delete unused var.
	* config/tc-mcore.h (tc_coff_sizemachdep): Declare.
2002-12-12 22:11:32 +00:00
Alan Modra 2a8ce8da88 * config/tc-mn10200.c (md_parse_option <c, arg>): Add ATTRIBUTE_UNUSED.
(md_undefined_symbol <name>): Likewise.
	(md_convert_frag <abfd>): Likewise.
	(tc_gen_reloc <seg>): Likewise.
	(check_operand <insn>): Likewise.
	(md_convert_frag): Fix format strings.
	(tc_gen_reloc): Delete fx_addsy - fx_subsy code.
2002-12-12 22:09:12 +00:00
Alan Modra 717acf4b26 * config/tc-openrisc.c (ignore_pseudo): Prototype.
(md_atof): Remove declaration of atof_ieee.
	* config/tc-or32.c (parse_operand): Prototype non-BFD too.
	(md_apply_fix3): Fix bogus >>='s.
	(md_undefined_symbol): Delete unused var.
2002-12-12 22:05:00 +00:00
Alan Modra 0e073f4ce8 * pj.h (pj_opc_info_t): Add union.
* pj-dis.c (print_insn_pj): Adjust for pj_opc_info_t change.

	* config/tc-pj.c (little, big, parse_exp_save_ilp): Prototype.
	(c_to_r, ipush_code, fake_opcode, alias): Likewise.
	(fake_opcode): Adjust for pj_opc_int_t change.
	(md_begin): Likewise.
	(md_assemble): Likewise.
	(ipush_code): Correct parse_exp_save_ilp call.  Test pending_reloc
	instead of non-existent third arg of parse_exp_save_ilp.
	(md_parse_option): Correct "little" and "big" calls.
2002-12-12 21:52:06 +00:00
Alan Modra a798260029 * config/tc-sparc.c (s_register): Only declare #ifdef OBJ_ELF.
(md_apply_fix3 <segment>): Add ATTRIBUTE_UNUSED.
	(tc_gen_reloc <section>): Likewise.
2002-12-12 21:37:36 +00:00
Alan Modra 167795c452 * config/tc-tic30.c: #include stdarg.h or varargs.h.
(debug): Rewrite using VA_* macros.
	(md_estimate_size_before_relax): Add ATTRIBUTE_UNUSED to args.
	(md_convert_frag): Likewise.
	(md_parse_option): Likewise.
	(md_show_usage): Likewise.
	(md_undefined_symbol): Likewise.
	(tc_gen_reloc): Likewise.
	(md_operand): Likewise.
	(tc_aout_pre_write_hook): Delete.
	(struct tic30_insn): Make "operands" unsigned.
	(struct tic30_par_insn): Likewise.
	(md_assemble): Likewise for "count", "i" and "numops".
	(tic30_parallel_insn): Likewise for vars here.
	(tic30_operand): Likewise.  Remove useless unsigned >= 0 comparison.
	* config/tc-tic30.h (tc_aout_pre_write_hook): Define as empty.
	* config/tc-tic80.c (obj_coff_section): Delete declaration.
	(md_estimate_size_before_relax): Add ATTRIBUTE_UNUSED on args.
	(md_undefined_symbol): Likewise.
	(md_parse_option): Likewise.
	(md_convert_frag): Likewise.
	(tc_coff_symbol_emit_hook): Likewise.
	(md_atof): Remove declaration of atof_ieee.
	(const_overflow): Warning fixes, tidy.
	(get_operands): Delete unused vars.
	(internal_error_a): Adjust format string to expect a long for arg.
	(find_opcode): Warning fixes, simplify.
	(build_insn): Cast internal_error_a arg.
	(md_begin): Likewise.
	(md_apply_fix3): Likewise.
	(md_assemble): Delete unused var.
	* config/tc-tic80.h (tc_coff_fix2rtype): Prototype.
2002-12-12 21:34:53 +00:00
Alan Modra 78a33af2ee * config/tc-z8k.c (cons, obj_coff_section): Delete declarations.
(whatreg, parse_reg, parse_exp): Make static, prototype.
	(checkfor, regword, regaddr, get_ctrl_operand): Prototype.
	(get_flags_operand, get_interrupt_operand, get_cc_operand): Likewise.
	(get_operand, get_operands, get_specific, newfix): Likewise.
	(apply_fix, build_bytes): Likewise.
	(md_atof): Remove declaration of atof_ieee.
	(tc_aout_fix_to_chars): Delete.
	(md_begin): Constify "opcode".  Don't try to init opcode->idx.
	Fix s_unseg call.
	(md_parse_option): Fix s_segm and s_unseg calls.

	* z8kgen.c: Include "libiberty.h".
	(opt, args, toks): Fix initializer warnings.
	(chewname): Make "name" a char **.  Return mnemonic trimmed of
	operands.
	(gas): Improve emitted "DO NOT EDIT" warning.  Format emitted
	opcode_entry_type, and make "nicename" and "name" const.  Make
	z8k_table const too.  Formatting.  Generate idx as gas needs it.
	* z8k-opc.h: Regenerate.
2002-12-12 21:27:58 +00:00
Alexandre Oliva 6f171daac9 * gas/mips/beq.d: Comment out branches to undefined symbols,
no longer supported.
* gas/mips/beq.s: Likewise.
* gas/mips/bge.d: Likewise.
* gas/mips/bge.s: Likewise.
* gas/mips/bgeu.d: Likewise.
* gas/mips/bgeu.s: Likewise.
* gas/mips/blt.d: Likewise.
* gas/mips/blt.s: Likewise.
* gas/mips/bltu.d: Likewise.
* gas/mips/bltu.s: Likewise.
* gas/mips/mips.exp: Change branch-misc-2 test to run_list_test.
* gas/mips/branch-misc-2.d: Removed.
* gas/mips/branch-misc-2.s: Added branches to undefined symbols.
* gas/mips/branch-misc-2.l: New.
2002-12-12 04:40:22 +00:00
Alexandre Oliva af6ae2ade7 * tc-mips.c (RELAX_BRANCH_ENCODE): Remove reloc_s2 argument.
Adjust callers.
(RELAX_BRANCH_RELOC_S2): Delete.
(append_insn): Use only BFD_RELOC_16_PCREL_S2 for branches.
Do not handle BFD_RELOC_16_PCREL.
(macro_build, mips_ip): Likewise.
(md_pcrel_from): Return 4 for undefined symbols regardless of
mips_pic.
(md_apply_fix3): Use only BFD_RELOC_16_PCREL_S2 for branches.
Don't dereference howto if no such relocation is available.
Do not apply hack for in-place zero addend in NEWABI.
(md_convert_frag): Use only BFD_RELOC_16_PCREL_S2 for branches.
2002-12-12 04:40:07 +00:00
Alexandre Oliva 074d08b041 Alan Modra <amodra@bigpond.net.au> 2002-12-12 04:32:07 +00:00
Alexandre Oliva 497f322d4d * config/tc-mn10300.c (set_arch_mach): Change argument type to
avoid warnings.
(r_register_name, xr_register_name): Add prototype declarations.
2002-12-12 03:16:33 +00:00
Aldy Hernandez f56074d698 2002-12-09 Aldy Hernandez <aldyh@redhat.com>
* gas/ppc/booke.d: Fix msync and mbar to reflect reality.

	* gas/ppc/e500.d: Fix m[tf]pmr to reflect reality.
2002-12-10 00:42:53 +00:00
H.J. Lu ffbceea9fb 2002-12-08 H.J. Lu <hjl@gnu.org>
* config/tc-ia64.c (md_apply_fix3): Remove the PCREL hack
	copied from tc-i386.c.
2002-12-08 21:25:38 +00:00
Stephane Carrez f39f5da9e6 * gas/m68hc11/m68hc11.exp (gas_m68hc11_error): New function;
(gas_m68hc11_warning): New function.
	(gas_m68hc11_message): New function.
	(top): New tests for assembler errors.
	(gas_m68hc11_opcode_list): New function.
	(top): New tests for opcode list.
2002-12-08 21:23:42 +00:00
Stephane Carrez 5da0c2771a * gas/m68hc11/bug-1825.s: Add some tests.
* gas/m68hc11/bug-1825.d: Update.
	* gas/m68hc11/opers12.d: Update.
	* gas/m68hc11/opers12-dwarf2.d: Update.
2002-12-08 21:08:07 +00:00
Stephane Carrez 75538612b6 * config/tc-m68hc11.c (STATE_INDEXED_PCREL): New relax code.
(md_relax_table): Define specific relax for PC-rel offsets.
	(build_indexed_byte): Use a STATE_INDEXED_PCREL relax code.
	(m68hc11_relax_frag): Handle the new relax code.
	(md_convert_frag): Likewise.
	(md_estimate_size_before_relax): Likewise.
2002-12-08 20:47:21 +00:00
Alan Modra 546c73f905 * subsegs.c (section_symbol): Use the symbol, not the section, name. 2002-12-08 03:47:57 +00:00
Richard Henderson fa2c7effe7 * config/ia64.c (enum reloc_func): Add FUNC_LT_RELATIVE_X.
(ia64_gen_real_reloc_type): Handle it.
        (pseudo_func): Add @ltoffx.
        (md_begin): Build .<ltoffx>.
        (ia64_force_relocation): True for LTOFF22X and LDXMOV.

        * gas/ia64/ltoff22x-1.[ds]: New.
        * gas/ia64/ia64.exp: Run it.
2002-12-05 23:20:40 +00:00
Jim Wilson d070dab9db Fix IA-64 opc-d.x gas testsuite failure.
binutils/ChangeLog
	* configure.in (OBJDUMP_DEFS): Define SKIP_ZEROES as 16 for IA-64.
	* configure: Regenerate.
gas/testsuite/ChangeLog
	* gas/ia64/opc-x.d: Regenerate.
2002-12-05 18:33:27 +00:00
Alan Modra cb4eb3678d * gas/arm/adrl.s: Pad end of .text.
* gas/arm/adrl.d: Adjust to suit.
2002-12-05 11:47:16 +00:00
Alan Modra 114424c6b3 * config/tc-arm.c (arm_force_relocation): Move out of #if OBJ_ELF.
Move OBJ_COFF TC_FORCE_RELOCATION code here so that COFF handles
	ARM_IMMEDIATE and ARM_ADRL_IMMEDIATE relocs as for ELF.
	* config/tc-arm.h (TC_FORCE_RELOCATION): Define for both ELF and
	COFF to call arm_force_relocation.
2002-12-05 11:46:50 +00:00
Jim Wilson c10d9d8fc3 Patch to update IA-64 port to SDM 2.1.
bfd/ChangeLog
	* cpu-ia64-opc.c: Add operand constant "ar.csd".
gas/ChangeLog
	* config/tc-ia64.c (pseudo_func): Add "@pause" constant for "hint"
	instruction.
	(emit_one_bundle): Handle "hint" instruction.
	(operand_match): Match IA64_OPND_AR_CSD.
gas/testsuite/ChangeLog
	* gas/ia64/opc-b.d: Update for instructions added by SDM2.1.
	* gas/ia64/opc-b.s: Ditto.
	* gas/ia64/opc-f.d: Ditto.
	* gas/ia64/opc-f.s: Ditto.
	* gas/ia64/opc-i.d: Ditto.
	* gas/ia64/opc-i.s: Ditto.
	* gas/ia64/opc-m.d: Ditto.
	* gas/ia64/opc-m.s: Ditto.
	* gas/ia64/opc-x.d: Ditto.
	* gas/ia64/opc-x.s: Ditto.
include/opcode/ChangeLog
	* ia64.h: Fix copyright message.
	(IA64_OPND_AR_CSD): New operand kind.
opcodes/ChangeLog
	* ia64-opc-d.c (ia64_opcodes_d): Add "hint" instruction.
	* ia64-opc-b.c: Add "hint.b" instruction.
	* ia64-opc-f.c: Add "hint.f" instruction.
	* ia64-opc-i.c: Add "hint.i" instruction.
	* ia64-opc-m.c: Add "hint.m", "fc.i", "ld16", "st16", and
	"cmp8xchg16" instructions.
	* ia64-opc-x.c: Add "hint.x" instruction.
	* ia64-opc.h (AR_CSD): New macro.
	* ia64-ic.tbl: Update according to SDM2.1.
	* ia64-raw.tbl: Ditto.
	* ia64-waw.tbl: Ditto.
	* ia64-gen.c (in_iclass): Handle "hint" like "nop".
	(lookup_regindex): Recognize AR[FCR], AR[EFLAG], AR[CSD],
	AR[SSD], AR[CFLG], AR[FSR], AR[FIR], and AR[FDR].
	* ia64-asmtab.c: Regenerate.
2002-12-05 02:08:02 +00:00
Alan Modra c8970b4ba4 * dwarf2dbg.c (scale_addr_delta): Correct parameter. Move prototype
inside #if.
2002-12-04 01:03:05 +00:00
Nick Clifton 6b0817e5ee Fix typo in ChangeLog entry.
Add paranoia checks to .PPC.EMB.apuinfo merging code.
2002-12-03 18:52:45 +00:00
Nick Clifton e1a9cb8e15 Fix the merging of .PPC.EMB.apuinfo sections. Add a test to make sure that
the fix continues to work.
2002-12-03 18:24:33 +00:00
Richard Henderson a823923bf6 include/opcode/
* ia64.h (enum ia64_opnd): Add IA64_OPND_LDXMOV.
bfd/
        * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
opcodes/
        * ia64-opc-m.c: Add ld8.mov.
        * ia64-asmtab.c: Regenerate.
gas/
        * config/tc-ia64.c (operand_match): Add IA64_OPND_LDXMOV case.
gas/testsuite/
        * gas/ia64/ldxmov-1.[ds]: New.
        * gas/ia64/ldxmov-2.[ls]: New.
        * gas/ia64/ia64.exp: Run them.
2002-12-03 18:15:48 +00:00
Alan Modra 6297c1fede * config/tc-w65.c (s_longa): Prototype. Make static, specify int arg.
(cons, s_align_bytes): Delete declaration.
	(relax): Delete.
	(md_begin): Constify "struct opinfo *" var.  Don't try to make "name"
	strings common.
	(dot): Delete unused function.
	(w65_expression): Remove unused arg.
	(parse_exp): Prototype.  Remove unused arg.  Adjust w65_expression
	call.
	(get_operands): Prototype.  Constify "struct opinfo *" arg.  Fix
	parse_exp call.
	(get_specific): Prototype.  Constify "struct opinfo *" arg and return
	value.
	(check): Remove unused function.
	(build_Mytes): Prototype.  Constify "struct opinfo *" arg.  Abort
	on unhandled switch case.
	(md_assemble): Remove unused op_start, op_end, nlen, p vars.  Constify
	"opcode".
	(tc_crawl_symbol_chain): Delete unused function.
	(tc_headers_hook): Likewise.
	(tc_Nout_fix_to_chars): Likewise.
	(md_undefined_symbol): Add ATTRIBUTE_UNUSED.
	(md_parse_option): Likewise.
	(md_convert_frag): Likewise.
	(tc_coff_symbol_emit_hook): Likewise.
	(md_show_usage): Likewise.
	* config/tc-w65.h (tc_coff_sizemachdep): Declare.
	(TC_PARSE_CONS_EXPRESSION): w65_expression takes one arg.
	(w65_expression): Declare.

	* po/POTFILES.in: Regenerate.
2002-12-03 12:01:45 +00:00
Alan Modra dc8ec78b76 * gas/arm/adrl.s: Test behaviour against globals too.
* gas/arm/adrl.d: Adjust.
2002-12-03 11:28:33 +00:00
Alan Modra 61b5f74bdb * config/tc-arm.c (arm_force_relocation): Return 0 for ARM_IMMEDIATE
and ARM_ADRL_IMMEDIATE.
2002-12-03 11:27:26 +00:00
Nick Clifton fea179166e Remove GASP. 2002-12-02 15:42:15 +00:00
Hans-Peter Nilsson 4c83186b76 Fix typo last entry 2002-12-02 07:20:29 +00:00
Hans-Peter Nilsson dc59a89726 * read.c (emit_expr) [WORKING_DOT_WORD]: Initialize x->use_jump. 2002-12-02 07:18:53 +00:00
Stephane Carrez 27bdea3da4 * gas/m68hc11/m68hc11.exp: Rename from all.exp; run the new tests.
* gas/m68hc11/all.exp: Remove.
	* gas/m68hc11/indexed12.d: New test.
	* gas/m68hc11/indexed12.s: Likewise.
	* gas/m68hc11/bug-1825.d: Likewise.
	* gas/m68hc11/bug-1825.s: Likewise.
2002-12-01 14:32:48 +00:00
Stephane Carrez c17aa364e9 * gas/m68hc11/insns.s: Don't use .comm for stack symbol so that objdump
can find the real symbol and not a gas internal debug symbol.
	* gas/m68hc11/insns.d: Update.
	* gas/m68hc11/insns-dwarf2.d: Update.
	* gas/m68hc11/insns12.d: Update.
	* gas/m68hc11/opers12.s (min5b, min9b): Use 16 and -256 for the min.
	* gas/m68hc11/opers12.d: Update after indexed offset operand fixes.
	* gas/m68hc11/opers12-dwarf2.d: Likewise.
2002-12-01 14:25:09 +00:00
Stephane Carrez 49fa082dde * gas/m68hc11/insns.s: Don't use .comm for stack symbol so that objdump
can find the real symbol and not a gas internal debug symbol.
	* gas/m68hc11/insns.d: Update.
	* gas/m68hc11/insns-dwarf2.d: Update.
	* gas/m68hc11/insns12.d: Update.
	* gas/m68hc11/opers12.s (min5b, min9b): Use 16 and -256 for the min.
	* gas/m68hc11/opers12.d: Update after indexed offset operand fixes.
	* gas/m68hc11/opers12-dwarf2.d: Likewise.
2002-12-01 13:46:08 +00:00
Stephane Carrez 1910266d61 * config/tc-m68hc11.c (md_begin): Fix qsort warning.
(tc_gen_reloc): Mark section param as not used.
2002-12-01 11:19:31 +00:00
Stephane Carrez c9e03e8be9 Fix Bug savannah/1825:
* config/tc-m68hc11.h (md_relax_frag): Define to support relaxations
	that are not pc-relative.
	(m68hc11_relax_frag): Declare.

	* config/tc-m68hc11.c (build_indexed_byte): Use a frag_var to handle
	the offsetable indexed addressing modes (n,r).
	(build_insn): Cleanup some locals.
	(m68hc11_relax_frag): New function imported from tc-cris.c to handle
	relaxation of difference between two symbols of same section.
	(md_convert_frag): For INDEXED_OFFSET relaxs, use the displacement
	only when this is a PC-relative operand and the offset is not absolute.
	(md_estimate_size_before_relax): Convert the INDEXED_OFFSET,UNDEF frag
	to INDEXED_OFFSET,STATE_BITS5 when the symbol is absolute; this will
	be handled by m68hc11_relax_frag.
2002-12-01 11:02:10 +00:00
Stephane Carrez 2f9046641f * config/tc-m68hc11.c (elf_flags): Set default ABI to gcc default
(32-bit int, 64-bit double).
	(md_longopts): New options -mshort, -mlong, -mshort-double and
	-mlong-double to control the ABI.
	(md_show_usage): Update.
	(md_parse_option): Handle new options.
	* doc/as.texinfo (Overview): Document new options for HC11/HC12.
2002-12-01 10:20:06 +00:00
Alan Modra 0909233e0f * symbols.c (report_op_error): New function, broken out of ...
(resolve_symbol_value): ... here. Use for both monadic and dyadic
	operators.
2002-12-01 03:18:49 +00:00
Kaz Kojima 0174e383ca * config/tc-sh.c (md_apply_fix3): Take account of fx_offset
for BFD_RELOC_32_PLT_PCREL.
	* sh/gas/sh/pic.s: Add a test for ".long foo@PLT+.-2-label".
	* sh/gas/sh/pic.d: Add expected output.
2002-11-30 14:09:12 +00:00
Alan Modra b34976b65a s/boolean/bfd_boolean/ s/true/TRUE/ s/false/FALSE/. Simplify
comparisons of bfd_boolean vars with TRUE/FALSE.  Formatting.
2002-11-30 08:39:46 +00:00
Nick Clifton 143c8e19b4 Allow BKPT instruction to be specified without an operand. Add a test for this. 2002-11-29 21:00:50 +00:00
Kaz Kojima 2bba414012 * config/tc-sh.c (md_apply_fix3): Call S_SET_THREAD_LOCAL
for TLS relocations.
2002-11-28 23:57:59 +00:00
Jakub Jelinek 7925dd68c9 * config/tc-ia64.c (md_apply_fix3): Add default case. 2002-11-28 23:32:59 +00:00
Jakub Jelinek 00f7efb6cc * symbols.c (S_SET_THREAD_LOCAL): New function.
* symbols.h (S_SET_THREAD_LOCAL): New prototype.
	* config/tc-i386.c (md_apply_fix3): Call S_SET_THREAD_LOCAL
	for TLS relocations.
	* config/tc-ia64.c (md_apply_fix3): Likewise.
	* config/tc-alpha.c (md_apply_fix3): Likewise.

	* ld-i386/tlsnopic.rd: Change NOTYPE to TLS for UND sg* symbols.
2002-11-28 14:15:55 +00:00
Jakub Jelinek 381a1ab30c * write.c (subsegs_finish): For SEC_MERGE sections pad last fragment
to entsize.
2002-11-28 14:13:51 +00:00
DJ Delorie a3b7543479 * dwarf2dbg.c (scale_addr_delta): New.
(size_inc_line_addr): Use it.
(emit_inc_line_addr): Use it.
2002-11-26 21:55:15 +00:00
Hans-Peter Nilsson fb2fd3e12c * config/tc-cris.c (cris_relax_frag): Fix typo in comment.
(md_assemble): Don't pass on branches to constants as relaxable.
	Tweak comment.
2002-11-26 08:21:35 +00:00
Hans-Peter Nilsson c79b382e06 * gas/cris/rd-bcnst.d, gas/cris/rd-bcnst.d: New test. 2002-11-26 08:19:09 +00:00
DJ Delorie d12e3de5e4 * gas/xstormy16/allinsn.d: Fix sdiv/sdivlh encodings. 2002-11-25 21:15:41 +00:00
Svein Seldal da91385db3 * gas/config/tc-tic4x.c (c4x_operands_match): Bugfix in direct
mode
2002-11-25 09:01:30 +00:00
Dave Anglin 1d4216362a * config/tc-hppa.h (tc_frob_symbol): Frob undefined unused symbols
only if they have default visibility.
2002-11-21 19:06:28 +00:00
Richard Henderson 33bf47a8fe * config/tc-alpha.c (alpha_fix_adjustable): Remove redundant
S_IS_DEFINED test.
2002-11-21 18:56:06 +00:00
Alan Modra 5f8075fa81 * config/tc-mcore.c (mcore_pool_count): New function.
(mcore_cons, mcore_float_cons, mcore_stringer, mcore_fill): Use it.
2002-11-21 11:43:40 +00:00
Klee Dienes 5ff3743120 2002-11-20 Klee Dienes <kdienes@apple.com>
* config/tc-mcore.c (md_begin): Use a const iterator.  Don't
        coalesce the name fields to use the same pointer.

        * config/tc-sh.c (md_begin): Use a const iterator.  Don't coalesce
        the name fields to use the same pointer.
        (get_specific): Check for opcodes with the same name using strcmp
        as well as comparing the pointer.
2002-11-21 09:54:12 +00:00
Alan Modra 5045ec7ae4 * write.c (adjust_reloc_syms): Don't reduce SEC_MERGE fixups with
fx_subsy non-NULL.
2002-11-20 12:56:01 +00:00
DJ Delorie c8014bda54 * gas/xstormy16/allinsn.sh: Add sdiv, divlh, and sdivlh.
* gas/xstormy16/allinsn.d: Regenerate.
* gas/xstormy16/allinsn.s: Regenerate.
2002-11-20 03:14:47 +00:00
Alan Modra bbce6ab74a move testsuite entries to the correct changelog 2002-11-20 02:50:28 +00:00
Richard Henderson 20e420c2ed * config/obj-elf.c (obj_elf_visibility): Overwrite only the
visibility portion of st_other.
2002-11-20 02:39:21 +00:00
Klee Dienes a720f7bca7 2002-11-19 Klee Dienes <kdienes@apple.com>
* config/tc-h8300.c (struct h8_instruction): New type, used to
        wrap h8_opcodes with length, noperands, idx, and size fields
        (computed at run-time).
        (h8_instructions): New variable.
        (md_begin): Allocate the storage for h8_instructions.  Fill
        h8_instructions with pointers to the appropriate opcode and the
        correct value for the additional fields.
        (clever_message): Update to use h8_instructions instead of
        h8_opcodes.
        (build_bytes): Ditto.
        (get_specific): Ditto.
        (md_assemble): Ditto.
2002-11-19 22:56:42 +00:00
Martin Schwidefsky 0a00dd4807 * config/tc-s390.c (tc_s390_fix_adjustable): Re-add patch to prevent
adjustments to symbols in merge sections.
2002-11-19 14:58:54 +00:00
Alan Modra 81283cde50 * config/tc-alpha.c (s_alpha_prologue): as_bad when sym is NULL. 2002-11-19 07:32:28 +00:00
Kevin Buettner 14e777e044 Add support for 64-bit DWARF 2 formats to gas. 2002-11-18 21:08:54 +00:00
Alexandre Oliva a816d1ed6a * config/tc-mips.c (s_change_section): Make sure input buffer
is not accessed past the end.  Don't hand
obj_elf_change_section a pointer into the input buffer.
2002-11-18 20:45:48 +00:00
Alexandre Oliva 6b70243f72 * config/tc-mips.c (tc_gen_reloc): Fix typo in handling of
GOT_LO16 on NEWABI.
2002-11-18 20:41:03 +00:00
Svein Seldal eb1284494b Fixups in ChangeLog entries which has been filed in the wrong place. 2002-11-18 14:00:44 +00:00
Svein Seldal 9c87d6c7e4 * gas/config/tc-tic4x.c: Fixed proper commandline
parameters. Added support for new opcode-list format. General
	error message fixups.
	(c4x_inst_add): Reject insn not for our CPU
	(md_begin): Added matrix for setting the proper opcode-level &
	device-flags according to cpu type and revision. Rewrite the
	opcode hasher.
	(c4x_operand_parse): Fix opcode bug
	(c4x_operands_match): New function argument. Added dry-run
	mechanism, that is optional error generation. Added constraint 'i'
	and 'j'.
	(c4x_insn_check): Added new function for post-verification of the
	generated insn.
	(md_assemble): Check all opcodes before croaking because of an
	argument mismatch. Need this to be able to fully support
	ortogonally arguments.
	(md_parse_options): Revised commandprompt swicthes and added new
	ones.
	(md_show_usage): Complete rewrite of printout.
	* gas/testsuite/gas/tic4x/addressing.s: Fix bug in one insn
	* gas/testsuite/gas/tic4x/addressing_c3x.d: Update thereafter
	* gas/testsuite/gas/tic4x/addressing_c4x.d: Update thereafter
	* gas/testsuite/gas/tic4x/allopcodes.S: Add support for new
	opclass.h changes
	* gas/testsuite/gas/tic4x/opclasses.h: Added testsuites for
	the new enhanced opcodes.
	* gas/testsuite/gas/tic4x/opcodes.s: Regenerate
	* gas/testsuite/gas/tic4x/opcodes_c3x.d: Update from above
	* gas/testsuite/gas/tic4x/opcodes_c4x.d: Update from above
	* gas/testsuite/gas/tic4x/opcodes_new.d: Added new testsuite for
	the enhanced and special insns.
	* gas/testsuite/gas/tic4x/tic4x.exp: Added the opcodes_new testsuite
	* include/opcode/tic4x.h: File reordering. Added enhanced opcodes.
	* opcodes/tic4x-dis.c: Added support for enhanced and special
	insn.
	(c4x_print_op): Added insn class 'i' and 'j'
	(c4x_hash_opcode_special): Add to support special insn
	(c4x_hash_opcode): Update to support the new opcode-list
	format. Add support for the new special insns.
	(c4x_disassemble): New opcode-list support.
2002-11-18 09:09:35 +00:00
Svein Seldal 48c5eb8a70 TIC4X testcase commit
* binutils/testsuite/binutils-all/objcopy.exp: Disable tic4x
	from test
	* binutils/testsuite/binutils-all/objdump.exp: Setup proper
	values for tic4x testcase
	* gas/testsuite/gas/all/gas.exp: Setup for tic4x testcase
	* gas/testsuite/gas/macros/macros.exp: Ditto
	* gas/testsuite/gas/all/gas.exp: Setup for tic4x testcase
	* gas/testsuite/gas/macros/macros.exp: Ditto
	* gas/testsuite/gas/tic4x: New tic4x gas testsuite directory
	* ld/testsuite/ld-scripts/script.exp: Setup for tic4x testcase
2002-11-18 08:28:44 +00:00
Svein Seldal 44287f6039 * gas/config/tc-tic4x.c: Remove c4x_pseudo_ignore function.
(c4x_operands_match): Added check for 8-bits LDF insn. Give
	  warning when using constant direct bigger than 2^16. Add the new
	  arguments.
	* include/opcode/tic4x.h: Major rewrite of entire file. Define
	  instruction classes, and put each instruction into a class.
	* opcodes/tic4x-dis.c: (c4x_print_op): Add support for the new
	  argument format. Fix bug in 'N' register printer.
2002-11-16 12:23:23 +00:00
Alan Modra 852f55ac64 * gas/ppc/booke.d: Adjust output for corrected condition reg. 2002-11-12 04:04:13 +00:00
Christopher Faylor 591d46894b * configure.in: Use .gdbinit under Cygwin.
* configure: Regenerate.
2002-11-11 17:21:33 +00:00
Christopher Faylor 1a89f85f47 * config/tc-i386.h (EXTERN_FORCE_RELOC): Define only if STRICT_PE_FORMAT. 2002-11-11 17:11:53 +00:00
Svein Seldal 98199d8f1c * Makefile.am: Added tic4x dependecy
* Makefile.in: Regenerate
2002-11-11 14:58:49 +00:00
Svein Seldal 247b1fe610 gas tic4x target enhancements (long list - see gas/ChangeLog and
include/ChangeLog)
2002-11-11 14:29:01 +00:00
Hans-Peter Nilsson 9df59bba97 * macro.c (get_any_string): Correct logic for not going beyond end
of in->ptr[].
2002-11-11 08:42:52 +00:00
Hans-Peter Nilsson 480c8d9474 * config/tc-mmix.c (get_putget_operands): Mark both possible
operands as invalid at beginning.
2002-11-10 18:35:51 +00:00
Hans-Peter Nilsson 32c27eed9c * config/tc-mmix.c (md_convert_frag) <case STATE_GREG_DEF>:
Initialize target of fixup to zero.
2002-11-10 13:09:11 +00:00
Nick Clifton b46c169191 Only run fastcall test for x86 PE targets. 2002-11-07 09:20:10 +00:00
Alexandre Oliva 78e1bb4045 * config/tc-mips.c (macro_build_lui): _gp_disp is not special on
NEWABI, but we should still emit HI16_S for non-PIC n32.
2002-11-07 02:29:32 +00:00
Richard Henderson 66ba4c770b * config/tc-alpha.c (alpha_validate_fix): Move code ...
(alpha_fix_adjustable): ... here.
        * config/tc-alpha.h (TC_VALIDATE_FIX): Remove.
2002-11-07 00:42:19 +00:00
Nick Clifton c9e3887989 Adds support for fastcall symbols as used on Microsoft Windows platforms
(i386)
2002-11-06 19:36:20 +00:00
H.J. Lu aa3d8fdff8 2002-11-05 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (support_64bit_objects): Check *l before it
	is freed.
2002-11-05 21:53:13 +00:00
Nick Clifton e96c546430 Set SEC_DATA and SEC_LOAD flags for sections marked as 's'. 2002-11-04 16:10:56 +00:00
H.J. Lu 4dd8d67b6a 2002-11-01 H.J. Lu <hjl@gnu.org>
* gas/i386/i386.exp: Add "sub".

	* gas/i386/sub.d: New.
	* gas/i386/sub.s: New.
2002-11-01 20:41:48 +00:00
Alan Modra 4f3cafa2eb * write.c (TC_FORCE_RELOCATION_SUB_ABS): Default to zero.
(TC_FORCE_RELOCATION_SUB_LOCAL): Likewise when DIFF_EXPR_OK.
	* doc/internals.texi (TC_FORCE_RELOCATION_SUB_ABS): Document changed
	default.
2002-11-01 10:42:26 +00:00
Alan Modra 4d0b322074 * dep-in.sed: Fix typo. 2002-11-01 10:35:43 +00:00
Daniel Jacobowitz 54847c7622 * configure.in: Update ARM CPU patterns.
* configure: Regenerated.
2002-10-30 17:05:41 +00:00
Daniel Jacobowitz 3d82a647ca * itbl-lex.l: Use #include <> for generated headers.
* itbl-ops.c: Likewise.
2002-10-30 03:56:39 +00:00
Daniel Jacobowitz b1744eabdd * doc/gasp.texi: Fix typo in deprecation note. 2002-10-28 15:44:08 +00:00
Nick Clifton 8df7094c00 Allow an absolute reference to _GLOBAL_TABLE_OFFSET_ to be converted into
a GOT reloc.
2002-10-23 10:34:18 +00:00
Hans-Peter Nilsson 1cd2bb725b Fix typo in last entry 2002-10-23 05:23:57 +00:00
Hans-Peter Nilsson 3a99b99035 * config/tc-mmix.h (tc_frob_file_before_adjust): Don't declare.
(tc_frob_file_before_adjust): Don't define.
	* config/tc-mmix.c (mmix_frob_local_reloc): Remove unused
	function.
	(mmix_frob_file_before_adjust): Remove ineffective function.
2002-10-23 05:21:09 +00:00
H.J. Lu 3d4a853f67 2002-10-22 H.J. Lu <hjl@gnu.org>
* gas/mips/branch-misc-2.d: Updated.
2002-10-23 03:11:47 +00:00
Hans-Peter Nilsson 1c97116001 * config/tc-cris.c (SIMPLE_EXPR): New macro.
(cris_relax_frag): New function.
	(md_estimate_size_before_relax) <case ENCODE_RELAX
	(STATE_BASE_PLUS_DISP_PREFIX, STATE_UNDF)>: Pass on unresolved
	expressions that will become absolute expressions to relaxation.
	(md_convert_frag) <case ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX,
	STATE_WORD)>: Expect only absolute expressions.  Use the symbol
	value, not distance to symbol.
	<case ENCODE_RELAX (STATE_BASE_PLUS_DISP_PREFIX, STATE_BYTE)>:
	Ditto.  Correct placement of fixup.
	(md_assemble): Use SIMPLE_EXPR when dissecting expressions.
	(gen_bdap): Ditto.
	* config/tc-cris.h (cris_relax_frag): Declare.
	(md_relax_frag): Define.
2002-10-22 23:45:40 +00:00
Hans-Peter Nilsson c84e511732 * gas/cris/rd-pcrel1.d, gas/cris/rd-pcrel1.s,
gas/cris/rd-pcrel2.d, gas/cris/rd-pcrel2.s: New tests.
2002-10-22 23:15:59 +00:00
Alan Modra 7ed1d3463e * config/obj-elf.c (special_sections): Use correct types for init
array sections.
	(obj_elf_change_section): Don't mess with init array section type.
2002-10-22 10:56:45 +00:00
Richard Sandiford 631cb423b2 * config/tc-mips.c (mips_need_elf_addend_fixup): Return true
for relocs against symbols in a merged section.

testsuite/
	* gas/mips/elf-rel7.[sd]: New test.
	* gas/mips/mips.exp: Run it.
2002-10-21 14:59:30 +00:00
Alexandre Oliva 6047c971a2 * config/tc-mips.c (md_begin): Add $fcc registers to the symbol
table as register names.
2002-10-19 00:37:50 +00:00
Martin Schwidefsky 75504fede8 * config/tc-s390.c (md_parse_option): Set s390_arch_size to 32
for option -m31.
2002-10-18 07:30:06 +00:00
Alan Modra 0200099915 * expr.c (operand): Add support for n.nn flonums. 2002-10-18 01:56:39 +00:00
Alan Modra 311797d555 * itbl-parse.y (entry): Provide empty action. 2002-10-17 01:29:36 +00:00
Alan Modra 4001ad8ce4 * configure.in (BFDVER_H): Set and subst.
* dep-in.sed: Replace bfdver.h with $(BFDVER_H).
	* Makefile.am: Run "make dep-am".
	(BFDVER_H): Define.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
2002-10-16 13:27:04 +00:00
Alan Modra 3ca4bdc352 * config/tc-i386.h (EXTERN_FORCE_RELOC): Define.
(MD_APPLY_SYM_VALUE): Define for PE too.
2002-10-15 02:20:53 +00:00
Alan Modra b95d15c6c5 * Makefile.am: Run "make dep-am".
(CPU_OBJ_VALID): sh64 coff is invalid.
	* as.c: #include "bfdver.h".
	* Makefile.in: Regenerate.
	* config.in: Regenerate.
2002-10-14 12:08:47 +00:00
Alan Modra ec266e19eb * config/tc-v850.c (CHECK_): Remove token pasting operator. 2002-10-14 11:28:57 +00:00
Richard Sandiford 8f6847cbf4 * configure.in (mips64vr-elf, mips64vrel-elf): New config.
* configure: Regenerate.
2002-10-14 06:59:06 +00:00
Alexandre Oliva 10181a0dce * config/tc-mips.c (s_gpdword): New function.
(mips_pseudo_table): Add .gpdword.
(mips_need_elf_addend_fixup): never for NEWABI.
(md_apply_fix3): Don't mark BFD_RELOC64 after GPREL16 or
GPREL32 as done.
(s_cpadd): Generate .cpadd on NEWABI.
2002-10-13 21:22:49 +00:00
Alan Modra 49181a6af7 * config/tc-ppc.c (ppc_cleanup): Make 'i' unsigned int. 2002-10-12 10:23:17 +00:00
Alexandre Oliva 63d0b39325 * gas/mips/mips.exp: Don't xfail relax.
* gas/mips/relax.s: Increase coverage.
* gas/mips/relax.d: Add expected output.  Use relax.l for as stderr.
* gas/mips/relax.l: New file.
2002-10-12 05:26:56 +00:00
Alexandre Oliva 4a6a3df43d * config/tc-mips.h (mips_relax_frag): Take segment as argument.
(md_relax_frag): Adjust macro.
* config/tc-mips.c (mips_relax_branch): New variable.
(RELAX_BRANCH_ENCODE, RELAX_BRANCH_P, RELAX_BRANCH_LIKELY,
RELAX_BRANCH_LINK, RELAX_BRANCH_TOOBAR): New.
(RELAX_MIPS16_P): Adjust.
(append_insn): Emit branch to non-constant in a frag_var if
branch-relaxation is desirable and possible.
(OPTION_RELAX_BRANCH, OPTION_NO_RELAX_BRANCH): New options.
(OPTION_ELF_BASE): Adjust.
(md_parse_option): Handle new options.
(md_apply_fix3): Update comment on EMBEDDED_PIC conditional
branch relaxation.
(relaxed_branch_length): New function.
(md_estimate_size_before_relax): Handle branch frags.
(mips_relax_frag): Likewise.
(md_convert_frag): Handle branch frags.  Warn if branch is
relaxed.
2002-10-12 05:23:33 +00:00
Kaz Kojima 94a03f18b8 * gas/sh/tlsd.s, gas/sh/tlsd.d: New.
* gas/sh/tlsnopic.s, gas/sh/tlsnopic.d: New.
	* gas/sh/tlspic.s, gas/sh/tlspic.d: New.
	* gas/sh/basic.exp: Add new tests.
2002-10-11 14:42:51 +00:00
Kaz Kojima 9efb3b7baf * config/tc-sh.c (sh_force_relocation): Make sure TLS relocs get
emitted.
	(md_apply_fix3): Add TLS relocs.
	(sh_parse_name): Support @TLSGD, @TLSLDM, @GOTTPOFF, @TPOFF and
	@DTPOFF.
2002-10-11 14:34:46 +00:00
Alan Modra 3e02c1cc58 * config/tc-i386.c (output_jump): Set fx_signed for loop/jcxz.
(md_estimate_size_before_relax): Likewise for 8 bit branches.
2002-10-11 00:25:32 +00:00
Joern Rennecke ac62e7a368 * config/tc-sh.c (assemble_ppi): Initialize reg_x / reg_y / reg_n
inside loop.
2002-10-10 13:37:32 +00:00
Stephen Clarke 42bf09b2b1 * gas/elf.exp: Don't run for sh64*-*-linux*, because it sets the
lsb in SHmedia code addresses.
* gas/sh/basic.exp: Force SHcompact for sh64*-*-linux* to enable
recognition of SH-1/2/3/4 instructions.
(proc do_fp): Do not run dsp tests for sh64*-*-linux*.
* gas/sh/sh64/abi-32.d: Adjust expected output to include
sh64*-*-linux* formats too.
* gas/sh/sh64/abi-64.d, gas/sh/sh64/basic-1.d,
gas/sh/sh64/case-1.d, gas/sh/sh64/case-noexp-1.d,
gas/sh/sh64/crange1-1.d, gas/sh/sh64/crange1-2.d,
gas/sh/sh64/crange2-1.d, gas/sh/sh64/crange2-2.d,
sh/sh64/crange2-noexp-1.d, gas/sh/sh64/crange3-1.d,
gas/sh/sh64/crange4-1.d, gas/sh/sh64/crange5-1.d,
gas/sh/sh64/creg-1.d, gas/sh/sh64/creg-2.d, gas/sh/sh64/datal-2.d,
gas/sh/sh64/datal32-1.d, gas/sh/sh64/datal32-3.d,
gas/sh/sh64/datal64-1.d, gas/sh/sh64/datal64-3.d,
gas/sh/sh64/endian-1.d, gas/sh/sh64/endian-2.d,
gas/sh/sh64/err-noexp-cmd1.s, gas/sh/sh64/immexpr32-1.d,
gas/sh/sh64/immexpr32-2.d, gas/sh/sh64/immexpr64-1.d,
gas/sh/sh64/immexpr64-2.d, gas/sh/sh64/lineno.d,
gas/sh/sh64/localcom-1.d, gas/sh/sh64/mix-1.d,
gas/sh/sh64/mix-noexp-1.d, gas/sh/sh64/movi-3.d,
gas/sh/sh64/movi32-1.d, gas/sh/sh64/movi32-2.d,
gas/sh/sh64/movi32-noexp-2.d, gas/sh/sh64/movi64-1.d,
gas/sh/sh64/movi64-2.d, gas/sh/sh64/movi64-3.d,
gas/sh/sh64/movi64-noexp-2.d, gas/sh/sh64/pt-1.d,
gas/sh/sh64/pt-noexp-1.d, gas/sh/sh64/pt32-1.d,
gas/sh/sh64/pt32-noexp-2.d, gas/sh/sh64/pt64-1.d,
gas/sh/sh64/pt64-32-1.d, gas/sh/sh64/pt64-32-2.d,
gas/sh/sh64/pt64-noexp-2.d, gas/sh/sh64/ptc32-1.d,
gas/sh/sh64/ptc32-noexp-1.d, gas/sh/sh64/ptc64-1.d,
gas/sh/sh64/ptc64-32-1.d, gas/sh/sh64/ptc64-noexp-1.d,
gas/sh/sh64/ptext32-1.d, gas/sh/sh64/ptext32-noexp-1.d,
gas/sh/sh64/ptext64-1.d, gas/sh/sh64/ptext64-32-1.d,
gas/sh/sh64/ptext64-noexp-1.d, gas/sh/sh64/rel32-1.d,
gas/sh/sh64/rel32-2.d, gas/sh/sh64/rel32-3.d,
gas/sh/sh64/rel32-4.d, gas/sh/sh64/rel32-5.d,
gas/sh/sh64/rel64-1.d, gas/sh/sh64/rel64-2.d,
gas/sh/sh64/rel64-3.d, gas/sh/sh64/rel64-4.d,
gas/sh/sh64/rel64-5.d, gas/sh/sh64/relax-1.d,
gas/sh/sh64/relax-2.d, gas/sh/sh64/relax-3.d,
gas/sh/sh64/shift32-1.d, gas/sh/sh64/shift32-3.d,
gas/sh/sh64/shift32-noexp-3.d, gas/sh/sh64/shift64-1.d,
gas/sh/sh64/shift64-2.d, gas/sh/sh64/shift64-3.d,
gas/sh/sh64/shift64-noexp-3.d, gas/sh/sh64/syntax-1.d,
gas/sh/sh64/syntax-2.d, gas/sh/sh64/ua32-1.d,
gas/sh/sh64/ua64-1.d: Likewise.
2002-10-09 19:40:42 +00:00
Stephen Clarke f61dfddf2d * config/tc-sh64.c (sh64_target_format): Add support for sh64
Linux environment.
2002-10-09 19:07:43 +00:00
Chris Demetriou 21bd8c3134 2002-10-03 Chris Demetriou <cgd@broadcom.com>
* gas/mips/mips-no-jalx.l: Make error message regexps accomodate
        tools which target a specific CPU by default.
2002-10-03 23:53:09 +00:00
Kaz Kojima 28602ebff6 * contig/tc-sh.c (sh_local_pcrel): New.
(sh_force_relocation): Use sh_local_pcrel.
	(md_pcrel_from_section): Check the relocation type whether it
	should be resolved locally. Use S_FORCE_RELOC.
	* testsuite/gas/sh/pcrel2.d: Check code also.
2002-10-03 04:58:28 +00:00
Stephen Clarke 7a68fea6e1 * gas/sh/sh64/ptc32-noexp-1.d: Adjust for changes to *ABS*
symbol generation.
* gas/sh/sh64/ptc64-noexp-1.d: Likewise.
2002-10-03 00:56:06 +00:00
Alan Modra 97724570fe * config/tc-mips.h (TC_FORCE_RELOCATION_SUB_SAME): Define.
(TC_FORCE_RELOCATION): Tidy arg.
2002-10-01 06:15:33 +00:00
H.J. Lu f11b4434cc 2002-09-30 H.J. Lu <hjl@gnu.org>
* gas/mips/mips.exp: Undo the last change.
2002-10-01 04:37:47 +00:00
H.J. Lu 28e0c55ddc 2002-09-30 H.J. Lu <hjl@gnu.org>
* gas/mips/vr4120.d: Use "#pass" instead of "#..." to skip the
	rest of output.
2002-10-01 00:12:26 +00:00
H.J. Lu 5d42dcdf5f 2002-09-30 H.J. Lu <hjl@gnu.org>
* gas/mips/mips.exp: Set xfail on empic, empic2, empic3_g1 and
	empic3_g2 on Linux/mips.
2002-09-30 21:12:24 +00:00
H.J. Lu 17c06574e8 2002-09-30 H.J. Lu <hjl@gnu.org>
* gas/mips/vr4120.d: Pass -m mips:4120 to objdump.
2002-09-30 20:59:11 +00:00
Richard Sandiford 60b63b728f [gas/]
* doc/c-mips.texi: Add entries for -march=vr4120,vr4130,vr4181,
	vr5400 and vr5500.  Add entry for -mfix-vr4122-bugs.
	* config/tc-mips.c (CPU_HAS_DROR, CPU_HAS_ROR): New macros.
	(hilo_interlocks): True for CPU_VR5500.
	(gpr_interlocks, cop_interlocks): True for CPU_VR5400 and CPU_VR5500.
	(mips_fix_vr4122_bugs): New.
	(append_insn): Work around 4122 errors if mips_fix_vr4122_bugs.
	(mips_emit_delays): Likewise.
	(macro2) [M_DROLI]: Use dror or dror32 if CPU_HAS_DROR.
	[M_ROLI]: Likewise ror if CPU_HAS_ROR.
	(validate_mips_insn, mips_ip): Handle '[', ']', 'e' and '%'.
	(OPTION_FIX_VR4122, OPTION_NO_FIX_VR4122): New options.
	(md_longopts): Add -mfix-vr4122-bugs and -no-mfix-vr4122-bugs.
	(OPTION_ELF_BASE): Bump.
	(md_parse_option): Handle the new options.
	(mips_cpu_info_table): Add entries for vr4120, vr4130, vr4181,
	vr5400 and vr5500.

[gas/testsuite/]
	* gas/mips/mips4100.[sd]: Move dmadd16 and madd16 checks to...
	* gas/mips/vr4111.[sd]: ...this new test.
	* gas/mips/vr4120.[sd],
	* gas/mips/vr4122.[sd],
	* gas/mips/vr5400.[sd],
	* gas/mips/vr5500.[sd]: New tests.
	* mips.exp: Run them.
2002-09-30 12:04:54 +00:00
H.J. Lu 7a49a8c2b4 2002-09-29 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (md_apply_fix3): Subtract the symbol value
	twice if howto->pcrel_offset is true.
2002-09-30 06:32:00 +00:00
Jason Thorpe 04ff5cb5c7 * config/tc-vax.c (md_estimate_size_before_relax): Only try to
convert undefined references to GOT32/PLT32 if PIC code is
requested.  Fix comment.
2002-09-28 20:01:43 +00:00
Daniel Jacobowitz 8ba4dac030 2002-09-27 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* config/tc-sh.c (sh_force_relocation): Return 0 for
        some PC relative relocations when not relaxing.
        * testsuite/gas/sh/pcrel2.s: New.
        * testsuite/gas/sh/pcrel2.d: New.
        * testsuite/gas/sh/basic.exp: Add pcrel2 test.
2002-09-28 00:41:27 +00:00
Jason Thorpe 8f3f366625 * gas/vax/elf-rel.[ds]: New test.
* gas/vax/quad.exp: Move contents to...
* gas/vax/vax.exp: ...here.  New file.
2002-09-27 23:36:01 +00:00
Jakub Jelinek bffbf9406f bfd/
* reloc.c: Add x86-64 TLS relocs.
	* bfd-in2.h, libbfd.h: Rebuilt.
	* elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
	relocs.  Add TLS relocs.
	(x86_64_reloc_map): Add TLS relocs.
	(elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
	(struct elf64_x86_64_link_hash_entry): Add tls_type field.
	(GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
	(elf64_x86_64_hash_entry): Define.
	(struct elf64_x86_64_obj_tdata): New.
	(elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
	(struct elf64_x86_64_link_hash_table): Add tls_ld_got.
	(link_hash_newfunc): Initialize tls_type.
	(elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
	(elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
	(elf64_x86_64_mkobject): New.
	(elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
	(elf64_x86_64_tls_transition): New.
	(elf64_x86_64_check_relocs): Add r_type variable and use it.
	Handle TLS relocs.
	(elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
	(allocate_dynrelocs): Allocate GOT space for TLS relocs.
	(elf64_x86_64_size_dynamic_sections): Likewise.
	(dtpoff_base, tpoff): New.
	(elf64_x86_64_relocate_section): Handle TLS relocs.
	(elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
	entries.
	(bfd_elf64_mkobject): Define.

	* elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
	DF_STATIC_TLS if shared.
gas/
	* config/tc-i386.c (tc_i386_fix_adjustable): Add x86-64 TLS relocs.
	Define them if not BFD_ASSEMBLER.
	(lex_got): Handle @tlsgd, @dtpoff and @tpoff in 64-bit mode, add
	@tlsld.
	(md_apply_fix3): No addend for BFD_RELOC_X86_64_TLSGD,
	BFD_RELOC_X86_64_TLSLD and BFD_RELOC_X86_64_GOTTPOFF.
	(tc_gen_reloc): Handle x86-64 TLS relocs.
include/
	* elf/x86-64.h: Add TLS relocs.
ld/testsuite/
	* lib/ld-lib.exp (run_ld_link_tests): Add.
	* ld-sh/sh64/sh64.exp (run_ld_link_tests, regexp_diff,
	file_contents): Remove.
	(sh64tests): Add 6th field to the tests array.
	* ld-i386/i386.exp (run_ld_link_tests): Remove.
	* ld-x86-64/x86-64.exp: New.
	* ld-x86-64/tlsbin.dd: New test.
	* ld-x86-64/tlsbinpic.s: New test.
	* ld-x86-64/tlsbin.rd: New test.
	* ld-x86-64/tlsbin.s: New test.
	* ld-x86-64/tlsbin.sd: New test.
	* ld-x86-64/tlsbin.td: New test.
	* ld-x86-64/tlslib.s: New test.
	* ld-x86-64/tlspic1.s: New test.
	* ld-x86-64/tlspic2.s: New test.
	* ld-x86-64/tlspic.dd: New test.
	* ld-x86-64/tlspic.rd: New test.
	* ld-x86-64/tlspic.sd: New test.
	* ld-x86-64/tlspic.td: New test.
2002-09-27 19:29:18 +00:00
H.J. Lu 502eccd936 2002-09-27 H.J. Lu <hjl@gnu.org>
* gas/mips/mips-jalx.s: Add ".p2align 4".
	* gas/mips/mips16-jalx.s: Likewise.

	* gas/mips/mips-jalx.d: Check nop.
	* gas/mips/mips16-jalx.d: Likewise.
2002-09-27 14:53:16 +00:00
Alan Modra 8773354138 * config/tc-avr.c (md_apply_fix3): Reinstate code handling pcrel
fixups to current or absolute section.
2002-09-27 04:38:47 +00:00
Jim Wilson 825487fa2d Fix v850 .offset pseudo-op
* config/tc-v850.c (v850_offset): Use frag_var instead of frag_now_fix
	and frag_more.
2002-09-26 22:04:19 +00:00
Thiemo Seufer 3396de367a /gas/ChangeLog
* config/tc-mips.c (CPU_HAS_MIPS16): Add mips-lsi-elf as MIPS16
	capable configuration.
	(macro_build): Check for MIPS16 capability, not for actual MIPS16 code
	generation.
	(mips_ip): Likewise.

	/gas/testsuite/ChangeLog
	* gas/mips/mips-jalx.d: New file, check jalx assembly.
	* gas/mips/mips-jalx.s: Likewise.
	* gas/mips/mips-no-jalx.l: Likewise.
	* gas/mips/mips-no-jalx.s: Likewise.
	* gas/mips/mips16-jalx.d: Likewise.
	* gas/mips/mips16-jalx.s: Likewise.
	* gas/mips/mips.exp: Add new tests.

	/opcodes/ChangeLog:
	* mips-dis.c (print_insn_mips): Always allow disassembly of
	32-bit jalx opcode.
2002-09-26 09:56:35 +00:00
Thiemo Seufer f3c0ec86c4 * config/tc-mips.c (append_insn): Fix jump overflow check.
* gas/mips/jal-range.s: Fix jump overflow check.
	* gas/mips/jal-range.l: Likewise.
2002-09-26 09:00:08 +00:00
Alan Modra 52271982a7 * config/tc-i386.c (process_operands): Warn about "lea" segment
overrides.
2002-09-24 01:46:42 +00:00
Nick Clifton 9d7f57761d Add LDM and STM instructions which are unpredictable because of their use of
the writeback bit.
2002-09-23 16:46:33 +00:00
DJ Delorie 823882f588 * write.c: Delete set_segment_vma and prototype. Update all callers. 2002-09-23 11:58:00 +00:00
Alan Modra 6539b54baf * config/tc-i386.c (md_apply_fix3): Replace S_IS_EXTERNAL,
S_IS_WEAK etc. with S_FORCE_RELOC call.  Correct comment.
	Rename "fseg" to "sym_seg".
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
2002-09-21 10:39:17 +00:00
Nick Clifton 96ea717129 Fix UNPREDICATABLE use of writeback in LDM/STM instructions. 2002-09-21 07:27:43 +00:00
Nick Clifton 7cf108933b symbols.c (colon): Do not allow symbols to be created in the absolute section
if WORKING_DOT_WORD is not defined and new_broken_words would require a new
frag to be created.
2002-09-20 14:47:14 +00:00
Nick Clifton 9f269a7285 Do not allow symbols to be created in the absolute section. 2002-09-20 06:57:41 +00:00
Alan Modra f6cf69d700 * expr.c (expr): Simplify foo-foo here.
(clean_up_expression): Remove O_subtract code.
2002-09-20 00:58:39 +00:00
Alan Modra 263462410c * write.h (struct fix): Add fx_dot_value.
(dot_value): Declare.
	* write.c (dot_value): New var.
	(fix_new_internal): Save dot_value as fx_dot_value.
	* expr.c (expr): Update dot_value.
2002-09-19 23:51:35 +00:00
Jakub Jelinek 37e55690c4 bfd/
* reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
	BFD_RELOC_386_TLS_GOTIE): Add.
	* bfd-in2.h, libbfd.h: Rebuilt.
	* elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
	and R_386_TLS_GOTIE.
	(elf_i386_reloc_type_lookup): Handle it.
	(struct elf_i386_link_hash_entry): Change tls_type type to unsigned
	char instead of enum, change GOT_* into defines.
	(GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
	(elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
	(elf_i386_check_relocs): Likewise.  Avoid crash if local symbol is
	accessed both as normal and TLS symbol.  Move R_386_TLS_LDM and
	R_386_PLT32 cases so that R_386_TLS_IE can fall through.
	Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
	(elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
	Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
	(allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
	tls_type is GOT_TLS_IE_BOTH.
	(elf_i386_size_dynamic_sections): Likewise.
	(elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
	Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
	(elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
	all 4 GOT_TLS_* TLS types.
gas/
	* config/tc-i386.c (tc_i386_fix_adjustable): Handle
	BFD_RELOC_386_TLS_IE and BFD_RELOC_386_TLS_GOTIE.
	(BFD_RELOC_386_TLS_IE, BFD_RELOC_386_TLS_GOTIE): Define to 0
	if not defined.
	(lex_got): Handle @GOTNTPOFF and @INDNTPOFF.
	(md_apply_fix3, tc_gen_reloc): Handle BFD_RELOC_386_TLS_IE and
	BFD_RELOC_386_TLS_GOTIE.
gas/testsuite/
	* gas/i386/tlspic.s: Add tests.
	* gas/i386/tlspic.d: Regenerated.
	* gas/i386/tlsnopic.s: Add tests.
	* gas/i386/tlsnopic.d: Regenerated.
include/
	* elf/i386.h (R_386_TLS_TPOFF, R_386_TLS_IE, R_386_TLS_GOTIE):
	Define.
ld/testsuite/
	* ld-i386/i386.exp: New.
	* ld-i386/tlsbin.dd: New test.
	* ld-i386/tlsbinpic.s: New test.
	* ld-i386/tlsbin.rd: New test.
	* ld-i386/tlsbin.s: New test.
	* ld-i386/tlsbin.sd: New test.
	* ld-i386/tlsbin.td: New test.
	* ld-i386/tlslib.s: New test.
	* ld-i386/tlsnopic1.s: New test.
	* ld-i386/tlsnopic2.s: New test.
	* ld-i386/tlsnopic.dd: New test.
	* ld-i386/tlsnopic.rd: New test.
	* ld-i386/tlsnopic.sd: New test.
	* ld-i386/tlspic1.s: New test.
	* ld-i386/tlspic2.s: New test.
	* ld-i386/tlspic.dd: New test.
	* ld-i386/tlspic.rd: New test.
	* ld-i386/tlspic.sd: New test.
	* ld-i386/tlspic.td: New test.
2002-09-19 19:01:18 +00:00
Richard Henderson 021c2b5e4b * config/tc-alpha.c (md_pcrel_from): Only adjust special for
branch type relocs.
        (alpha_force_relocation): Don't special-case branch type relocs.

        * gas/alpha/elf-reloc-7.s: New.
        * gas/alpha/elf-reloc-7.d: New.
        * gas/alpha/alpha.exp: Run it.
2002-09-19 16:13:38 +00:00
Nick Clifton 4f2a7c9e31 Handle situation where architecture has not yet been selected. 2002-09-19 14:52:15 +00:00
Chris Demetriou e8dcafb0b8 [ gas/ChangeLog ]
2002-09-18  Chris Demetriou  <cgd@broadcom.com>

        * config/tc-mips.c (md_apply_fix3): Just return for BFD_RELOC_8.

[ gas/testsuite/ChangeLog ]
2002-09-18  Chris Demetriou  <cgd@broadcom.com>

        * gas/mips/baddata1.s: New file.
        * gas/mips/baddata1.l: New file.
        * gas/mips/mips.exp: Run new test.
2002-09-18 21:45:29 +00:00
Chris Demetriou 885add9520 [ gas/ChangeLog ]
2002-09-18  Chris Demetriou  <cgd@broadcom.com>

        * config/tc-mips.c (IS_SEXT_32BIT_NUM): Move closer to top of file.
        (IS_SEXT_16BIT_NUM): New macro.
        (macro_build_ldst_constoffset): New function, to build a set of
        instructions to do a load or store from a constant offset relative
        to a given register.
        (macro, s_cprestore): Use macro_build_ldst_constoffset to implement
        .cprestore pseudo-op.

[ gas/testsuite/ChangeLog ]
2002-09-18  Chris Demetriou  <cgd@broadcom.com>

        * gas/mips/mips-abi32-pic2.s: New file.
        * gas/mips/mips-abi32-pic2.d: New file.
        * gas/mips/mips.exp: Run new test.

[ plus, fixed date on prev. gas/testsuite/ChangeLog entry. ]
2002-09-18 21:33:07 +00:00
Chris Demetriou 65551fa46c [ gas/ChangeLog ]
2002-09-18  Chris Demetriou  <cgd@broadcom.com>

        * config/tc-mips.c (md_apply_fix3): Just return for BFD_RELOC_8.

[ gas/testsuite/ChangeLog ]
2002-09-18  Chris Demetriou  <cgd@broadcom.com>

        * gas/mips/baddata1.s: New file.
        * gas/mips/baddata1.l: New file.
        * gas/mips/mips.exp: Run new test.
2002-09-18 21:05:59 +00:00
Chris Demetriou 2dc83527fb [ gas/testsuite/ChangeLog ]
2002-09-18  Chris Demetriou  <cgd@broadcom.com>

        * gas/mips/branch-misc-1.d: New file.
        * gas/mips/branch-misc-1.s: New file.
        * gas/mips/branch-misc-2.s: New file.
        * gas/mips/branch-misc-2.d: New file.
        * gas/mips/mips.exp: Run new tests.

[ ld/testsuite/ChangeLog ]
2002-09-18  Chris Demetriou  <cgd@broadcom.com>

        * ld-mips-elf/branch-misc-1.d: New file.
        * ld-mips-elf/branch-misc-2.d: New file.
        * ld-mips-elf/mips-elf.exp: Run new tests.
2002-09-18 20:50:47 +00:00
Thiemo Seufer 4cf0dd0d7c * config/tc-mips.c (s_change_section): Fix parsing. Code cleanup. 2002-09-18 08:02:22 +00:00
Stan Cox ed6fb7bdf5 * tc-mips.c (load_address): Use BFD_RELOC_MIPS_GOT_DISP for newabi.
(macro): Likewise for la.  Likewise for ld.
	(mips_after_parse_args): Make -xgot optional, not the default.
	(md_apply_fix3): Allow composite relocation to set up gp.
	(tc_gen_reloc): Allow relaxing for newabi.
	Relax R_MIPS_CALL16 to R_MIPS_GOT_PAGE/R_MIPS_GOT_OFST if local.
	Relax R_MIPS_GOT16/R_MIPS_LO16 to R_MIPS_GOT_DISP if local.
2002-09-18 02:25:19 +00:00
Nick Clifton 6189168b13 Note that an implemented BFD_RELOC_ARM_IMMEDIATE has been done.
Do not issue reloc number of unimplemented BFD_RELOC_ARM_IMMEDIATE and
BFD_RELOC_ARM_OFFSET_IMM relocs - their name is already in the error message
- plus remove them from the default case.
Warn about unpredictable behavior of LDM and STM instructions.
2002-09-17 19:23:00 +00:00
Thiemo Seufer f697dfed60 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* gas/mips/jal-range.s: Check for jal overflows.
	* gas/mips/jal-range.l: List file for it.
	* gas/mips/mips.exp: Use it.
2002-09-17 08:38:27 +00:00
Alan Modra 75d12d11a0 * config/tc-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
Convert functions to K&R format.
2002-09-17 08:35:10 +00:00
Thiemo Seufer 7ed4a06a3d * config/tc-mips.c (pdr_seg): Define only for ELF.
(s_change_section): Remove unused variable. Don't use for nonELF.
2002-09-17 07:43:25 +00:00
Thiemo Seufer e8cf2216ef * config/obj-elf.c (obj_elf_change_section): Move prototype to
obj-elf.h
	* config/obj-elf.h (obj_elf_change_section): Likewise.
2002-09-17 07:38:14 +00:00
Richard Henderson 48b9193866 * dwarf2dbg.c (out_debug_abbrev): Add support for the DW_AT_name field.
(out_debug_info): Likewise.
2002-09-17 02:55:57 +00:00
David O'Brien 4ada7262d0 2002-09-16 Bruno Haible <bruno@clisp.org>
* elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
	by a target variant implementation.
	* elf64-alpha.c: Likewise.
	* elf32-i386-fbsd.c: New file.
	* elf64-alpha-fbsd.c: New file.
	* targets.c: Support bfd_elf32_i386_freebsd_vec and
	bfd_elf64_alpha_freebsd_vec.
	* configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
	bfd_elf64_alpha_freebsd_vec.
	* Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
	(BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
	(BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
	(BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
	(elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
	* config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
	specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.

	* config/tc-i386.h (ELF_TARGET_FORMAT): New macro.
	(TARGET_FORMAT): Use ELF_TARGET_FORMAT instead of "elf32-i386".
	* config/tc-i386.c (i386_target_format): Likewise.
	* config/tc-alpha.h (ELF_TARGET_FORMAT): New macro.
	(TARGET_FORMAT): Use ELF_TARGET_FORMAT instead of "elf64-alpha".

	* emulparams/elf_i386_fbsd.sh: Set OUTPUT_FORMAT to
	elf32-i386-freebsd.
	* emulparams/elf64alpha_fbsd.sh: Set OUTPUT_FORMAT to
	elf64-alpha-freebsd.

Approved by:  Alan Modra <amodra@bigpond.net.au>
              Message-ID: <20020715021113.GJ30362@bubble.sa.bigpond.net.au>
2002-09-17 02:24:40 +00:00
Nick Clifton 7fe9cf6bf6 Do not count FAKE operands when deciding if any operands have been skipped. 2002-09-13 09:16:02 +00:00
Nick Clifton 004d9cafa4 New TI port supports both C4x and C3x series of DSPs. 2002-09-11 14:42:45 +00:00
Nick Clifton e09f439535 Update translations 2002-09-11 13:52:17 +00:00
Jakub Jelinek 9dfe7b396f * config/tc-i386.c (md_apply_fix3): Allow addend for
BFD_RELOC_386_TLS_LDO_32, BFD_RELOC_386_TLS_LE and
	BFD_RELOC_386_TLS_LE_32.
2002-09-11 09:51:58 +00:00
Jeff Law 502b19cb2a * config/tc-hppa.c (md_apply_fix3): Don't set fx_done for
marker relocations such as ENTRY/EXIT.
        * config/tc-hppa.h (MD_APPLY_SYM_VALUE): Definition applies
        to both OBJ_ELF and OBJ_SOM.
2002-09-09 21:31:40 +00:00
Ben Elliston fc697c14bd 2002-09-08 Ben Elliston <bje@redhat.com>
* gas/hppa/basic/basic.exp: Update DejaGnu mail address.
	* gas/hppa/parse/parse.exp: Likewise.
	* gas/hppa/reloc/reloc.exp: Likewise.
	* gas/hppa/unsorted/unsorted.exp: Likewise.
	* gas/mn10200/basic.exp: Likewise.
	* gas/mn10300/basic.exp: Likewise.
	* gas/sh/basic.exp: Likewise.
	* gas/sh/sh64/sh64.exp: Likewise.
	* gas/v850/basic.exp: Likewise.
	* lib/gas-defs.exp: Likewise.

	* gas/all/gas.exp: Removing limping support for DejaGnu 1.1.1.
	* gasp/gasp.exp: Likewise.
2002-09-09 01:54:45 +00:00
Alan Modra e4512afa79 correct entry 2002-09-06 14:26:05 +00:00
Alan Modra 63ba7a1cc2 * gas/i386/absrel.s: New.
* gas/i386/absrel.d: New.
	* gas/i386/pcrel.s: New.
	* gas/i386/pcrel.d: New.
	* gas/i386/i386.exp: Run them.
	* gas/testsuite/gas/mmix/comment-1.d: Don't test the symbol
	index, the name will do.
	* gas/mri/moveml.d: Escape dots.
	* gas/macros/macros.exp (strings): Add rs6000-*-* to xfails.
	* gas/mips/beq.s: Don't make text_label global.
	* gas/mips/mips32.s: Likewise.
	* gas/mips/mips64-mips3d.s: Likewise.
2002-09-05 00:05:44 +00:00
Alan Modra a161fe5320 gas reloc rewrite. 2002-09-05 00:01:18 +00:00
Alan Modra b782de161e * config/tc-ppc.c (ppc_frob_symbol): Formatting, warning fix.
(ppc_fix_adjustable <coff version>): Cleanup.
2002-09-04 13:43:43 +00:00
Alan Modra 2a98c3a655 * config/tc-ppc.c (PPC_HIGHER, PPC_HIGHEST): Fix warning.
(md_parse_option): No -a64 without BFD64.
	(ppc_set_cpu): Select appropriate cpu when ppc_obj64.
	(ppc_arch): Use bfd_mach_rs6k for bfd_arch_rs6000.
2002-09-04 13:21:18 +00:00
Nick Clifton 341026c1c1 Do not insert non-BookE32 instructions into the hash table if the target cpu
is the BookE32. (case 107575)
2002-09-04 12:37:30 +00:00
Hans-Peter Nilsson a6bd2a4f18 * read.c (do_align): Use ATTRIBUTE_UNUSED_LABEL for label, not
ATTRIBUTE_UNUSED.
2002-08-31 18:51:07 +00:00
Nick Clifton 86aba9dbfa Add linker relaxation to v850 toolchain 2002-08-29 06:49:35 +00:00
Nick Clifton 026df7c5e6 Add TMS320C4x support 2002-08-28 10:38:51 +00:00
Alan Modra df44284ec4 * write.c (BFD_FAST_SECTION_FILL): Remove unused macro.
(TC_ADJUST_RELOC_COUNT): Tweak param name.
	(TC_FORCE_RELOCATION, TC_FORCE_RELOCATION_SECTION): Likewise.
	(TC_FIX_ADJUSTABLE, MD_PCREL_FROM_SECTION): Likewise.
	(RELOC_ENUM): Define.
	(fix_new_internal): Use RELOC_ENUM.
	(fix_new, fix_new_exp): Likewise.
	(adjust_reloc_syms): Comment.  Remove unnecessary tests on sym != NULL.
	Replace gotos with continue.
	(write_relocs): Formatting.  Avoid symbol loops in
	RELOC_EXPANSION_POSSIBLE case too.  Report bfd_reloc_outofrange
	errors, and error number in other cases.
	(fixup_segment): Remove param names from prototype.  Rename
	"this_segment_type" to "this_segment".  Update linkrelax comment.
	Remove "size, "place" and "where" local vars.  Formatting.  Update
	"no symbol" comment.  Remove #if 0 and #if 1.
2002-08-28 03:35:59 +00:00
Alan Modra deda5edf4b * gas/mcore/allinsn.d: Escape dots. Pass -z to objdump and adjust
to suit.  Match coff relocs.  Match "from address pool" comments.
	* gas/sparc/pcrel.s: Use 2b label in expressions.
	* gas/sparc/pcrel64.s: Likewise.
	* gas/sparc/pcrel.d: Adjust to suit.
	* gas/sparc/pcrel64.d: Likewise.
	* gas/vtable/vtable.exp: Move xfails to ..
	(proc vtable_setup_xfails): .. here. Add i866.
2002-08-27 23:51:47 +00:00
Alan Modra bcd9320746 * gas/macros/macros.exp (strings): Update xfails. 2002-08-27 23:35:19 +00:00
Alan Modra 4252e537fa * app.c (do_scrub_chars): Don't test IGNORE_NONSTANDARD_ESCAPES. Tidy. 2002-08-27 23:34:18 +00:00
Alan Modra 7065849339 * dwarf2dbg.c: Always include dwarf2dbg.h.
(dwarf2_directive_file): Adjust dummy version args.
	* ecoff.c (ecoff_directive_weakext): Add ATTRIBUTE_UNUSED.
	* expr.c (clean_up_expression <O_subtract>): Allow subtraction
	when symbol values differ.
	* read.c (do_align): Add ATTRIBUTE_UNUSED to label.
	(pseudo_set <O_subtract>): Remove unnecessary segment test.
	* config/obj-bout.c (obj_pseudo_table): Warning fix.
2002-08-27 11:09:43 +00:00
Alan Modra 4fa0e86f6a * gas/m68k/all.exp: xfail non-ELF targets on pcrel test. 2002-08-26 11:42:12 +00:00
Alan Modra 98b37a6b3d * gas/m68hc11/insns.d: Quote dots.
* gas/m68hc11/opers12.d: Likewise.
2002-08-26 11:35:32 +00:00
Alan Modra 8ace442d5a * gas/ieee-fp/x930509a.exp: Run the test but xfail. Add c80 to xfails. 2002-08-26 11:27:02 +00:00
Alan Modra 6c2beb0715 * gas/vax/quad.exp: Use quad_elf.s for ELF targets.
* gas/vax/quad.s: Align
	* gas/vax/quad_elf.s: New version of quad.s with %reg.
2002-08-26 11:06:32 +00:00
Alan Modra 96e97d9be1 * gas/sparc/sparc.exp (sparc_elf_setup): New.
Use it to xfail for non-ELF targets.
2002-08-26 10:44:12 +00:00
Alan Modra 6c091933f4 * gas/tic54x/align.s: Add comment.
* gas/tic54x/align.d: Adjust .text size for 2002-05-23 write.c change.
	* gas/tic54x/extaddr.d: Similarly adjust disassembly tail.
2002-08-26 10:37:58 +00:00
Alan Modra a2199cc1ea * config/tc-w65.c (md_section_align): Fix typo.
(md_parse_option): Return 0, not 1.
2002-08-26 08:55:33 +00:00
Nick Clifton ececec60e1 Note that if '@' is a comment character then another symbol is used to prefix
the section's type.
2002-08-22 20:10:53 +00:00
Nick Clifton 1489984027 opcodes: Fix definition of "in rd,imm16" opcode.
gas: Adjust ptr variable also in "case 0" case.
2002-08-22 19:22:35 +00:00
Nick Clifton ed71e1110d Add sh-nto support 2002-08-22 17:27:20 +00:00
Jeff Law dfe0d3fe28 * config/tc-h8300.h (TC_LINKRELAX_FIXUP): Define. 2002-08-22 16:24:24 +00:00
Nick Clifton f598fd5e7a Fix arm-aout failures 2002-08-22 16:10:05 +00:00
Alan Modra 7bbfa6f5d3 * gas/ppc/ppc.exp: Don't run e500 test on xcoff targets.
* gas/ppc/astest2.d: Escape dots.
2002-08-22 05:23:43 +00:00
Elena Zannoni dc1d03fc42 2002-08-21 Elena Zannoni <ezannoni@redhat.com>
* config/tc-ppc.c (ppc_cleanup): Do something only if format
        is ELF.
        (ppc_apuinfo_section_add): Define only if format is ELF.
        (md_assemble): Emit APUinfo section only if format is ELF.
        Fix formatting.
2002-08-21 23:37:34 +00:00
Alan Modra 9f1838ed64 * config/tc-arc.c (md_pseudo_table <dwarf2_directive_file>): Cast.
* config/tc-frv.c: Likewise.
	* config/tc-hppa.c: Likewise.
	* config/tc-ia64.c: Likewise.
	* config/tc-ip2k.c: Likewise.
	* config/tc-m68hc11.c: Likewise.
	* config/tc-m68k.c: Likewise.
	* config/tc-mmix.c: Likewise.
	* config/tc-mn10300.c: Likewise.
	* config/tc-sh.c: Likewise.
	* config/tc-sparc.c: Likewise.
	* config/tc-v850.c: Likewise.
2002-08-20 23:49:27 +00:00
Richard Sandiford 483fc7cd61 [gas/]
* config/tc-mips.c (macro2): Implement rotates by zero using shifts
        by zero.

[gas/testsuite]
	* gas/mips/rol.s: Add rotate by zero tests.
	* gas/mips/rol.d: Update accordingly.
	* gas/mips/rol64.d: Expect rotates by zero to use dsrl.
2002-08-20 08:28:35 +00:00
Elena Zannoni 6a0c61b777 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
From matthew green  <mrg@redhat.com>

        * config/tc-ppc.c (PPC_OPCODE_CLASSIC): Enable this everywhere
        PPC_OPCODE_PPC is, except for BookE architectures.
        (md_parse_option): Add support for -mspe.
        (md_show_usage): Add -mspe.
        (md_parse_option): Add support for -me500 and
        -me500x2 to generate code for Motorola e500 core complex.
        (md_show_usage): Add -me500 and -me500x2.

        (PPC_APUINFO_ISEL, PPC_APUINFO_PMR, PPC_APUINFO_RFMCI,
        PPC_APUINFO_CACHELCK, PPC_APUINFO_SPE, PPC_APUINFO_EFS,
        PPC_APUINFO_BRLOCK): New macros.

        (ppc_cleanup): New function.
        (ppc_apuinfo_section_add): New function.
        (APUID): New macro.
        (md_assemble): Collect info and write the APUinfo section.

        * config/tc-ppc.h (md_cleanup): Define.
        (ppc_cleanup): Export.
        (ELF_TC_SPECIAL_SECTIONS): Add .PPC.EMB.apuinfo section.
2002-08-19 21:08:55 +00:00
Elena Zannoni 5578ad9c7c 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
From  matthew green  <mrg@redhat.com>

        * e500.s: New tests for e500 instructions.
        * e500.d: Results for new test.
        * ppc.exp: Test e500.s.
2002-08-19 21:01:02 +00:00
Stan Cox cca86cc8d6 * config/obj-elf.c (obj_elf_change_section): Make non-static.
config/tc-mips.c (s_change_section): New function to support
	IRIX .section pseudo-op.
2002-08-17 15:09:29 +00:00
Stephen Clarke 2af287461f Correct date on previous ChangeLog entry. 2002-08-16 18:19:00 +00:00
Stephen Clarke 1b44b93cbf * gas/sh/sh64/datal32-3.d: Formatting change to match the current
output of objdump.
2002-08-16 18:15:20 +00:00
Nick Clifton 50b15da2e5 Fix assembly of "callt 0x3f" 2002-08-16 07:01:47 +00:00
Alexandre Oliva f21f824289 * config/tc-mips.c (macro_build_jalr): Make sure we generate
the fix-up against on the right frag.
(s_cpsetup): Likewise.  Parse third argument as expression, to
handle global symbols and forward/backward labels correctly.
2002-08-16 00:58:11 +00:00
Alan Modra 8bda494670 * gas/all/gas.exp (forward references): Don't test c30.
* gas/d30v/guard-debug.d: Use -gstabs rather than -g.
	* gas/elf/ehopt0.s: Don't use "$" in labels.
	* gas/ieee-fp/x930509a.exp: Don't test c30.
	* gas/m68hc11/malis.d: Adjust -I so that test runs when not building
	in source dir.
	* gas/mri/mri.exp: Don't run on "m68hc*".
	* gas/sh/basic.exp (do_fp): Match LE too.
	(pcrel-coff): Run this version for "sh*-pe*" and rename "sh*-hms" to
	"sh*-rtems".
	* gas/sh/pcrel-coff.d: Add -EB to objdump flags.
	* gas/vtable/vtable.exp: Don't run on linuxecoff.  setup_xfail in
	preference to not running on ELF targets that might one day pass.
	Add more xfails.  Add more targets to the REL list.
2002-08-16 00:06:06 +00:00
Nick Clifton 8ac9ba6cf2 Catch attempts to create strings in the abs section. 2002-08-14 16:38:14 +00:00
Nick Clifton a7fda4576d Only define TC_VALIDATE_FIX for ELF builds 2002-08-14 16:33:58 +00:00
Nick Clifton 11f45fb5ff Fix compiling for COFF targets.
Some minor formatting tidyups.
2002-08-14 13:27:06 +00:00
H.J. Lu b57efb7d96 2002-08-14 H.J. Lu <hjl@gnu.org>
* gas/mips/elempic.d: Treat "addiu" and "daddiu" as equivalent
	when $0 is source.
	* gas/mips/telempic.d: Likewise.
	* gas/mips/telempic.d: Likewise.
2002-08-14 07:24:56 +00:00
Stephane Carrez cd2b29395d * gas/m68hc11/all.exp: Run the new test.
* gas/m68hc11/insns12.s: New file to test specific 68HC12 insns.
	* gas/m68hc11/insns12.d: New file.
	* gas/m68hc11/branchs12.s: New test.
	* gas/m68hc11/branchs12.d: New test.

	* gas/m68hc11/all_insns.d: Dump the relocs to verify that they
	are against symbols and not sections (for linker relaxation).
	* gas/m68hc11/insns-dwarf2.d: Likewise.
	* gas/m68hc11/insns.d: Likewise.
	* gas/m68hc11/lbranch.d: Likewise.
	* gas/m68hc11/lbranch-dwarf2.d: Likewise.
	* gas/m68hc11/opers12.d: Likewise.
	* gas/m68hc11/opers12-dwarf2.d: Likewise.
2002-08-13 22:45:22 +00:00
Stephane Carrez e371935fea * config/tc-m68hc11.h (MD_PCREL_FROM_SECTION): Remove.
(TC_HANDLES_FX_DONE): Define to let md_apply_fix3 set fx_done flag
	according to the reloc.
	(tc_fix_adjustable, tc_m68hc11_fix_adjustable): Define.
	(TC_FORCE_RELOCATION): Define.
	(tc_m68hc11_force_relocation): Declare.

	* config/tc-m68hc11.c (md_pseudo_table): Add relax command.
	(s_m68hc11_relax): New function for relax group.
	(build_insn, build_jump_insn): Emit a M68HC11_RL_JUMP reloc at
	beginning of jump instruction.
	(md_pcrel_from): Rename from md_pcrel_from_section and fix
	address computation.
	(tc-gen_reloc): Update.
	(md_estimate_size_before_relax): Create the BFD_RELOC_16_PCREL as
	PC-relative fixup.
	(tc_m68hc11_force_relocation): New function, handle new relocs.
	(tc_m68hc11_fix_adjustable): New to make sure there are enough
	reloc for the linker relax pass.
	(md_apply_fix3): Handle M68HC11_RL_JUMP, M68HC11_RL_GROUP
	and VTABLE relocs.
2002-08-13 22:20:50 +00:00
Stephane Carrez eb086b5940 * config/tc-m68hc11.c (m68hc11_elf_final_processing): New function.
(md_pseudo_table): Add .mode, .far and .interrupt pseudo op.
	(s_m68hc11_mode): New function for .mode pseudo op.
	(s_m68hc11_mark_symbol): New function for .far and .interrupt
	pseudo op.
	* config/tc-m68hc11.h (elf_tc_final_processing): Define.
	(m68hc11_elf_final_processing): Declare.
2002-08-13 21:52:57 +00:00
Stephane Carrez 7bfda7ebd0 * config/tc-m68hc11.c (md_begin): Take into account additional
page operand for call instruction.
	(print_opcode_format): Likewise.
	(check_range): Likewise for page range checking.
	(get_operand): Don't skip a possible comma in operands.
	(fixup8): Generate BFD_RELOC_M68HC11_PAGE reloc.
	(fixup16): Likwise with BFD_RELOC_M68HC11_LO16.
	(fixup24): New to handle call reloc.
	(build_insn): Handle missing page operand for call instruction.
	(find): Likewise.
	(md_apply_fix3): Take into account new relocs.
	(get_operand): Fix the mode for indexed indirect addressing.
	(build_indexed_byte): Fix post index byte for indexed indirect mode.
2002-08-13 21:38:15 +00:00
Richard Sandiford fdb987ee01 [gas/]
* config/tc-mips.c (mips_ip): Don't work out the value of
	constant %hi()s here.

[gas/testsuite/]
	* gas/mips/elf-consthilo.[sd]: New test.
	* gas/mips/mips.exp: Run it.
2002-08-12 08:33:42 +00:00
Alan Modra 31312f958e * config/tc-i386.c (tc_i386_fix_adjustable): Test OUTPUT_FLAVOR
for ELF, and don't bother checking ELF relocs when non-ELF.
	(i386_immediate): Allow absolute_section expressions for aout.
	(i386_displacement): Likewise.  Also test bfd_is_com_section.
	(md_estimate_size_before_relax): Test OUTPUT_FLAVOR for ELF.
	(md_apply_fix3): Hack for bfd_install_relocation when fx_pcrel,
	not when fx_addsy.  Remove dead code.
2002-08-10 14:49:48 +00:00
Nick Clifton 59bc061d4b Add QNX Neutrino PowerPC support and common up QNX functions 2002-08-09 15:38:24 +00:00
Alan Modra 6088b00e51 * config/tc-i386.h: Reorganize. 2002-08-09 12:37:41 +00:00
Maciej W. Rozycki 0c11417f42 * config/tc-mips.c (macro): Handle a register plus a 16-bit
immediate offset in "dla" and "la" expansions.
* gas/mips/empic.d: Treat "addiu" and "daddiu" as equivalent when
$0 is source.
* mips-opc.c (mips_builtin_opcodes): Remove "dla" and "la" as
aliases to "daddiu" and "addiu".
2002-08-09 11:07:24 +00:00
Alan Modra 7950068398 * configure.in: bfd_gas=yes for all i386 targets. Formatting.
Remove "bfd_gas=yes" from target table when covered later.
	Consolidate some entries.
	* configure: Regenerate
2002-08-09 03:42:15 +00:00
Jakub Jelinek 2bbd9c2554 * config/tc-i386.c (output_insn): Save frag_now and frag_now_fix ()
at start of insn, pass it to output_disp and output_imm.
	(output_disp): Added arguments.  If _GLOBAL_OFFSET_TABLE_ is seen
	in displacement for R_386_32 reloc, use R_386_GOTPC and compute
	properly addend.
	(output_imm): Added arguments.  Compute properly addend for
	R_386_GOTPC.
	(md_apply_fix3): Remove R_386_GOTPC handling.
	* testsuite/gas/i386/gotpc.s: New.
	* testsuite/gas/i386/gotpc.d: New.
	* testsuite/gas/i386/i386.exp: Add gotpc test.
2002-08-09 00:10:19 +00:00
Richard Henderson dbac4f5ba8 * config/tc-alpha.c (cpu_types): Enabled ev67, ev68, -m21264a
and m21264b processor names and cpu types.
        * doc/c-alpha.texi: Documented new types.
2002-08-06 22:06:08 +00:00
Alan Modra 86fff92e97 * gas/ppc/altivec_xcoff64.d: Adjust for aix5 target.
* gas/ppc/booke_xcoff64.d: Likewise.  Also fix relocs.
2002-08-06 11:28:01 +00:00
Alan Modra 95210096dc * config/tc-ppc.c (md_apply_fix3): Adjust 16 bit XCOFF reloc offset. 2002-08-06 02:30:06 +00:00
H.J. Lu fd512f5c73 2002-08-01 H.J. Lu <hjl@gnu.org>
* gas/mips/elf-rel6.s: Add ".p2align 4".
	* gas/mips/elf-rel6.d: Check nop.
2002-08-02 02:33:48 +00:00
Richard Sandiford 9860559818 [gas/]
* config/tc-mips.c (tc_gen_reloc): Extend GP-relative addend
	handling to BFD_RELOC_MIPS16_GPREL.

[gas/testsuite/]
	* gas/mips/elf-rel6.[sd]: New test.
	* gas/mips/mips.exp: Run it.
2002-08-01 20:14:49 +00:00
Nick Clifton 08df23795b Ensure that offset to literal pool is computed using signed arithmetic so that
proper sign extension is performed if X_add_number is a 64-bit integer.
2002-08-01 16:31:16 +00:00
Daniel Jacobowitz 70ee46581b 2002-08-01 H.J. Lu <hjl@gnu.org>
Daniel Jacobowitz  <drow@mvista.com>

        * dwarf2dbg.c (dwarf2_finish): Don't emit unreferenced
        .debug_line section unless it has line information.
2002-08-01 15:04:41 +00:00
Nick Clifton 4eb6b71c65 Fix bugs and remove compile time warnings for N"32K port. 2002-07-31 16:23:29 +00:00
Nick Clifton 500800ca01 Retroactively add entry for Lars Brinkhoff's contribution of the PDP-11 and
2.11BSD a.out support.
2002-07-31 09:59:03 +00:00
Nick Clifton 03223580a7 Fix range check for immediate operand. 2002-07-31 09:17:52 +00:00
Chris Demetriou c7a2332413 2002-07-30 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (mips_cpu_info_table): Clean up entries related
        to Broadcom SB-1 core support.
2002-07-31 05:48:31 +00:00
Thiemo Seufer cfe86eaadc * config/tc-mips.c (mips_target_format): Fix formatting.
Add recognition of n32 ABI formats.
2002-07-30 23:56:28 +00:00
Maciej W. Rozycki 460597bab5 * tc-mips.c (load_address): Don't clobber $at when loading a
64-bit address in non-PIC code if noat is in effect.
(macro): Likewise.
2002-07-30 19:27:31 +00:00
Maciej W. Rozycki 9bd7d93600 * config/tc-mips.c (macro): Use codes 6 and 7 in trap instructions
used in division/multiply macro expansions similarly to how they
are used in the variants with break instructions.
(macro2): Likewise.
2002-07-30 19:24:54 +00:00
Nick Clifton 7e392df659 Add arm-*-nto port. 2002-07-30 17:32:30 +00:00
Nick Clifton 3d0c950043 Add per-section and per-sub-section literal pools. 2002-07-30 10:56:04 +00:00
Chris Demetriou 70a3140046 [ gas/testsuite/ChangeLog ]
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.
2002-07-29 21:07:12 +00:00
Alan Modra d5cc04b152 * gas/ppc/altivec.d: Invoke "as" with "-a32". 2002-07-26 04:19:12 +00:00
Alan Modra dfff24c9bd * config/tc-ppc.c (ppc_set_cpu): Use PPC_OPCODE_64 as the default
rather than PPC_OPCODE_32 for powerpc64*.
2002-07-26 04:18:42 +00:00
Richard Sandiford 22923709a7 Fix comment from last commit. 2002-07-25 11:07:47 +00:00
Nick Clifton 219576a4db New translations 2002-07-25 10:31:28 +00:00
Richard Sandiford 316f5878b9 [gas/]
* 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.
2002-07-25 09:48:07 +00:00
Nick Clifton ff3063f557 Update Spanish and Swedish translations 2002-07-24 09:34:08 +00:00
Alan Modra 55eab186a3 * Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
	* doc/Makefile.in: Regenerate.
	* config.in: Regenerate.
	* po/POTFILES.in: Regenerate.
2002-07-23 12:46:43 +00:00
Nick Clifton 0461a601af update translations. 2002-07-23 09:58:05 +00:00
Nick Clifton ee8929cff2 Ken Raeburn is no longer the maintainer for GAS. 2002-07-23 07:25:37 +00:00
Denis Chertykov ec88d317ad * doc/c-ip2k.texi: The company name Scenix changed to Ubicom.
* doc/as.texi: Likewise.
2002-07-22 19:04:28 +00:00
Thiemo Seufer bad9ca53db * config/tc-mips.c (mips_need_elf_addend_fixup): Use S_IS_EXTERNAL
instead of S_IS_EXTERN.
	(md_estimate_size_before_relax): Likewise.
	(mips_fix_adjustable): Likewise.
2002-07-19 21:30:26 +00:00
Thiemo Seufer a37de3d3ff * config/tc-mips.c (mips_pic_level): Remove IRIX4_PIC. 2002-07-19 21:28:49 +00:00
Nick Clifton 8dfa01881f Make .ifdef treat a referenced but not yet defined symbol as if it were
undefined, in exactly the same way as .equiv.
2002-07-19 11:35:06 +00:00
Nick Clifton a40cbfa3c9 Add IP2k GAS and OPCODES support. 2002-07-19 07:52:40 +00:00
Hans-Peter Nilsson 9084e1dea4 * gas/mmix/list-pseudoints.l: Adjust for changes in gas section
padding.
	* gas/mmix/greg7.d: Ditto.
	* gas/mmix/greg8.d: Ditto.
	* gas/mmix/fb-2.d: Ditto.
	* gas/mmix/comment-1.d: Ditto.
	* gas/mmix/byte-1.d: Ditto.
2002-07-19 01:51:17 +00:00
H.J. Lu 9b702f9437 2002-07-17 H.J. Lu <hjl@gnu.org>
* gas/ia64/dv-branch.d: Updated.
	* gas/ia64/opc-b.d: Likewise.
2002-07-17 07:26:30 +00:00
Jan Hubicka 33fef721a1 * tc-i386.c (i386_align_code): Implement x86_64 neutral code fillers. 2002-07-16 22:31:19 +00:00