Commit Graph

2169 Commits

Author SHA1 Message Date
Nick Clifton 88da68203d Add Xtensa port (omitted from previous delta) 2003-04-01 15:53:47 +00:00
Nick Clifton e0001a05d2 Add Xtensa port 2003-04-01 15:50:31 +00:00
Nick Clifton 5a6c681789 Fixes for iWMMXt contribution. 2003-04-01 13:08:06 +00:00
Eric Christopher 97bbfa382c 2003-03-26 Eric Christopher <echristo@redhat.com>
* config/tc-mips.c (nopic_need_relax): Check for
        S_IS_EXTERN.
2003-03-26 23:32:06 +00:00
Nick Clifton e16bb312f5 Add iWMMXt support 2003-03-25 20:56:01 +00:00
Nick Clifton 9418ab9c20 Rename the all occurances of C54X to TIC54X. 2003-03-24 15:43:15 +00:00
Andreas Schwab e39edc66a9 * config/tc-ia64.c (generate_unwind_image): Fix type of unw_rec to
avoid aliasing issue.
2003-03-21 14:02:09 +00:00
Martin Schwidefsky 37a5879375 * config/tc-s390.c (s390_arch_size): Initialize to zero.
(current_arch_mask): Rename to current_mode_mask.
	(current_arch_requested): Remove variable.
	(current_cpu): New variable.
	(init_default_arch): Set defaults values for s390_arch_size,
	current_mode_mask and current_cpu.
	(md_parse_option): New options -mesa, -mzarch and -march={g5,g6,z900}.
	(md_begin): Replace current_arch_mask by current_cpu.
	(md_assemble): Adapt check and error message to current_mode_mask and
	current_cpu.
2003-03-21 13:24:46 +00:00
Nick Clifton 0822d0753e (buffer_and_nest): Store more to sb instead of '\n'.
(get_line_sb): Return end of line character or '\n' if it is zero or
non-existent.
2003-03-13 11:49:33 +00:00
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