Commit Graph

2003 Commits

Author SHA1 Message Date
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