Commit Graph

395 Commits

Author SHA1 Message Date
Nick Clifton 114241553a fix bug detecting pc-rel overflow 2000-03-19 22:09:23 +00:00
Nick Clifton 43f0557653 Fix adr pseudo op for Thumb. 2000-03-17 22:12:08 +00:00
Nick Clifton ec9991dc51 minor formatting improvements 2000-03-17 20:00:36 +00:00
Nick Clifton 684b81fabf fix compile time warning messages 2000-03-17 19:44:41 +00:00
Nick Clifton 672314026c Handle same-section relocations where the destination is at an address >=
0x00400000.
2000-03-17 19:35:44 +00:00
Joern Rennecke a37c8f8843 * config/tc-sh.c (md_begin): When encountering insn that are
not supported by the current arch, only change the name if
	its contents are the same as prev_name.
	(get_specific): If the the architecture doesn't match, fail.
2000-03-16 23:50:18 +00:00
Joern Rennecke dead141948 * config/tc-sh.c (IDENT_CHAR): Define.
(parse_reg): Use it instead of isalnum.  Put r[0..7]_bank operand
	matching back where it came from.
2000-03-16 21:18:53 +00:00
Joern Rennecke 182e89d3f6 * config/tc-sh.c (md_show_usage): Add description of -dsp. 2000-03-16 20:59:08 +00:00
Nick Clifton 84f73d89c4 Match r[0..7]_bank operands before normal operands. 2000-03-16 01:18:13 +00:00
Jeff Law dbbc7809e3 * config/tc-h8300.c: Add ATTRIBUTE_UNUSED as appropriate. 2000-03-15 21:28:47 +00:00
Hans-Peter Nilsson 271bb601c4 * expr.c (operand) [case 'f']: When testing if '0f' can start a
floating-point-number, make sure 'f' is in FLT_CHARS.
2000-03-13 21:20:15 +00:00
Hans-Peter Nilsson 8684e216c8 * read.c (TC_IMPLICIT_LCOMM_ALIGNMENT): New default-definition.
(s_lcomm_internal): Use it.
	* doc/internals.texi (CPU backend): Document it.
	* config/obj-evax.h (TC_IMPLICIT_LCOMM_ALIGNMENT): Set to 2**3
	bytes.
2000-03-13 20:46:07 +00:00
Geoffrey Keating bb2d6cd7b1 In bfd/:
* elf32-mips.c (mips_elf_next_relocation): Rename from
	mips_elf_next_lo16_relocation, and generalize to look
	for any relocation type.
	(elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
	(elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
	(elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
	(elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
	(elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
	(elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
	(bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
	(mips_rtype_to_howto): Likewise.
	(mips_elf_calculate_relocation): Handle new relocs.
	(_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
	are paired.  The addend for R_MIPS_GNU_REL16_S2
	is shifted right two bits.
In gas/:
	* config/tc-mips.c (mips_ip): Don't put stuff in .rodata
	when embedded-pic.

	* config/tc-mips.c (SWITCH_TABLE): The ELF embedded-pic
 	implementation doesn't have special handling for switch
 	statements.
	(macro_build): Allow for code in sections other than .text.
	(macro): Likewise.
	(mips_ip): Likewise.
	(md_apply_fix): Do pc-relative relocation madness for MIPS ELF.
  	Don't perform relocs if we will be outputting them.
	(tc_gen_reloc): For ELF, just use fx_addnumber for pc-relative
 	relocations.  Allow BFD_RELOC_16_PCREL_S2 relocs when
 	embedded-pic.
In gas/testsuite/:
	* gas/mips/empic.d: New file.
	* gas/mips/empic.s: New file.
	* gas/mips/mips16-e.d: New file.
	* gas/mips/mips16-e.s: New file.
	* gas/mips/mips16-f.d: New file.
	* gas/mips/mips16-f.s: New file.
	* gas/mips/mips.exp: Add empic, mips16-e.  Add mips16-f as an
	expected failure.
In include/elf:
	* mips.h: Add R_MIPS_GNU_REL_HI16, R_MIPS_GNU_REL_LO16,
 	R_MIPS_GNU_REL16_S2, R_MIPS_PC64 and R_MIPS_PC32 relocation
 	numbers.
2000-03-11 02:16:25 +00:00
Catherine Moore 5c86cbc78f * config/tc-m32r.c (m32r_fix_adjustable): Look up the
relocation type based on the entry in the fixup structure.
2000-03-09 22:07:28 +00:00
H.J. Lu f8c827e940 2000-03-08 H.J. Lu (hjl@gnu.org)
* Makefile.am (install-exec-tooldir): Depend on
	install-exec-bindir for parallel make.
	* Makefile.in: Regenerated.
2000-03-09 03:14:44 +00:00
Nick Clifton ded0aeb791 Document new -m32r command line switch 2000-03-07 00:06:52 +00:00
Nick Clifton 8ad9e709b4 treat -m32r as a seperate, specific command line switch. 2000-03-06 23:37:57 +00:00
Michael Meissner b7b8f32709 fix sign extension problem with d30v 2000-03-02 22:18:12 +00:00
H.J. Lu 158868217c 2000-03-02 H.J. Lu (hjl@gnu.org)
* configure.in: Support --enable-targets=all on ia32.
	* configure: Regenerated.
2000-03-02 20:15:33 +00:00
Nick Clifton 8bf950bf50 Remove bigus .align check 2000-03-01 18:03:49 +00:00
Ian Lance Taylor c5e54cc20e 2000-02-27 Thomas de Lellis <tdel@windriver.com>
* config/obj-elf.c (elf_frob_symbol): Remove code which when
	TC_PPC was defined forced the type of a symbol with no other type
	to be BSF_OBJECT.
2000-02-28 04:17:36 +00:00
Ian Lance Taylor 65fd87bce3 2000-02-27 Hans-Peter Nilsson <hp@axis.com>
* doc/internals.texi (CPU backend): Mention that
	line_separator_chars do not break up comments.  Fix typos for
	LEX_AT and LEX_NAME descriptions.  Document operands for
	TC_EQUAL_IN_INSN, md_operand and md_section_align.  Correct
	description of md_create_short_jump usage.  Document argument for
	md_undefined_symbol.
2000-02-28 04:08:32 +00:00
Ian Lance Taylor a25fe90645 2000-02-27 Jakub Jelinek <jakub@redhat.com>
* config/tc-sparc.c (OPTION_UNDECLARED_REGS): New option.
	(md_parse_option): Handle it.
	(md_show_usage): Document it.
2000-02-28 03:51:32 +00:00
Ian Lance Taylor 21b105119f * config/tc-alpha.c (md_assemble): Accept `1' and `9' in an
opcode, for the instruction `pal19'.  From Andrea Arcangeli
	<andrea@suse.de>.
2000-02-28 03:25:35 +00:00
Ian Lance Taylor a74801baf8 rebuild with current tools 2000-02-27 16:55:52 +00:00
Alan Modra 773f551c1d Catch some more cases where we can represent a 16 bit immediate operand as
8 bit sign extended.
2000-02-26 04:00:13 +00:00
Jeff Law 28d33191ee * doc/c-mips.texi (MIPS Opts): Fix typo in last patch. 2000-02-26 01:48:35 +00:00
H.J. Lu 11038c5ef1 2000-02-25 H.J. Lu <hjl@gnu.org>
* gas/i386/general.l: Support a.out and coff.
2000-02-26 00:49:27 +00:00
Alan Modra 084e9a84fa Fix silly thinko in gas/i386/intel.s Mention i386.exp in ChangeLog 2000-02-25 11:55:50 +00:00
Alan Modra cc5ca5ce51 Extend the i386 gas testsuite to do some tests for intel_syntax. Fix all
the errors exposed by this addition.  These were intel mode
"fi... word ptr", "fi... dword ptr", "jmp Imm seg, Imm offset", "out dx,al".
The failure with intel "out dx,al" was also present in att "out al,dx".
Extend testsuite to catch this case too.
2000-02-25 11:41:12 +00:00
Nick Clifton 056350c6bd Add support for WinCE targeted toolchains. 2000-02-24 19:49:18 +00:00
Alan Modra 36bf8ab9fb Yet more .intel_syntax fixes. 2000-02-24 15:26:57 +00:00
Catherine Moore f5795b0849 * config/obj-som.c (obj_pseudo_table): Add "weak".
(obj_som_weak): New routine.
2000-02-24 13:37:02 +00:00
Alan Modra 7f3f1ea2a1 Correct intel_syntax fsub* and fdiv* handling. Oh, how I'd like to be rid
of UNIXWARE_COMPAT.
2000-02-24 12:40:45 +00:00
Alan Modra 520dc8e893 config/tc-i386.c (struct _i386_insn): Combine disps, imms, regs into
a union.  Use throughout file.  Delete TC_RELOC macro.
2000-02-24 08:18:20 +00:00
Alan Modra abd63a324b Remove dead code when not TC_M68K. 2000-02-24 01:56:31 +00:00
Alan Modra b5ebe70e6e Mention IBM 370 support 2000-02-24 01:40:42 +00:00
Richard Henderson 7e0527420a * config/tc-i386.c (md_assemble): When swapping operands for
intel_syntax, assume everything that's not Imm or Disp is a
        register.
2000-02-24 00:43:29 +00:00
Timothy Wall 6a6987a96e Add new feature notices for changes made on 2/8 and 2/10/00. 2000-02-23 16:01:21 +00:00
Alan Modra 5b93d8bb51 Add IBM 370 support. 2000-02-23 13:52:23 +00:00
Chandra Chavva 25f2196d60 * config/tc-d30v.c (parallel_ok): Use FLAG_NOT_WITH_ADDSUBppp to
determine if an instruction can be used in parallel with an ADDppp
        or SUBppp instruction.
2000-02-22 20:54:18 +00:00
Andrew Haley 6349b5f490 2000-02-22 Andrew Haley <aph@cygnus.com>
* doc/c-mips.texi (MIPS Opts): Document -mgp32 and -mgp64.
2000-02-22 18:55:30 +00:00
Andrew Haley c97ef257d3 1999-12-30 Andrew Haley <aph@cygnus.com>
* config/tc-mips.c (mips_gp32): New variable.
	(macro_build) Use mips_gp32.
	(mips_ip): Ditto.
	(md_longopts): Add "-mgp32" and "-mgp64".
	(md_parse_option): Add OPTION_GP32 and OPTION_GP64.
2000-02-22 14:43:54 +00:00
Ian Lance Taylor b985eaa839 2000-02-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* config/obj-coff.c (add_lineno): Accept non-positive lineno with
	warning, and bump it to 1.
2000-02-22 07:50:13 +00:00
Ian Lance Taylor 52454417c7 From Brad Lucier <lucier@math.purdue.edu>:
* dwarf2dbg.c (print_stats): Add cast to force printf argument to
	match format.
2000-02-22 07:21:23 +00:00
Catherine Moore 6b76fefe3b * config/tc-mips.c (MF_HILO_INSN): Define.
(mips_7000_hilo_fix): Declare.
           (append_insn): Conditionally insert nops after an mfhi/mflo insn.
           (md_parse_option): Check for 7000_HILO_FIX options.
           (OPTION_M7000_HILO_FIX): Define.
           (OPTION_NO_M7000_HILO_FIX): Define.
           * doc/c-mips.texi (-mfix7000): Describe.
2000-02-21 20:00:33 +00:00
Alan Modra f6af82bd44 This lot mainly cleans up `comparison between signed and unsigned' gcc
warnings.  One usused var, and a macro parenthesis fix too.  Also check
input sections are elf when doing gc in elflink.h.
2000-02-21 12:01:27 +00:00
Nick Clifton 8c8281f46f Add a symbol's value to the computed frag offset, rather than overwriting it. 2000-02-18 18:45:28 +00:00
Joern Rennecke d4845d5762 bfd:
Reinstate bits of sh4 support that got accidentally deleted.
Add sh-dsp support.

bfd:

	* archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
	(bfd_mach_sh3_dsp): Likewise.
	(bfd_mach_sh4): Reinstate.
	(bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
	* bfd-in2.h: Regenerate.
	* coff-sh.c (struct sh_opcode): flags is no longer short.
	(USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
	(sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
	(sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
	(sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
	(sh_opcodes): No longer const.
	(sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
	(sh_insn_uses_reg): Check for USESAS and USESR8.
	(sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
	(_bfd_sh_align_load_span): Return early for SH4.
	Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
	Take into account that field b of a parallel processing insn
	could be mistaken for a separate insn.
	* cpu-sh.c (arch_info_struct): New array elements for
	sh2, sh-dsp and sh3-dsp.
	Reinstate element for sh4.
	(SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
	(SH4_NEXT): Reinstate.
	(SH3_NEXT, SH3E_NEXT): Adjust.
	* elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
	* elf32-sh.c (sh_elf_set_private_flags): New function.
	(sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
	(sh_elf_merge_private_data): New function.
	(elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
	(bfd_elf32_bfd_copy_private_bfd_data): Define.
	(bfd_elf32_bfd_merge_private_bfd_data): Change to
	sh_elf_merge_private_data.

gas:

	* config/tc-sh.c ("elf/sh.h"): Include.
	(sh_dsp, valid_arch, reg_x, reg_y, reg_efg): New static variables.
	(md.begin): Initialize target_arch.
	Only include opcodes in has table that match selected architecture.
	(parse_reg): Recognize register names for sh-dsp.
	(parse_at): Recognize post-modify addressing.
	(get_operands): The leading space is now optional.
	(get_specific): Remove FDREG_N support.  Add support for sh-dsp
	arguments.  Update valid_arch.
	(build_Mytes): Add support for SDT_REG_N.
	(find_cooked_opcode): New function, broken out of md_assemble.
	(assemble_ppi, sh_elf_final_processing): New functions.
	(md_assemble): Use find_cooked_opcode and assemble_ppi.
	(md_longopts, md_parse_option): New option: -dsp.
	* config/tc-sh.h (elf_tc_final_processing): Define.
	(sh_elf_final_processing): Declare.

include/elf:

	* sh.h: (EF_SH_MACH_MASK, EF_SH_UNKNOWN, EF_SH1, EF_SH2): New macros.
	(EF_SH3, EF_SH_HAS_DSP, EF_SH_DSP, EF_SH3_DSP): Likewise.
	(EF_SH_HAS_FP, EF_SH3E, EF_SH4, EF_SH_MERGE_MACH): Likewise.

opcodes:

	* sh-dis.c (print_movxy, print_insn_ddt, print_dsp_reg): New functions.
	(print_insn_ppi): Likewise.
	(print_insn_shx): Use info->mach to select appropriate insn set.
	Add support for sh-dsp.  Remove FD_REG_N support.
	* sh-opc.h (sh_nibble_type): Add new values for sh-dsp support.
	(sh_arg_type): Likewise.  Remove FD_REG_N.
	(sh_dsp_reg_nums): New enum.
	(arch_sh1, arch_sh2, arch_sh3, arch_sh3e, arch_sh4): New macros.
	(arch_sh_dsp, arch_sh3_dsp, arch_sh1_up, arch_sh2_up): Likewise.
	(arch_sh3_up, arch_sh3e_up, arch_sh4_up, arch_sh_dsp_up): Likewise.
	(arch_sh3_dsp_up): Likewise.
	(sh_opcode_info): New field: arch.
	(sh_table): Split up insn with FD_REG_N into ones with F_REG_N and
	D_REG_N.  Fill in arch field.  Add sh-dsp insns.
2000-02-17 00:33:36 +00:00
Jeff Law c97305a1da * config/tc-hppa.c (pa_build_unwind_subspace): Use subseg_new to create
the unwinder subspace.  Save the current seg/subseg before creating
        the new seg/subseg.
2000-02-11 21:27:41 +00:00