Commit Graph

1327 Commits

Author SHA1 Message Date
Nick Clifton 89b57c9acc fix compile time warning messages 2001-09-24 14:47:10 +00:00
Nick Clifton a80076a171 Fix compile time warnings 2001-09-22 09:23:31 +00:00
Alan Modra 7146a6f592 * config/tc-openrisc.c: Don't include <ctype.h>. 2001-09-21 12:34:40 +00:00
Nick Clifton 16a419ba01 Add option -mwarn-areg-zero. 2001-09-20 10:59:42 +00:00
Alan Modra 44addf7f7b * config/tc-i370.c: Fix typo in last change. 2001-09-19 08:13:04 +00:00
Nick Clifton 2d5aaba052 Improve documentation on local labels and add documenation about dollar labels. 2001-09-19 07:55:23 +00:00
H.J. Lu 3882b01078 Locale changes from Bruno Haible <haible@clisp.cons.org>. 2001-09-19 05:33:36 +00:00
Nick Clifton b6849f55b9 s390 assembler improvements and testsuite 2001-09-18 15:41:33 +00:00
Alan Modra 0e1a166b28 * dwarf2dbg.c (dwarf2_directive_file): Avoid signed/unsigned warning.
* write.c (set_symtab): Update bfd_alloc declaration.  Use a temp
	var to ensure bfd_alloc arg is the right type.
	(write_object_file): Cast args of bfd_seek.  Replace bfd_write with
	bfd_bwrite.

	* config/obj-coff.c: Replace calls to bfd_write with calls to
	bfd_bwrite.  Cast args of bfd_seek.

	* config/obj-elf.c (obj_elf_change_section): Avoid signed/unsigned
	warning.

	* config/tc-mn10300.c (set_arch_mach): Make param unsigned.

	* config/tc-tic54x.c (tic54x_mlib): Replace bfd_read call with
	call to bfd_bread.
2001-09-18 10:08:15 +00:00
Hans-Peter Nilsson e08ae97912 * config/tc-sh.h (sh_force_relocation): Prototype.
(struct fix): Forward declare.
	* config/tc-sh.c (type sh_operand_info): Move to top of file.
	(cons, s_align_bytes): Remove old-type declarations.
	(sh_elf_suffix, parse_reg, dot, parse_exp, parse_at, get_operand,
	get_operands, get_specific, insert, build_relax,
	insert_loop_bounds, build_Mytes): Prototype.
	(little): Make static.  Prototype.
	(check, tc_Nout_fix_to_chars): Delete unused functions.
2001-09-15 14:49:54 +00:00
Eric Christopher 920acd6218 2001-09-14 Eric Christopher <echristo@redhat.com>
* config/tc-mips.c (md_parse_option): Remove setting mips_64 via
	-mgp32/mgp64.
2001-09-14 20:18:54 +00:00
Nick Clifton 056a1d49d7 Add support for arm-openbsd target 2001-09-14 11:46:40 +00:00
Thiemo Seufer 4008bd9b57 /bfd/ChangeLog
* config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
	Add support for mips64.

	/ChangeLog
	* config.sub: Change machine triplets from mipsel*-* to mips*el-*.
	Add support for mips64.

	/gas/ChangeLog
	* configure.in: Change machine triplets from mips-*-linux-gnu* to
	mips*-*-linux*.
2001-09-14 06:22:46 +00:00
Thiemo Seufer 233b8738b0 * config/tc-mips.c (append_insn): Don't rightshift BFD_RELOC_16_PCREL. 2001-09-12 21:19:37 +00:00
Richard Henderson d61a78a7af * config/tc-alpha.c (alpha_elf_section_letter): New.
(alpha_elf_section_flags): New.
        * config/tc-alpha.h (md_elf_section_letter): New.
        (md_elf_section_flags): New.
        * config/tc-ia64.c (ia64_elf_section_letter): New.
        * config/tc-ia64.h (md_elf_section_letter): New.
2001-09-11 18:26:04 +00:00
Jakub Jelinek 9469ddf0d0 * config/obj-elf.c (obj_elf_parse_section_letters): Use 'M' instead
of 'm', 'S' instead of 's'.  Update bad_msg.
	* config/tc-ppc.c (ppc_section_letter): Update bad_msg.
	* config/tc-i370.c (i370_sectioN_letter): Update bad_msg.
2001-09-11 16:46:38 +00:00
Alan Modra 79bcdb567f Oops, one "likewise" had an intervening entry. 2001-09-09 14:08:41 +00:00
Alan Modra e0890092b6 * expr.c (expr): Move code setting "retval" to the end of the loop,
and rearrange for efficiency.  For "PIC code" subtraction, use
	"rightseg" rather than recalculating.  For "symbol OP symbol"
	subtract, set "retval" to absolute_section if symbols in same
	section.
	* symbols.c (resolve_symbol_value): Resolve "sym +/- expr" to an
	O_symbol.  Simplify a +/- b code.  Allow equality and non-equality
	comparisons on symbols from any section.  Allow other comparison
	operators as for subtraction.
	(symbol_equated_reloc_p): New predicate function.
	* symbols.h (symbol_equated_reloc_p): Declare.
	* write.c (adjust_reloc_syms): Use symbol_equated_reloc_p.
	(write_relocs): Likewise.
	(write_object_file): Likewise.
	(relax_segment <rs_machine_dependent>): Ensure segment for
	expression syms is set correctly.
	* config/tc-mips.c (md_estimate_size_before_relax): Likewise.
	* config/tc-i386.c (md_assemble <Output jumps>): Don't lose part
	of a complex expression when setting up frag_var.
2001-09-09 14:01:17 +00:00
Eric Christopher a529d7582c mischeckin. fixed. 2001-09-08 04:16:12 +00:00
Eric Christopher 06e70a4852 2001-09-07 Eric Christopher <echristo@redhat.com>
* gas/mips/mips64.d: Change to use mipsisa64.
	* gas/mips/mips32.d: Change to use mipsisa32.
2001-09-08 02:34:56 +00:00
Richard Henderson ec8fcf4a1d * config/tc-alpha.c (alpha_reloc_op_tag): Replace need_seq with
require_seq and allow_seq.  Let !literal omit the sequence number.
        (tokenize_arguments): Reject sequence numbers of !allow_seq.
2001-09-08 01:12:00 +00:00
Jakub Jelinek 891937bff4 * config/tc-sparc.c (md_apply_fix3): Handle relocs against SEC_MERGE
section symbols the same way as externs.
2001-09-07 22:41:03 +00:00
Thiemo Seufer ad58c9210c Fix wrong ChangeLog entries 2001-09-07 06:09:45 +00:00
Thiemo Seufer 553178e47b Reallow unrestricted use of .set mipsX pseudo-op in gas.
Update testcases accordingly.
2001-09-07 05:54:12 +00:00
Thiemo Seufer cb56d3d327 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
of R_MIPS_PC16.

	* config/tc-mips.c (append_insn): Handle BFD_RELOC_16_PCREL.
	(macro_build): Use BFD_RELOC_16_PCREL_S2 only for embedded
	PIC, BFD_RELOC_16_PCREL for the rest.
	(mips_ip): Likewise.
        (md_pcrel_from): return the right offset for the differently shifted
        pcrel relocs.
	(md_apply_fix): Handle BFD_RELOC_16_PCREL.

	* gas/mips/beq.d: Check branches to external labels.
	* 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/elempic.d: Switch from R_MIPS_GNU_REL16_S2 to R_MIPS_PC16.
	* gas/mips/empic.d: Likewise.
	* gas/mips/empic.s: Likewise.
	* gas/mips/telempic.d: Likewise.
	* gas/mips/tempic.d: Likewise.
2001-09-07 05:00:37 +00:00
Thiemo Seufer 8050ee1ada * gas/mips/tmips16-f.d: New file, testcase for big endian MIPS16
relocations, tradtional variant.
2001-09-06 20:02:20 +00:00
Richard Henderson 3969b680c3 * config/tc-ia64.c (FUNC_IPLT_RELOC): New.
(pseudo_func): Add @iplt.
        (pseudo_opcode): Add data16 and data16.ua.
        (md_begin): Set iplt pseudo.
        (ia64_cons_fix_new): Handle 16 byte iplt reloc specially.
2001-09-05 20:20:37 +00:00
Richard Henderson 19f785835e * config/tc-alpha.c (struct alpha_insn): Make sequence scalar long.
(MACRO_LITERAL, MACRO_BASE, MACRO_BYTOFF, MACRO_JSR): Remove.
 	(alpha_macros): Remove occurrences of same.
 	(O_lituse_addr, O_gprel): New.
 	(DUMMY_RELOC_LITUSE_*): New.
 	(s_alpha_ucons, s_alpha_arch): Prototype.
 	(alpha_reloc_op): Construct elements via DEF macro.
 	(ALPHA_RELOC_SEQUENCE_OK): Remove.
 	(struct alpha_reloc_tag): Rename from alpha_literal_tag; rename
 	members to not be literal specific.
 	(next_sequence_num): New.
 	(md_apply_fix3): Cope with missing GPDISP_LO16.  Adjust for
 	added/removed BFD relocations.
 	(alpha_force_relocation, alpha_fix_adjustable): Likewise.
 	(alpha_adjust_symtab_relocs): Handle GPDISP relocs as well.
 	(tokenize_arguments): Parse ! relocations properly.
 	(find_macro_match): Delete unused macro argument types.
 	(assemble_insn): Add reloc parameter; emit that instead of the
 	default as appropriate.
 	(get_alpha_reloc_tag): New.  Split from ...
 	(emit_insn): ... here.  Allocate a reloc tag for GPDISP.
 	(assemble_tokens): Don't search macros if user relocation present.
 	Copy reloc sequence number to insn struct.
 	(emit_ldgp): Remove user reloc handling.
 	(load_expression, emit_lda, emit_ldah, emit_ir_load): Likewise.
 	(emit_loadstore, emit_ldXu, emit_ldil, emit_stX): Likewise.
 	(emit_sextX, emit_division, emit_jsrjmp, emit_retjcr): Likewise.
 	* config/tc-alpha.h (tc_adjust_symtab): Always define.
 	(struct alpha_fix_tag): Name members less literal specific.

 	* gas/alpha/alpha.exp: New file.
 	* gas/alpha/elf-reloc-1.[sd]: New test.
 	* gas/alpha/elf-reloc-2.[sl]: New test.
 	* gas/alpha/elf-reloc-3.[sl]: New test.
 	* gas/alpha/elf-reloc-4.[sd]: New test.
 	* gas/alpha/fp.exp: Remove file.
 	* gas/alpha/fp.s: Output to .data not .rdata.
 	* gas/alpha/fp.d: Adjust to match.
2001-09-05 02:39:43 +00:00
Jeff Law 4961b73108 Tue Sep 4 20:06:09 2001 Jeffrey A Law (law@cygnus.com)
* gas/all/gas.exp (930509a): Expect failure on the H8/300 ELF port.

        * gas/h8300/ffxx1-elf.d: Update due to recent changes to H8/300
        ELF toolchain.
        * gas/h8300/h8300-elf.exp: Likewise.

        * gas/macros/macros.exp: Expect failure on all H8/300 ports.

        * gas/vtable/vtable.exp: Do not run tests on H8/300 ELF ports.
2001-09-05 02:05:07 +00:00
Jeff Law de342d07b9 * tc-h8300.c (tc_gen_reloc): Give an error if we try to take the
address of two symbols in different sections.
2001-09-05 02:01:08 +00:00
Jeff Law 3c1ba8a308 * config/tc-h8300.c (build_bytes): For OBJ_ELF, make relocation's
offset match H8 ELF spec.
        (md_section_align): Alternate implementation for BFD_ASSEMBLER.
        (md_apply_fix): Fix argument and return types for BFD_ASSEMBLER.
2001-08-31 22:43:55 +00:00
Eric Christopher 3c02b2abd6 2001-08-31 Eric Christopher <echristo@redhat.com>
Jason Eckhardt  <jle@redhat.com>

	* config/tc-mips.c (mips_cpu_info): Add support for mipsisa32,
	5kc, and 20kc.  Clean up old entries.
2001-08-31 21:06:40 +00:00
Jeff Law 36ed2fff06 * tc-h8300.c (relocation mappings): Remove. Moved to tc-h8300.h.
(build_bytes): Mark fixups for PCrel branches as signed.  For
        OBJ_ELF, make sure the reloc's offset points to the first byte
        to be modified.
        (md_convert_frag): Update definiton based on BFD_ASSEMBLER.
        * tc-h8300.h (relocation mappings): Add.
2001-08-31 17:43:52 +00:00
Joern Rennecke f41e352811 * gas/h8300/h8300.exp (do_h8300_cbranch): Remove invocation.
(do_h8300_branch, do_h8300h_cbranch, do_h8300h_branch): Likewise.
	(do_h8300s_cbranch, do_h8300s_branch, ffxx1): Likwise.
	* gas/h8300/h8300-coff.exp, gas/h8300/h8300-elf.exp: New files.
	* gas/h8300/branch-elf.s, gas/h8300/branchh-elf.s: Likewise.
	* gas/h8300/branchs-elf.s, gas/h8300/ffxx1-elf.d: Likewise.
	* gas/h8300/ffxx1-elf.s: Likewise.
	* gas/h8300/branch.s, gas/h8300/branchh.s: Move to:
	* gas/h8300/branch-coff.s, gas/h8300/branchh-coff.s
	* gas/h8300/branchs.s, gas/h8300/ffxx1.d: Move to:
	* gas/h8300/branchs-coff.s, gas/h8300/ffxx1-coff.d .
	* gas/h8300/ffxx1.s: Move to:
	* gas/h8300/ffxx1-coff.s .
2001-08-30 21:08:43 +00:00
Jeff Law 5facebfccc Nuts. Checked in wrong version of previous patch. Fixed. 2001-08-30 20:38:35 +00:00
Jeff Law f333765ffd Thu Aug 30 12:05:13 2001 J"orn Rennecke <amylaar@redhat.com>
* tc-h8300.c (tc_crawl_symbol_chain, tc_headers_hook): Don't
        define for BFD_ASSEMBLER.
        (tc_reloc_mangle): Likewise.
        (tc_gen_reloc): New function for BFD_ASSEMBLER.
More of Joern's patches with minor changes s/OBJ_ELF/BFD_ASSEMBLER/
2001-08-30 20:15:06 +00:00
Jeff Law 7e0de7bf18 * tc-h8300.c: If OBJ_ELF, include elf/h8.h, and define
assorted coff relocations to the corresponding elf relocations.
        * tc-h8300.h (TARGET_ARCH, TARGET_FORMAT): Define appropriately.
More of Joern's patches.
2001-08-29 18:56:50 +00:00
Jeff Law 83e20b45a3 * config/tc-h8300.c (h8300hmode): Record the machine type
if BFD_ASSEMBLER is defined.
	(h8300smode, md_begin): Similarly.
2001-08-29 18:50:56 +00:00
Phil Blundell f6314f3e2f 2001-08-29 Joel Sherrill <joel@OARcorp.com>
* configure.in (i[3456]86-*-rtems*, m68*-*-rtems*): Change
	default from coff to elf.
	* configure: Regenerate.
2001-08-29 18:45:28 +00:00
Jeff Law 3ad62fc4e7 * lib/gas-defs.exp: (regexp_diff) At verbosity 3, also show
where mismatch occurs due to regexp mismatch.

Another patch from Joern.
2001-08-29 18:11:19 +00:00
Jeff Law ccad732da8 * configure.in: Add case for h8300-*-elf.
* configure: Regenerate.

Checking in parts of Joern's patch.
2001-08-29 17:44:39 +00:00
Joern Rennecke 82f3c9a358 Typo fix. 2001-08-29 12:24:30 +00:00
Joern Rennecke 1262d52065 * doc/internals.texi (MD_PCREL_FROM_SECTION): Change
docuemntation to reflect reality.
2001-08-29 12:22:27 +00:00
Thiemo Seufer 7283eb8605 * tc_mips.c (load_address): Reflect change to MAX_GPREL_OFFSET.
(macro): Reflect change to MAX_GPREL_OFFSET.
2001-08-27 18:48:27 +00:00
Alan Modra e88b7c9780 * gas/macros/macros.exp: xfail powerpc-*-aix.
* gas/ppc/astest64.s: New.
	* gas/ppc/astest64.d: New.
	* gas/ppc/astest2_64.s: New.
	* gas/ppc/astest2_64.d: New.
	* gas/ppc/test1elf.asm: New.
	* gas/ppc/test1xcoff.asm: New.
	* gas/ppc/generate.sh: New. Generate new files below from above .asm
	* gas/ppc/test1elf32.s: New.
	* gas/ppc/test1elf32.d: New.
	* gas/ppc/test1elf64.s: New.
	* gas/ppc/test1elf64.d: New.
	* gas/ppc/test1xcoff32.s: New.
	* gas/ppc/test1xcoff32.d: New.
	* gas/ppc/ppc.exp: Run new tests.
	* gas/ppc/simpshft.s: Tweak align now that we get nops.
2001-08-27 10:51:20 +00:00
Alan Modra 0baf16f23c * configure.in: Recognise powerpc*le*, not just powerpcle*.
* configure: Regenerate.
	* config/tc-ppc.c (PPC_LO, PPC_HI, PPC_HA, PPC_HIGHER,
	PPC_HIGHERA, PPC_HIGHEST, PPC_HIGHESTA, SEX16): New macros.
	(md_assemble): Use them.
	(ppc_machine): Support stub for ELF64 as well as XCOFF.
	(md_pseudo_table): Add "llong", "quad".
	(md_parse_option): Match default_cpu of powerpc*.
	(ppc_arch): Likewise.
	(ppc_subseg_align): Only for OBJ_XCOFF.
	(ppc_target_format): Return elf64-powerpc strings for 64 bit ELF.
	(md_begin): Select PPC_OPCODE_64 for 64 bit.
	(ppc_insert_operand): Don't bother testing 'file' before calling
	as_bad_where.  Use as_bad_where for operand->insert errors.
	(mapping): Add ELF64 relocation modifiers.
	(ppc_elf_suffix): Replace symbol on BFD_RELOC_PPC64_TOC reloc
	expressions with abs_symbol.
	(ppc_elf_cons): Correct offset for little endian targets.
	(ppc_elf_frob_symbol): New.
	(md_assemble): Add support for 64 bit ELF relocs.
	(ppc_tc): Ensure 8 byte alignment when 64 bit.
	(ppc_is_toc_sym): Only define for OBJ_XCOFF and OBJ_ELF.  Match
	".toc" section for 64 bit ELF.
	(ppc_fix_adjustable): New.  Macro body moved from tc-ppc.h.
	(md_apply_fix3): Silence warning with ATTRIBUTE_UNUSED.  Only do
	the ppc_is_toc_sym check for OBJ_XCOFF and OBJ_ELF.  For 64 bit,
	use BFD_RELOC_PPC64_TOC16_DS instead of BFD_RELOC_PPC_TOC16.
	Expand on comments, error message.  Add support for 64 bit relocs,
	and use PPC_HI etc. macros.
	* config/tc-ppc.h (MAX_MEM_FOR_RS_ALIGN_CODE): Define.
	(HANDLE_ALIGN): Define to generate nops in code sections rather
	than zeros.
	(TC_FORCE_RELOCATION): Force for BFD_RELOC_PPC64_TOC.
	(ELF_TC_SPECIAL_SECTIONS): Add 64 bit ELF sections.
	(tc_fix_adjustable): Move body of macro to tc-ppc.c.
	(ppc_fix_adjustable): Declare.
	(tc_frob_symbol): Define.
	(ppc_elf_frob_symbol): Declare.
2001-08-27 10:42:16 +00:00
Andreas Jaeger 9d654c1ca4 * config/tc-s390.c: Add missing prototypes
(md_gather_operands): Make static.
2001-08-26 11:44:51 +00:00
Thiemo Seufer e7d556dfef * tc_mips.h (MAX_GPREL_OFFSET): Change it to the maximum allowed
value, not the word beyond maximum.
	* tc_mips.c (macro_build_lui): Code cleanup.
	(macro): Reflect change to MAX_GPREL_OFFSET.
	(mips_ip): Check explicitly against S_EX_NONE.
	(my_get_SmallExpression): parse for %gp_rel, not %gprel.
	(md_apply_fix): Code cleanup.
2001-08-26 10:42:12 +00:00
Thiemo Seufer dda688fcad * binutils-all/readelf.exp: Don't regard mips*el-*-* as traditional
mips.
	* gas/mips/mips.exp: Likewise. Use traditional testcases for
	mips${el}16-f if needed.
	* gas/mips/elempic.d: New file, testcase for little endian empic.
	* gas/mips/elfel-rel2.d: Don't test trailing zeroes in dump.
	* gas/mips/mips16-f.d: Use non-traditional symbol sorting.
	* gas/mips/mipsel16-f.d: Likewise.
	* gas/mips/mipsel16-e.d: New file, testcase for little endian MIPS16
	relocations.
	* gas/mips/tmipsel16-f.d: New file, testcase for little endian MIPS16
	relocations, traditional variant.
2001-08-25 00:48:49 +00:00
Andreas Jaeger 34f63668bf * config/tc-ppc.h: Fix prototype declaration. 2001-08-24 19:18:45 +00:00