Commit Graph

1108 Commits

Author SHA1 Message Date
Nick Clifton 358b94bdb1 Do not convert a subtract of zero into an add of zero. 2002-05-02 09:11:14 +00:00
Nick Clifton d8731e7dad Generate warning if the same destination register is used in parallel
instructions.
2002-05-01 09:54:31 +00:00
Alan Modra 200dbde8db * config/tc-i386.c (extra_symbol_chars): Add '[' to the list. 2002-05-01 00:53:55 +00:00
Alan Modra 819e64205a * config/tc-s390.c (md_parse_option): Formatting. 2002-04-28 12:34:02 +00:00
Alan Modra 0f3f3d8bfb * config/tc-i386.c: Formatting fixes, add missing space in error
message.
2002-04-28 12:19:46 +00:00
Nick Clifton 3c25c5f6e8 The patch contains mostly fixes for the disassembler. It also fixes
a crash of the assembler with some malformed source input.
Long segmented addresses are now correctly relocated.
Finally it updates my email address in the MAINTAINERS file.
2002-04-25 10:59:24 +00:00
Chris Demetriou af55c2e6c3 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
* config/tc-mips.c (macro_build): Do _not_ allow MIPS-3D
        instructions to be generated by macros.
2002-04-24 21:52:47 +00:00
Andreas Schwab 062cd5e7fc * config/tc-i386.c (output_jump, output_disp)
(md_estimate_size_before_relax): Don't set fx_pcrel_adjust any
	more.
	(md_apply_fix3): Remember addend value for rela relocations.
	(tc_gen_reloc): Correctly compute pc-relative relocation addend.
2002-04-24 14:56:07 +00:00
Chris Demetriou 2b2e39bfa5 2002-04-22 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (macro_build): Add close-parenthesis missing
        from previous change.

(also, fix ChangeLog entry for previous patch.)
2002-04-22 21:50:44 +00:00
Eric Christopher 80cc45a581 2002-04-22 Eric Christopher <echristo@redhat.com>
* config/tc-mips.c: Add warning if macro instructions are expanded
	into a branch delay slot.
2002-04-22 21:21:06 +00:00
Martin Schwidefsky 302576afe4 * config/tc-s390.c (tc_s390_fix_adjustable): Prevent adjustments to
symbols in merge sections.
2002-04-17 15:12:24 +00:00
Tom Rix 76b999d013 Prevent adjustments to symbols in merge sections. 2002-04-16 02:58:11 +00:00
Richard Sandiford 3a18fa4f57 Fix thinko in last commit. 2002-04-11 11:21:01 +00:00
Richard Sandiford 580a832ee0 * doc/invoke.texi (TC_LARGEST_EXPONENT_IS_NORMAL): Document.
* config/atof-ieee.c (TC_LARGEST_EXPONENT_IS_NORMAL): Add an
	argument for the precision.
	(gen_to_words): Update accordingly.
2002-04-11 11:11:35 +00:00
Alan Modra edde18a577 * as.c (parse_args <OPTION_VERSION>): Use VERSION is
BFD_VERSION_STRING unavailable.
	* config/tc-i386.c (INLINE): Define (for non-BFD assembler).
2002-04-10 13:00:02 +00:00
Joern Rennecke 5bcd00a60a * config/tc-sh.h (TC_FIX_ADJUSTABLE): Disable adjusting if
symbol_used_in_reloc_p is true.
2002-04-09 16:48:03 +00:00
Joern Rennecke 2ed5f585e4 * config/tc-sh.c (md_apply_fix3): Don't zero relocations on big
endian hosts.
2002-04-09 15:26:59 +00:00
Thiemo Seufer 874e898605 * config/tc-mips.c (mips16_macro_build): Cast type mismatch.
(mips_ip): Remove unused variable.
	(md_apply_fix3): Cast signed/unsignes mismatches. Replace
	unsigned char with bfd_byte.
	(s_file): Remove unused variable.
	(s_mips_ent): Likewise.
2002-04-04 07:43:11 +00:00
Tom Rix fbdbf47268 Various fixes and improvements for d10v. 2002-04-03 19:44:05 +00:00
Richard Henderson 5f44c186d7 * config/tc-ia64.c (ia64_cons_fix_new): Handle 8 byte iplt reloc
in 32-bit mode.
2002-04-02 00:32:41 +00:00
Andreas Schwab 3458b54ce7 * config/tc-i386.c (output_jump): Set fx_pcrel_adjust to size of
field for pc-relative fixups.
	(output_disp): Likewise.
	(md_estimate_size_before_relax): Likewise.
	(tc_gen_reloc): Subtract fx_pcrel_adjust instead of fx_size for
	pc-relative fixups in 64bit mode.
2002-03-27 16:22:04 +00:00
Alan Modra 815b453c05 * config/te-aix5.h: Typo fix. 2002-03-22 02:07:36 +00:00
Nick Clifton f201ccb3e5 Fix typo 2002-03-21 09:13:34 +00:00
Alexandre Oliva 177b4a6ad0 * config/tc-mips.c (md_estimate_size_before_relax): Do not modify
the EXTENDED bit here; report the estimate according to the
current size.
2002-03-18 18:56:18 +00:00
Nick Clifton eb1e0e807a Add AIX 64 shared library support and emulation layer for binutils 2002-03-18 12:46:27 +00:00
Chris Demetriou 1f25f5d300 [ gas/ChangeLog ]
2002-03-15  Chris G. Demetriou  <cgd@broadcom.com>

	* config/tc-mips.c (mips_set_options): New "ase_mips3d" member.
	(mips_opts): Initialize "ase_mips3d" member.
	(file_ase_mips3d): New variable.
	(CPU_HAS_MIPS3D): New macro.
	(md_begin): Initialize mips_opts.ase_mips3d and file_ase_mips3d
	based on command line options and configuration defaults.
	(macro_build, mips_ip): Accept MIPS-3D instructions if
	mips_opts.ase_mips3d is set.
	(OPTION_MIPS3D, OPTION_NO_MIPS3D, md_longopts, md_parse_option):
	Add support for "-mips3d" and "-no-mips3d" options.
	(OPTION_ELF_BASE): Move to accomodate new options.
	(s_mipsset): Support ".set mips3d" and ".set nomips3d".
	(mips_elf_final_processing): Add a comment indicating that a
	MIPS-3D ASE ELF header flag should be set, when one exists.
	* doc/as.texinfo: Document -mips3d and -no-mips3d options.
	* doc/c-mips.texi: Likewise, and document ".set mips3d" and ".set
	nomips3d" directives.

[ gas/testsuite/ChangeLog ]
2002-03-15  Chris G. Demetriou  <cgd@broadcom.com>

	* gas/mips/mips64-mips3d.s: New file.
	* gas/mips/mips64-mips3d.d: Likewise.
	* gas/mips/mips.exp: Run new "mips64-mips3d" test.

[ include/opcode/ChangeLog ]
2002-03-15  Chris G. Demetriou  <cgd@broadcom.com>

	* mips.h (INSN_MIPS3D): New definition used to mark MIPS-3D
	instructions.
	(OPCODE_IS_MEMBER): Adjust comments to indicate that ASE bit masks
	may be passed along with the ISA bitmask.

[ opcodes/ChangeLog ]
2002-03-15  Chris G. Demetriou  <cgd@broadcom.com>

	* mips-dis.c (mips_isa_type): Add MIPS3D instructions to the ISA
	bit masks for bfd_mach_mips_sb1 and bfd_mach_mipsisa64.  Add
	comments for bfd_mach_mipsisa32 and bfd_mach_mipsisa64 that
	indicate that they should dissassemble all applicable
	MIPS-specified ASEs.
	* mips-opc.c: Add support for MIPS-3D instructions.
	(M3D): New definition.

	* mips-opc.c: Update copyright years.
2002-03-16 03:09:19 +00:00
Hans-Peter Nilsson 2be11e7ecc * config/tc-mmix.c (md_estimate_size_before_relax): Don't consider
a weak symbol in same section to be within reach.
2002-03-14 10:02:42 +00:00
Andreas Schwab 1e16b528eb * config/tc-ia64.c (fixup_unw_records): Clear region when seeing a
body record so that an error is given for misplaced .save
	pseudo-ops.
2002-03-12 09:30:42 +00:00
Alan Modra 29b0f896b1 * config/tc-i386.h (REX_OPCODE): Define.
(REX_MODE64, REX_EXTX, REX_EXTY, REX_EXTZ): Define.
	(rex_byte): typedef to int.
	* config/tc-i386.c: Group prototypes and vars together.
	Formatting fixes.  Remove occurrences of "register" keyword.
	(true): Delete.
	(false): Delete.
	(mode_from_disp_size): Add INLINE keyword to prototype.
	(fits_in_signed_byte): Likewise.
	(fits_in_unsigned_byte): Likewise.
	(fits_in_unsigned_word): Likewise.
	(fits_in_signed_word): Likewise.
	(fits_in_unsigned_long): Likewise.
	(fits_in_signed_long): Likewise.
	(type_names): Constify.
	(intel_float_operand): Constify param.
	(add_prefix): Use REX_OPCODE.
	(md_assemble): Likewise.  Modify for changed rex_byte.
	(parse_insn): Split out of md_assemble.
	(parse_operands): Likewise.
	(swap_operands): Likewise.
	(optimize_imm): Likewise.
	(optimize_disp): Likewise.
	(match_template): Likewise.
	(check_string): Likewise.
	(process_suffix): Likewise.
	(check_byte_reg): Likewise.
	(check_long_reg): Likewise.
	(check_qword_reg): Likewise.
	(check_word_reg): Likewise.
	(finalize_imm): Likewise.
	(process_operands): Likewise.
	(build_modrm_byte): Likewise.
	(output_insn): Likewise.
	(output_branch): Likewise.
	(output_jump): Likewise.
	(output_interseg_jump): Likewise.
	(output_disp): Likewise.
	(output_imm): Likewise.
2002-03-09 05:36:51 +00:00
Alan Modra 937149dd3c * config/tc-i386.c (tc_gen_reloc): Don't attempt to handle 8 byte
relocs except when BFD64.

	* write.c (number_to_chars_bigendian): Don't abort when N is
	larger than sizeof (VAL).
	(number_to_chars_littleendian): Likewise.
2002-03-06 04:59:36 +00:00
Jeff Law 40d74fb122 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
* config/tc-hppa.c (md_apply_fix3): Add cast.
        (hppa_fix_adjustable): Adjust list of selectors using e_lrsel and
        e_rrsel.
2002-03-05 17:57:17 +00:00
Alan Modra cd3cde8631 * tc-pdp11.c: Use VAX float format support for PDP-11 target.
(parse_ac5): New function for parsing float regs in float operand.
	(parse_expression): Remove attempt to make literals be octal.
	(parse_op_no_deferred): Support float literals.
	(parse_op): Reject attempts to refer to float regs.
	(parse_fop): New function, like parse_op but for float operand.
	(md_assemble): Add cases to parse float operands.  Also fix
	IMM3, IMM6, IMM8 cases to pick up the operand from the right spot.
2002-03-05 03:10:34 +00:00
H.J. Lu e9682144c1 2002-03-04 H.J. Lu <hjl@gnu.org>
* config/obj-elf.c (special_section): Add .init_array,
	.fini_array and .preinit_array.

	* config/tc-ia64.h (ELF_TC_SPECIAL_SECTIONS): Remove
	.init_array and .fini_array.
2002-03-04 20:40:48 +00:00
Jakub Jelinek 26eb409359 * config/obj-elf.c (elf_copy_symbol_attributes): Don't copy
visibility.
	(obj_frob_symbol): Copy visibility.
2002-03-01 18:36:08 +00:00
Jakub Jelinek 559e22f3dd * config/tc-alpha.c (s_alpha_text): Use obj_elf_text for OBJ_ELF, not
s_text.
	(s_alpha_data): Use obj_elf_data for OBJ_ELF, not s_data.
2002-02-27 23:48:06 +00:00
Chris Demetriou b25a253ca8 2002-02-26 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (mips_need_elf_addend_fixup): For embedded-PIC
        only, undo the changes made on 2001-06-08, with the
        effect being that common or extern symbols are
        adjusted for embedded-PIC, but weak symbols are not.
        (md_estimate_size_before_relax: Likewise, with the effect
        that extern symbols are treated the same as weak symbols
        only if not embedded-PIC.
        (mips_fix_adjustable) Likewise, with the effect that
        weak or extern symbols are not adjusted for embedded-PIC.
        (md_apply_fix3): Tweak so that the case where value is zero
        is handled more correctly for embedded-PIC code.
2002-02-26 22:18:51 +00:00
Thiemo Seufer 4d34fb5fed * config/tc-mips.c (set_at): Fix handling of 64bit register loads.
(macro): Likewise. Fix la/dla address expansions for EMBEDDED_PIC
	and NO_PIC cases. Code cleanup.
	(macro2): Fix handling of 64bit register loads.
	* mips-gp64-fp32-pic.d: Fix test of 64bit register loads.
	* mips-gp64-fp32-pic.s: Likewise.
	* mips-gp64-fp32.d: Likewise.
	* mips-gp64-fp32.s: Likewise.
	* mips-gp64-fp64-pic.d: Likewise.
	* mips-gp64-fp64-pic.s: Likewise.
	* mips-gp64-fp64.d: Likewise.
	* mips-gp64-fp64.s: Likewise.
2002-02-25 13:21:38 +00:00
Alan Modra c7d004c5d3 * config/tc-hppa.c: Update copyright date. 2002-02-25 05:10:11 +00:00
Alan Modra 23e1d84c9a * doc/c-ppc.texi (PowerPC-Opts): Add -mpower4 and -maltivec.
Remove references to chip manufacturers.
	* config/tc-ppc.c (md_parse_option): Handle -mpower4 option.
	Correct comments.
	(md_show_usage): Remove references to chip manufacturers.  Mention
	-mpower4.
	(md_begin): Test power4 opcode flag bits.
2002-02-25 03:44:56 +00:00
Nick Clifton 6290819df6 Keep track of prologue counts across .label_state/.copy_state directives 2002-02-22 11:56:21 +00:00
Nick Clifton f1e7a2c900 Add missing protoypes.
Remove ANSI style function declarations
2002-02-22 10:49:38 +00:00
Tom Tromey f88fd9fe74 * config/tc-xstormy16.h (DWARF2_LINE_MIN_INSN_LENGTH): Define. 2002-02-20 02:57:45 +00:00
Thiemo Seufer da0e507f3d * config/tc-mips.c (md_parse_option): Complain about invalid -mabi
option input.
2002-02-19 22:59:30 +00:00
Martin Schwidefsky ff0fb56520 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
* config/tc-s390.c (md_parse_option): Add switches -m31 and -m64.
	Make bit size independent of architecture switch.
	(md_begin): Add warning for -m64 with -Aesa.
	(s390_md_end): Use renamed architecture defines.
2002-02-19 18:50:35 +00:00
Daniel Jacobowitz a245a9aa26 2002-02-18 Daniel Jacobowitz <drow@mvista.com>
* config/obj-coff.h: Check !target_big_endian, not shl, for coff-sh.
2002-02-18 23:57:10 +00:00
Chris Demetriou 9151e8bfc2 2002-02-15 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (md_estimate_size_before_relax): Really
        make sure we treat weak like extern only for ELF.  (Fixes
        patch from 2001-07-25.)
2002-02-15 23:00:34 +00:00
Chris Demetriou 2d2bf3e0e3 2002-02-13 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (mips_need_elf_addend_fixup): Restructure into
        a sequence of indpendent 'if' statements for easier debugging
        and future modification.
2002-02-14 07:29:22 +00:00
Jason Thorpe 76f57f3aaa bfd:
2002-02-13  Matt Fredette  <fredette@netbsd.org>

* elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
EF_M68000.


bintuls:
2002-02-13  Matt Fredette  <fredette@netbsd.org>

* readelf.c (get_machine_flags): Recognize EF_M68000.


gas:
2002-02-13  Matt Fredette  <fredette@netbsd.org>

* config/tc-m68k.c (md_show_usage): No longer display a
hard-coded "68020" for the default CPU, instead display the
canonical name of the true, configured default CPU.
(m68k_elf_final_processing): Mark objects for sub-68020
CPUs with the new EF_M68000 flag.


include/elf:
2002-02-13  Matt Fredette  <fredette@netbsd.org>

* m68k.h (EF_M68000): Define.
2002-02-13 18:14:48 +00:00
Andreas Schwab 5db1645b7e Update copyright. 2002-02-13 11:19:07 +00:00
Andreas Schwab 3bf057fadc * config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust
pc-relative relocations to merge sections in 64-bit mode.
2002-02-13 11:17:48 +00:00
Alan Modra 3dcfe21d78 * config/tc-hppa.c (hppa_fix_adjustable): Don't adjust final types
that implicitly use LR and RR selectors.
2002-02-12 11:08:54 +00:00
Alexandre Oliva 913572ec08 * config/tc-mn10300.c (other_registers): Added `epsw'. Mark `pc'
and `epsw' as available on AM33 and above only.
(other_register_name): Add logic to handle machine type encoded in
reg_number.
2002-02-12 07:41:35 +00:00
Tom Rix 9b90b531ee Fix minimal-toc with -maix64 2002-02-12 03:59:33 +00:00
Alexandre Oliva 6c1b24e42f * config/tc-sparc.c (U0x80000000, U0xffffffff): New constants.
Use all over.
2002-02-11 13:24:06 +00:00
Jan Hubicka 7ecd2f8b9d * i386.c (md_assemble): Support 32bit address prefix.
(i386_displacement): Likewise.
	(i386_index_check): Accept 32bit addressing in 64bit mode.
2002-02-11 12:00:54 +00:00
Alexandre Oliva 7eb27ef29f * config/tc-sh.c (dot): Removed unused function. 2002-02-11 06:14:41 +00:00
Richard Henderson 543833df4f * config/tc-alpha.c (O_samegp): New.
(USER_RELOC_P): Include it.
        (alpha_reloc_op_tag, debug_exp, find_macro_match): Add it.
        (md_apply_fix3): Handle BFD_RELOC_ALPHA_BRSGP.
        (alpha_force_relocation, alpha_fix_adjustable): Likewise.
        (alpha_validate_fix): New.
        * config/tc-alpha.h (TC_VALIDATE_FIX): New.

        * gas/alpha/elf-reloc-5.s, gas/alpha/elf-reloc-5.d: New.
        * gas/alpha/elf-reloc-6.s, gas/alpha/elf-reloc-6.l: New.
        * gas/alpha/alpha.exp: Run them.
2002-02-09 22:55:06 +00:00
Chris Demetriou 6373ee5479 2002-02-08 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (IS_SEXT_32BIT_NUM): New macro to
        determine if a number is a sign-extended 32-bit number.
        (load_register): Use IS_SEXT_32BIT_NUM.
        (macro): Check if load/store macro handling is using a
        constant 32-bit address on 64-bit address systems, and if
        so optimize the generation of that address.
2002-02-08 22:25:36 +00:00
Richard Henderson 50a4c61130 * config/tc-alpha.c (alpha_force_relocation): Don't assert that
we've eliminated all foreign relocation types yet.
        (alpha_fix_adjustable): Likewise.
2002-02-08 10:03:01 +00:00
Alexandre Oliva 324bfcf3bb Contribute sh64-elf.
2002-02-08  Alexandre Oliva  <aoliva@redhat.com>
	    Stephen Clarke <Stephen.Clarke@st.com>
* doc/c-sh64.texi: Fix citation of SH64 architecture manual.
2002-01-31  Alexandre Oliva  <aoliva@redhat.com>
* config/tc-sh.c (md_relax_table): Added default sizes for
non-PC-relative UNDEF_MOVI, and relaxation sequences for
MOVI_16, MOVI_32 and MOVI_48.
* config/tc-sh64.c (shmedia_md_apply_fix3): Fix warning.
(shmedia_md_convert_frag): Handle non-PC-relative UNDEF_MOVI
and MOVI_16.
(shmedia_md_estimate_size_before_relax): Remove redundant
blocks.	 Set fragP->fr_var even if relaxation type unchanged.
Retain UNDEF_MOVI until expression decays to number.
2002-01-24  Alexandre Oliva  <aoliva@redhat.com>
* config/tc-sh64.c (shmedia_init_reloc): Handle new SHmedia PIC
relocation types.  Take fixP->fx_addnumber into account too.
(shmedia_md_apply_fix): Likewise.
(shmedia_md_convert_frag): Likewise.
(shmedia_build_Mytes): Likewise.
(sh64_consume_datalabel): Complain about nested datalabel.
Support PIC relocs.  Call sh_parse_name.
* config/tc-sh64.h (TC_RELOC_RTSYM_LOC_FIXUP): Extend definition
in tc-sh.h to SHmedia reloc types.
* config/tc-sh.c (SH64PCRELPLT, MOVI_PLT, MOVI_GOTOFF,
MOVI_GOTPC): New relaxation constants.
(md_relax_table): Introduce relaxation directives for PIC-related
constants.
(sh_PIC_related_p): Handle datalabel.
(sh_check_fixup): Choose SH5 PIC relocations.
(sh_cons_fix_new): Added BDF_RELOC_64.
(md_apply_fix3, sh_parse_name): Handle GOTPLT.
2002-01-18  Alexandre Oliva  <aoliva@redhat.com>
* config/tc-sh64.c (sh64_max_mem_for_rs_align_code): If the
current ISA is SHmedia, get 7 bytes.
2001-11-28  Nick Clifton  <nickc@cambridge.redhat.com>
* config/tc-sh.c (md_apply_fix3): Treat shmedia_md_apply_fix3 as a
void function.
* config/tc-sh64.c (shmedia_apply_fix): Rename to
shmedia_apply_fix3 and make void.
2001-05-17  Alexandre Oliva  <aoliva@redhat.com>
* config/tc-sh64.c (s_sh64_abi): Remove unused arguments passed to
as_bad.
2001-04-12  Alexandre Oliva  <aoliva@redhat.com>
* config/tc-sh64.h (md_parse_name): Take &c as argument.
2001-03-14  DJ Delorie	<dj@redhat.com>
* doc/Makefile.am (CPU_DOCS): Added c-sh64.texi
* doc/Makefile.in(CPU_DOCS): Ditto.
* doc/c-sh64.texi: New file.
* doc/as.texinfo: Add SH64 support.
2001-03-13  DJ Delorie	<dj@redhat.com>
* config/tc-sh64.c (shmedia_get_operands): Rename A_RESV_Fx to
A_REUSE_PREV so that its purpose is more obvious.
(shmedia_build_Mytes): Ditto.
2001-03-07  DJ Delorie	<dj@redhat.com>
* config/tc-sh64.c (sh64_vtable_entry): New, strip datalabels
before processing.
(sh64_vtable_inherit): Ditto.
(strip_datalabels): New, strip "datalabel" from given line.
* config/tc-sh.c (md_pseudo_table): Add sh64-specific vtable
pseudos.
2001-03-06  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_assemble): Move dwarf2_emit_insn
call ...
(shmedia_build_Mytes): ... to here.
2001-03-06  DJ Delorie	<dj@redhat.com>
* config/tc-sh.c: Remove sh64-specific uaquad now that there
is a generic one.
2001-01-21  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.h (DWARF2_LINE_MIN_INSN_LENGTH): Override.
* config/tc-sh64.c (shmedia_md_assemble): Offset recorded insn
address by one in call to dwarf2_emit_insn.
2001-01-13  Hans-Peter Nilsson	<hpn@cygnus.com>
Implement ".abi" pseudo and correct .cranges descriptors.  Correct
alignment handling broken by imported changes.
* config/tc-sh64.h (HANDLE_ALIGN): Override definition in tc-sh.h.
(sh64_handle_align): Declare.
(MAX_MEM_FOR_RS_ALIGN_CODE): Override definition in tc-sh.h.
(sh64_max_mem_for_rs_align_code): Declare.
(enum sh64_isa_values): Moved here from tc-sh64.c.
(md_do_align): Define.
(sh64_do_align): Declare.
(struct sh64_tc_frag_data): New.
(TC_FRAG_TYPE): Change to struct sh64_tc_frag_data.  Users
changed.
(TC_FRAG_INIT): Change to set new datatype.
(struct sh64_segment_info_type): Rename member
last_flushed_location to last_contents_mark.  All users changed.
(md_elf_section_change_hook, TC_CONS_FIX_NEW): Do not define.
(shmedia_elf_new_section, sh64_tc_cons_fix_new): Do not prototype.
* config/tc-sh.c (md_pseudo_table): Add ".abi".
(sh_elf_cons) [HAVE_SH64]: Call sh64_update_contents_mark instead
of unsetting seen_insn.
(md_assemble) [HAVE_SH64] <before new SHcompact sequence>: Also
call sh64_update_contents_mark.
(sh_handle_align): Remove HAVE_SH64-conditioned code.
* config/tc-sh64.c (sh64_isa_mode): Correct type from boolean to
enum sh64_isa_values.
(sh64_set_contents_type): Drop segT parameter.	All callers changed.
(emitting_crange): Boolean guard moved to file scope from function
scope in sh64_set_contents_type.
(s_sh64_abi): New.
(sh64_update_contents_mark): New; most split out from
sh64_flush_pending_output.
(shmedia_md_end): Call sh64_update_contents_mark.  Set
sh64_isa_mode to sh64_isa_sh5_guard unless sh64_isa_unspecified.
(sh64_do_align): New function.
(sh64_max_mem_for_rs_align_code): New function.
(sh64_handle_align): Rename from shmedia_do_align.  Make
non-static.  Add head comment.	Emit zero bytes for n bytes modulo
four.  Change return-type to void.
(shmedia_elf_new_section): Remove.
(shmedia_md_assemble): Call sh64_update_contents_mark.
(s_sh64_mode): Ditto.  Do not call md_flush_pending_output.  Make
new frag.  Call sh64_update_contents_mark after making the new
frag.
(sh64_flush_pending_output): Just call sh64_update_contents_mark
and sh_flush_pending_output.
(sh64_flag_output): Also call md_flush_pending_output, but add
condition on not emitting_crange.
(sh64_tc_cons_fix_new): Remove.
2001-01-12  Nick Clifton  <nickc@redhat.com>
* config/tc-sh64.c (shmedia_do_align): Fix to work with new
alignment handling scheme imported from sourceware.
2001-01-12  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.h (TARGET_FORMAT): Define.
(sh64_target_format): Prototype.
* config/tc-sh64.c (sh64_target_mach): New function.
2001-01-07  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_end): When equating a symbol, use
zero_address_frag instead of copying the frag of the symbol.
(shmedia_frob_file_before_adjust): Ditto.
(shmedia_md_apply_fix) <case BFD_RELOC_SH_IMM_MEDLOW16>: Cast mask
to valueT to remove signedness.
(shmedia_md_convert_frag): Add parameter final.	 Rename parameter
headers to output_bfd.	Do not evaluate symbols if final is false;
do emit fixups.
(shmedia_md_estimate_size_before_relax) <case C (MOVI_IMM_32,
UNDEF_MOVI) et al>: If symbol cannot be modified to be PC-relative
to the current frag, call shmedia_md_convert_frag to emit fixups
and make frag_wane neutralize the frag.	 Update comments.
* config/tc-sh.c (md_convert_frag): Change caller of
shmedia_md_convert_frag.
2001-01-06  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.h: Tweak comments and correct formatting.
* config/tc-sh64.c: Ditto.
(shmedia_md_convert_frag) <PT/PTA/PTB 32, 48 and 64 bit
expansion, MOVI pcrel expansion>: Fix thinko calculating offset
for the no-relocation case.
(shmedia_check_limits): Fix range check being off-by-one for PTA.
* config/tc-sh.c: Ditto.  Add proper comments to #ifdef/#ifndef
wrappers.
(SH64PCREL16_F): Increment for proper max-PTA handling.	 Update
comment.
(SH64PCREL16_M, MOVI_16_M): Correct range thinko.
(SH64PCREL48_M, MOVI_48_M): Similar; don't count in length of
expansion.
(SH64PCREL32_M, MOVI_32_M): Ditto; handle overflowing expression.
Correct comment.
2001-01-05  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_apply_fix) <second switch, case
BFD_RELOC_SH_PT_16>: Set lowest bit in field to be relocated to 1.
(shmedia_md_convert_frag) <case C (SH64PCREL16_32, SH64PCREL16) et
al>: Set lowest bit of field to relocate to 1 and rest to empty,
if reloc is emitted.
2000-12-31  Hans-Peter Nilsson	<hpn@cygnus.com>
New options plus bugfixes.
* config/tc-sh.c (md_longopts): New options "-no-expand" and
"-expand-pt32".
(md_parse_option): Handle new options.
(md_show_usage): Add blurb for new options.
* config/tc-sh64.c (SHMEDIA_BFD_RELOC_PT): New macro.
(sh64_expand, sh64_pt32): New variables.
(shmedia_init_reloc): Handle BFD_RELOC_SH_PT_16.
(shmedia_md_apply_fix): Hold original fixP->fx_r_type in
orig_fx_r_type.	 Change SHMEDIA_BFD_RELOC_PT into
BFD_RELOC_SH_PT_16.  Handle BFD_RELOC_SH_PT_16 as pc-relative.
<resolved previously-pc-relative relocs>: Handle
SHMEDIA_BFD_RELOC_PT and BFD_RELOC_SH_PT_16.
(shmedia_md_convert_frag) <case C (SH64PCREL16PT_64, SH64PCREL16),
case C (SH64PCREL16PT_32, SH64PCREL16)>: Modify to PTB if operand
points to SHcompact code.
<case C (SH64PCREL16_32, SH64PCREL16), case C (SH64PCREL16_64,
SH64PCREL16)>: Check that ISA of what operand points at and
PTA/PTB matches, or emit error.
(shmedia_check_limits): Handle BFD_RELOC_SH_PT_16 and
SHMEDIA_BFD_RELOC_PT.
(shmedia_immediate_op): If pcrel, emit fixup also for constant
operand.
(shmedia_build_Mytes) <case A_IMMS16>: Also check sh64_expand in
condition for MOVI expansion.
<case A_PCIMMS16BY4>: Handle expansion to 32 bits only, if
sh64_pt32.  Emit only a BFD_RELOC_SH_PT_16 fixup if not
sh64_expand.
<case A_PCIMMS16BY4_PT>: Likewise, but emit a SHMEDIA_BFD_RELOC_PT
fixup.
(sh64_target_format): Error-check setting of sh64_pt32 and
sh64_expand.  Fix typo in check for sh64_shcompact_const_crange.
(shmedia_md_pcrel_from_section): Handle BFD_RELOC_SH_PT_16 and
SHMEDIA_BFD_RELOC_PT as coming from SHmedia code.
2000-12-31  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c: Improve comments.
(shmedia_md_convert_frag): Remove inactive is_pt_variant code.	Do
not say the linker will check correctness of PTA/PTB expansion.
(shmedia_md_end): Make non-static.
* config/tc-sh64.h (md_end): Define to shmedia_md_end.	Add
prototype.
* config/tc-sh.c (sh_finalize): Remove.
* config/tc-sh.h (md_end): Do not define.
Remove prototype for sh_finalize.
2000-12-30  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (shmedia_frob_section_type): Use a struct
sh64_section_data container when storing section type in tdata
field in elf_section_data.
* config/tc-sh.c (sh_elf_final_processing): Change from EF_SH64 to
EF_SH5.
* Makefile.am: Update dependencies.
* Makefile.in: Regenerate.
2000-12-22  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_assemble): Don't protect
dwarf2_emit_insn call with test on debug_type.
2000-12-19  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (sh64_set_contents_type): Make contents-type
CRT_SH5_ISA32 sticky for 64-bit.
2000-12-18  Hans-Peter Nilsson	<hpn@cygnus.com>
Generate .crange sections when switching ISA mode or emitting
constants in same section as code.
* config/tc-sh64.c: Reformat structure definitions.
(sh64_end_of_assembly, sh64_mix, sh64_shcompact_const_crange): New
variables.
(sh64_set_contents_type): Rename from sh64_init_section.  Rewrite
to emit a .cranges descriptor when contents type changes.  Only
emit error if changing contents type and -no-mix is in effect.
(sh64_emit_crange, sh64_flush_last_crange, sh64_flag_output,
sh64_flush_pending_output, sh64_tc_cons_fix_new): New functions.
(shmedia_md_end): Set sh64_end_of_assembly.  Pass
sh64_flush_last_crange over sections.
When checking main symbol of datalabel symbol, check for
STO_SH5_ISA32, not ISA type of section in definition.
(shmedia_frob_file_before_adjust): Check main symbol for
STO_SH5_ISA32; don't check ISA type of section in definition.
(shmedia_frob_section_type): Adjust for .cranges; set section flag
to SHF_SH5_ISA32_MIXED or SHF_SH5_ISA32 according to whether
.cranges entries have been output.
(shmedia_elf_new_section): Just call md_flush_pending_output.
(shmedia_md_assemble): Do not emit a BFD_RELOC_SH_SHMEDIA_CODE
fix.  Do not set tc_segment_info_data.in_code for section.  Call
sh64_set_contents_type for SHmedia code.
(s_sh64_mode): Do not call sh64_init_section or set seen_insn to
false.	Call md_flush_pending_output.
(sh64_target_format): Check that -no-mix and
-shcompact-const-crange are used in sane combination with other
options.
(shmedia_md_pcrel_from_section): Check type of fix for how to
adjust pc-relative.
(sh64_consume_datalabel): Check symbol for having STO_SH5_ISA32,
not ISA type of section in definition.
* config/tc-sh64.h (struct sh64_segment_info_type): Rewrite to
hold contents-type state.
(md_flush_pending_output): Redefine to sh64_flush_pending_output.
(sh64_flush_pending_output): Declare.
(TC_CONS_FIX_NEW): Define to sh64_tc_cons_fix_new.
(sh64_tc_cons_fix_new): Declare.
* config/tc-sh.c (sh_elf_cons) [HAVE_SH64]: Unset seen_insn and
call sh64_flag_output.
(md_assemble) [HAVE_SH64]: Do not emit BFD_RELOC_SH_CODE.  Just
call sh64_set_contents_type to mark SHcompact code and set
seen_insn.
(md_longopts): New options "-no-mix" and
"-shcompact-const-crange".
(md_parse_option): Handle new options.
(md_show_usage): Add blurb for new options.
(md_number_to_chars) [HAVE_SH64]: Call sh64_flag_output.
2000-12-15  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c: Delete investigated and obsolete fixme:s.
(sh64_last_insn_frag): New.
(shmedia_md_convert_frag): Use tc_frag_data field of incoming frag
to get frag for insn opcode for generating fixups; do not assume it
is the same frag.
(shmedia_build_Mytes): Set sh64_last_insn_frag after growing frag
for new insn.
* config/tc-sh64.h (ELF_TC_SPECIAL_SECTIONS): Define for .cranges
section.
(TC_FRAG_TYPE): Define as fragS *.
(TC_FRAG_INIT): Define to set tc_frag_data to sh64_last_insn_frag.
(sh64_last_insn_frag): Declare.
(sh64_consume_datalabel): Fix typo; check for seginfo != NULL,
not == NULL before dereferencing.
2000-12-12  Hans-Peter Nilsson	<hpn@cygnus.com>
Get rid of BFD section flag and EF_SH64_ABI64.
* config/tc-sh64.c (shmedia_frob_section_type): Use
elf_section_data (sec)->tdata, not a specific BFD section flag, to
communicate the section as containing SHmedia code.  Describe why.
* config/tc-sh.c (sh_elf_final_processing): Tweak comment.  Set
EF_SH64 regardless of ABI.
* config/tc-sh64.c (shmedia_md_apply_fix): Decapitalize "invalid"
in error message.  Handle resolved expressions for
BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
BFD_RELOC_SH_IMMS10BY4 and BFD_RELOC_64.
(shmedia_check_limits): Handle BFD_RELOC_64.
(sh64_adjust_symtab): Do not decrement the GAS symbol value for
a STO_SH5_ISA32 symbol, only the BFD value.
2000-12-11  Ben Elliston  <bje@redhat.com>
* config/tc-sh64.c: Call dwarf2_emit_insn, not the defunct
dwarf2_generate_asm_lineno.
2000-12-11  Hans-Peter Nilsson	<hpn@cygnus.com>
Handle PC-relative MOVI expansions with assembler relaxation.
Generate PC-relative relocs from 16-bit PC-relative expressions.
* config/tc-sh64.c (SHMEDIA_MD_PCREL_FROM_FIX): Break out from...
(shmedia_md_pcrel_from_section): ...here.
(shmedia_md_apply_fix): Handle fixups for 16-bit operands that has
turned completely resolved.  Adjust relocation type for 16-bit
immediate operands that has turned PC-relative.	 Adjust back for
MD_PCREL_FROM_SECTION being applied twice.
(shmedia_md_convert_frag): Always emit reloc for expression with
global or weak symbol.	Handle relaxation result for PC-relative
expressions.
(shmedia_md_estimate_size_before_relax): An expression with a weak
or global symbol can not be relaxed.  Break out tests for
relaxable symbol into variable sym_relaxable.
<cases C (MOVI_IMM_64, UNDEF_MOVI) and C (MOVI_IMM_32,
UNDEF_MOVI)>: Break out any PC-relative expression and change
relaxation type.
(shmedia_build_Mytes): CSE &operands->operands[j] into variable
opjp.
<case A_IMMS16>: Fix typo for initial minor relaxation type of
MOVI expansion.	 If X_op_symbol of the immediate expression is
set, make an expression symbol for the argument to frag_var.
* config/tc-sh.c (MOVI_IMM_32_PCREL, MOVI_IMM_64_PCREL): New
relaxations.
(END): Adjust for new relaxations.
(md_relax_table): Add entries for new relaxations.
2000-12-07  Ben Elliston  <bje@redhat.com>
* config/tc-sh64.c (shmedia_parse_reg): Initialize variable len.
2000-12-07  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_convert_frag): Correct all MOVI and
SHORI operand offsets in PT/PTA/PTB expansions.
2000-12-05  Hans-Peter Nilsson	<hpn@cygnus.com>
Implement DataLabel semantics.
* config/tc-sh.c (sh_frob_file) [HAVE_SH64]: Call
shmedia_frob_file_before_adjust.
* config/tc-sh64.c [! OBJ_ELF]: Emit #error.
(DATALABEL_SUFFIX): Define.
(shmedia_md_end) <before adjusting STO_SH5_ISA32 symbols>: Walk
symbol list to update "datalabel" symbols to their main symbol
counterparts.
(shmedia_frob_file_before_adjust): New.
(sh64_adjust_symtab): For remaining datalabel symbols, set to
undefined and set STT_DATALABEL.
(sh64_frob_label): Initialize TC symbol field.
(sh64_consume_datalabel): Actually implement semantics.	 New
parameter operandf, call it instead of expression.
(sh64_exclude_symbol): New.
* config/tc-sh64.h (md_parse_name): Pass on the function operand
to sh64_consume_datalabel.
(tc_symbol_new_hook): Define to tc_frob_symbol.
(TC_SYMFIELD_TYPE): Define to symbolS *.
(tc_frob_symbol): Define to call sh64_exclude_symbol.
2000-12-01  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (shmedia_init_reloc): Tweak comment for default
case.
(shmedia_md_assemble): Call dwarf2_generate_asm_lineno if
generating dwarf2 debug information.
2000-11-30  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (sh64_target_format): Use elf64-sh64l and
elf64-sh64 for the 64-bit ABI.
* config/tc-sh.c (md_show_usage): Tweak usage output for -abi=*
option.
2000-11-29  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh.c: Remove conditionalizing on HAVE_SH64 for
case-insensitivity.
2000-11-27  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c: Tweak comments, formatting and error messages.
(enum sh64_abi_values): New type.
(enum sh64_isa_values): New type.
(sh64_isa_mode): Replace shmedia_mode.	All referers changed.
(seen_shcompact_mode, seen_shmedia_mode): Delete.
(sh64_abi): Replace shmedia_64.
(shmedia_md_convert_frag) <C (MOVI_IMM_64, MOVI_64),
C (MOVI_IMM_32, MOVI_32)>: Correct register number handling.
(s_sh64_mode): Check validity for this target.
(sh64_target_format): Initialize defaults for ISA and ABI.
Fallback to old object format if no SH64 ISA or ABI has been
specified.
* config/tc-sh.c (md_parse_option): Check combinations for errors.
(sh_elf_final_processing): Change to have EF_SH64_ABI64 for 64-bit
ABI and EF_SH64 for 32-bit ABI, if SH64 options are specified.
* config/tc-sh64.h: Fix typo in comment.
2000-11-25  Hans-Peter Nilsson	<hpn@cygnus.com>
* config/tc-sh64.c (shmedia_md_estimate_size_before_relax)
<PT fixups for absolute values>: Size will be longest, not
shortest.
(shmedia_md_convert_frag): Disable PTB-warning machinery.  Correct
all MOVI and SHORI operand offsets in PT/PTA/PTB expansions.
* config/tc-sh.c (parse_reg) [HAVE_SH64]: Add local variables l0
and l1 to hold lowercase of two first characters.  Change all
remaining TO_LOWER to tolower.
* config/tc-sh64.c (TO_LOWER): Delete.
(shmedia_find_cooked_opcode): Use tolower, not TO_LOWER.
(md_parse_name): Define.
(sh64_consume_datalabel): Declare.
(DOLLAR_DOT): Define.
* config/tc-sh64.c (shmedia_parse_exp): New.
(sh64_consume_datalabel): New; just ignoring datalabel semantics.
(shmedia_parse_reg): Remove const from src
parameter.
(shmedia_get_operands): Ditto for args parameter and ptr variable.
(shmedia_md_assemble): Ditto for op_end variable.
(shmedia_get_operand): Ditto for ptr parameter and src variable.
Use shmedia_parse_exp, not parse_exp.
* config/tc-sh64.c (shmedia_parse_reg): Add shmedia_arg_type
parameter.  All callers changed.
(shmedia_get_operand): Add shmedia_arg_type parameter.	All
callers changed.
(shmedia_parse_reg): Put first two character in local variables.
Use tolower, not TO_LOWER.  If no register is found and argtype
indicates a control register, scan shmedia_creg_table
case-insensitive.
2000-11-24  Hans-Peter Nilsson	<hpn@cygnus.com>
* Makefile.am (CPU_TYPES): Add sh64.
(TARGET_CPU_CFILES): Add config/tc-sh64.c.
(TARGET_CPU_HFILES): Add config/tc-sh64.h.
Regenerate dependencies.
* Makefile.in: Regenerate.
* configure.in: Add support for sh64-*-elf*.
* configure: Regenerate.
* config/tc-sh64.h: New.
* config/tc-sh64.c: New.
* config/tc-sh.c (md_pseudo_table) [HAVE_SH64]: New pseudos
.mode, .isa and .uaquad.
[HAVE_SH64] (SH64PCREL16_32, SH64PCREL16_64, SH64PCREL16PT_32,
SH64PCREL16PT_64, MOVI_IMM_32, MOVI_IMM_64): Define.
[HAVE_SH64] (END): Define as 10.
[HAVE_SH64] (UNDEF_SH64PCREL, SH64PCREL16, SH64PCREL32,
SH64PCREL48, SH64PCREL64, UNDEF_MOVI, MOVI_16, MOVI_32, MOVI_48,
MOVI_64): Define.
[HAVE_SH64] (SH64PCREL16_F, SH64PCREL16_M, SH64PCREL16_LENGTH,
SH64PCREL32_F, SH64PCREL32_M, SH64PCREL32_LENGTH, SH64PCREL48_F,
SH64PCREL48_M, SH64PCREL48_LENGTH, SH64PCREL64_LENGTH,
MOVI_16_LENGTH, MOVI_32_LENGTH, MOVI_48_LENGTH, MOVI_64_LENGTH):
Define.
(md_relax_table) [HAVE_SH64]: Provide relaxations for SHmedia.
(md_begin) [HAVE_SH64]: Call shmedia_md_begin.
(parse_reg) [HAVE_SH64]: Parse register names case-insensitive.
(md_assemble) [HAVE_SH64]: Call shmedia_md_assemble if assembling
SHmedia instructions.  Handle state-change after switching to
SHcompact.
(md_longopts) [HAVE_SH64]: New options --isa=* and --abi=*.
(md_parse_option) [HAVE_SH64]: Parse new options.
(md_show_usage) [HAVE_SH64]: Show usage of new options.
(md_convert_frag) [HAVE_SH64] <default>: Call
shmedia_md_convert_frag instead of abort.
(sh_force_relocation) [HAVE_SH64]: Also force relocation for
BFD_RELOC_SH_SHMEDIA_CODE.
(sh_elf_final_processing) [HAVE_SH64]: Set flags identifying
SHcompact or SHmedia code.
(md_apply_fix) [HAVE_SH64] <default>: Return result from calling
shmedia_md_apply_fix instead of abort.
(md_estimate_size_before_relax) [HAVE_SH64] <default>: Return
result from calling shmedia_md_estimate_size_before_relax instead
of calling abort.
(sh_do_align) [HAVE_SH64]: If shmedia_mode, let shmedia_do_align
do the work.
(tc_gen_reloc) [HAVE_SH64]: For unrecognized relocs, call
shmedia_init_reloc and do nothing more if it returns non-zero.
(sh_finalize) [HAVE_SH64]: Call shmedia_md_end.
* po/POTFILES.in: Regenerate.
* po/gas.pot: Regenerate.
2002-02-08 06:32:23 +00:00
Alexandre Oliva 6b32719e57 * config/tc-sh.c (parse_at): Install the correct version of
2002-02-04's patch.
2002-02-06 06:26:14 +00:00
Alexandre Oliva ac3f04d7f1 * config/tc-sh.c (md_apply_fix3) <BFD_RELOC_32_PLT_PCREL>: Don't
assume fixP->fx_subsy is non-NULL.
2002-02-06 05:34:34 +00:00
Alexandre Oliva 7679ead9b5 * config/tc-sh.c (parse_at): Set arg type of @(expr,pc) to
A_DISP_PC only if it's an integral constant, and to
A_DISP_PC_ABS otherwise.
(get_specific): Accept A_DISP_PC_ABS where A_DISP_PC is
expected.
(build_Mytes): Mark PCRELIMM fix-ups as pc-relative only if
the operand type is not A_DISP_PC_ABS.
2002-02-04 12:29:15 +00:00
Hans-Peter Nilsson 5459d7a081 * config/tc-mmix.c (tc_gen_reloc): Don't try and take the value of
common and weak symbols.  Handle common and weak symbols as
	undefined symbols with regards to GREG handling and merging.
	(mmix_frob_file): Ditto.
2002-02-04 04:03:15 +00:00
Jason Thorpe 006336b8fe bfd:
* config.bfd (hppa*-*-netbsd*): New target.

gas:
* configure.in (hppa-*-netbsd*): New target.
* configure: Regenerate.
* config/tc-hppa.h: Also define WARN_COMMENTS if TE_NetBSD.

ld:
* Makefile.am (ALL_EMULATIONS): Add ehppanbsd.o.
(ehppanbsd.c): New rule.
* Makefile.in: Regenerate.
* configure.tgt (hppa*-*-netbsd*): New target.
* emulparams/hppalinux.sh: Add comment to check other files
that source this file it is modified, and list which
files that do.
* emulparams/hppanbsd.sh: New file.
2002-02-02 18:36:04 +00:00
Alan Modra 9e0665bc9a * config/tc-v850.c: Add missing prototypes amd use old-style
function definitions.
	(AREA_ZDA, AREA_SDA, AREA_TDA): Delete.
	(sdata_section tdata_section, zdata_section, sbss_section,
	tbss_section, zbss_section, rosdata_section, rozdata_section,
	scommon_section, tcommon_section, zcommon_section,
	call_table_data_section, call_table_text_section): Delete.
	(v850_sdata, v850_tdata, v850_zdata, v850_sbss, v850_tbss,
	v850_zbss, v850_bss, v850_rosdata, v850_rozdata,
	v850_call_table_data, v850_call_table_text): Delete.
	(struct v850_seg_entry): New.
	(v850_seg_table): New.
	(SDATA_SECTION TDATA_SECTION, ZDATA_SECTION, SBSS_SECTION,
	TBSS_SECTION, ZBSS_SECTION, BSS_SECTION, ROSDATA_SECTION,
	ROZDATA_SECTION, SCOMMON_SECTION, TCOMMON_SECTION, ZCOMMON_SECTION,
	CALL_TABLE_DATA_SECTION, CALL_TABLE_TEXT_SECTION): Define.
	(do_v850_seg): New.
	(v850_seg): New.
	(v850_comm): Use do_v850_seg and v850_seg_table.  Simplify
	recording of alignment.
	(md_pseudo_table): Use v850_seg.
	(md_begin): Don't init .call_table_data and .call_table_text here.
	Set v850_seg_table bss entry.
	* config/tc-v850.h (v850_pcrel_from_section): Prototype.

	* gas/elf/elf.exp: Don't special case v850.
2002-02-01 16:29:21 +00:00
Hans-Peter Nilsson 973eb3402f Support on-demand global register allocation by passing on
base-plus-offset relocs to the linker.
	* config/tc-mmix.c: Tweak and fix typos in comments.
 	(allocate_undefined_gregs_in_linker): New variable.
	(OPTION_LINKER_ALLOCATED_GREGS): New option macro.
	(md_longopts): Add --linker-allocated-gregs.
	(md_parse_option) <case 'x'>: Imply --linker-allocated-gregs.
	<case OPTION_LINKER_ALLOCATED_GREGS>: New.
	(md_show_usage): Update text for -x.  Add text for
	--linker-allocated-gregs.
	(tc_gen_reloc): Derive default value for addend from val and
	baddsy.  Use addsec and bfd_is_abs_section in more places.  Don't
	emit error for BFD_RELOC_MMIX_BASE_PLUS_OFFSET without suitable
	GREG if allocate_undefined_gregs_in_linker.
	* doc/as.texinfo (Overview) <Target MMIX options>: Add
	--linker-allocated-gregs.
	* doc/c-mmix.texi (MMIX-Opts): Add blurb about
	--linker-allocated-gregs.  Mention that it's implied by -x.
	(MMIX-Pseudos) <GREG>: Mention when and how a GREG can be omitted.
	(MMIX-mmixal): Clarify dated comparison and location of MMIXware.

	* config/tc-mmix.h (md_parse_name): Use ISUPPER, not isupper.
2002-02-01 08:09:47 +00:00
Nick Clifton 3b16e843f2 Add support for OpenRISC 32-bit embedded processor 2002-01-31 17:33:08 +00:00
Richard Sandiford 912a07db52 * config/tc-sh.c (parse_reg): Fix end-of-word check for is, ix, iy
and mod.
2002-01-30 18:25:30 +00:00
Chris Demetriou 4514d474ed 2002-01-29 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (tc_gen_reloc): Arrange for
        BFD_RELOC_PCREL_HI16_S relocations to be output relative to
        their LO16 parts, even for ELF.
2002-01-30 02:14:19 +00:00
Daniel Jacobowitz 246fcdee13 2002-01-29 Daniel Jacobowitz <drow@mvista.com>
* config/tc-i386.c: Protect definitions of true and false
        from redefinition.
2002-01-29 17:07:57 +00:00
Jakub Jelinek 00e6e13d12 * config/obj-elf.c (elf_frob_file_before_adjust): Remove symbols
made because of .weak, if they are neither defined nor used in any
	way.
2002-01-28 13:34:39 +00:00
Kazu Hirata 166e23f998 * config/tc-h8300.c (check_operand): Don't print a warning
when a valid 24-bit address is given to a 16-bit address
	operand.
2002-01-24 18:22:06 +00:00
Alexandre Oliva aae6ddf936 copyright years 2002-01-24 02:59:16 +00:00
Alexandre Oliva 538cd60fbb * config/tc-sh.c (sh_elf_suffix): Removed.
(sh_PIC_related_p, sh_check_fixup, sh_cons_fix_new,
sh_end_of_match, sh_parse_name): New functions.
(sh_elf_cons): Simplify.
(parse_exp): Reject misplaced PIC operands.
(md_undefined_symbol): Simplify.
(sh_fix_adjustable): Let @GOTOFF be adjusted.
(md_apply_fix3): Write @PLT and @GOTOFF addends in place.
(tc_gen_reloc): Move fixp subsy absolute value into addnumber.
Complain if subsy remains at the end.
* config/tc-sh.h (sh_parse_name, sh_cons_fix_new): Declare.
(md_parse_name, TC_CONS_FIX_NEW, O_PIC_reloc): Define.
2002-01-24 02:54:47 +00:00
Alexandre Oliva b386f24b4a * config/tc-mn10300.c (xr_registers): Move `pc'...
(other_registers): ... here.
2002-01-23 01:52:18 +00:00
DJ Delorie 23deb9235a * config/obj-coff.c (obj_coff_init_stab_section): Make the
stabstr_name allocation permanent, as it will be referenced from
the section hash.
2002-01-22 01:09:49 +00:00
Richard Earnshaw 63e63b07a2 * tc-arm.c (do_xsc_mia, do_xsc_mar, do_xsc_mra): Renamed from
do_mia, do_mar and do_mra respectively.
(do_mav_*): Renamed from do_c_*.
(mav_reg_required_here, mav_parse_offset): Renamed from
cirrus_reg_required_here and cirrus_parse_offset respectively.
(MAV_MODE?): Renamed from CIRRUS_MODE?.
2002-01-19 14:52:01 +00:00
Richard Earnshaw ea6ef066f8 2002-01-18 Richard Earnshaw <rearnsha@arm.com>
Keith Walker  <keith.walker@arm.com>
* tc-arm.c (ARM_EXT_V5J, ARM_ARCH_V5TEJ): Define.
(insns): Add pattern for bxj instruction.
(do_bxj): New function.
(arm_cpus): Add arm926ej.
(arm_archs): Add armv5tej.

Testsuite:
2002-01-18  Richard Earnshaw  <rearnsha@arm.com>
	    Keith Walker  <keith.walker@arm.com>
* gas/arm/arch5tej.s gas/arm/arch5tej.d: New files.
* gas/arm/arm.exp (arch5tej): New dump test.
2002-01-19 14:25:48 +00:00
Richard Earnshaw d193a22afe 2002-01-19 Keith Walker <keith.walker@arm.com>
* tc-arm.c (arm_fpus): Add fpe2 and fpe3.
2002-01-19 12:44:34 +00:00
Richard Earnshaw 03b1477f5d * NEWS: Mention new ARM command-line options and VFP support.
* config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE.  All
uses changed.
(ARM_CEXT_MAVERICK): Similarly.
(ARM_ANY): Now means any core instruction.
(CPU_DEFAULT): Default to ARM_ANY.
(uses_apcs_26, atcps, support_interwork, uses_apcs_float)
(pic_code): Declare for all object types.  Make type int.
(legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
(march_fpu_opt, mfpu_opt): Declare.
(md_longopts): Tidy up conditional definitions.
(arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
(arm_long_opts): New tables.
(arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
(arm_parse_extension): New function.
(md_parse_option): Rewrite using new table-driven system.
(md_show_usage): Use new table-driven system.
(md_begin): Calculate cpu_variant from command line option data.
* doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
command-line options.
* doc/c-arm.texi: Likewise.

Testsuite:
* gas/arm/vfp1.d: Use new command-line options.
* gas/arm/vfp1xD.d: Likewise.
* gas/arm/arm.exp (vfp-bad): Likewise.
* gas/arm/maverick.d: Likewise.
2002-01-18 17:01:55 +00:00
Timothy Wall b1ffc25745 Add a more instructive error message on bad syntax 2002-01-17 17:41:24 +00:00
Thiemo Seufer 394f9b3adb * config/tc-mips.c (percent_op): Ensure longer percent_op's are
matched before the shorter ones.
	(my_getSmallParser): Fix handling of nested parentheses in
	percent_op's. Code cleanup.
	(my_getPercentOp): New function, code from my_getSmallParser.
	(my_getSmallExpression): Fix handling of closing parentheses.
	Code cleanup. Better comments.
2002-01-16 21:30:47 +00:00
Richard Earnshaw bfae80f222 Support for VFP instructions
* tc-arm.c (CP_WB_OK, CP_NO_WB): New defines.
(cp_address_required_here): New argument wb_ok.  When false, do not
accept write-back forms of addressing.  Change all callers.
(FPU_VFP_EXT_NONE, FPU_VFP_EXT_V1xD, FPU_VFP_VFP_V1)
(FPU_VFP_EXT_V2): Define.
(FPU_ARCH_VFP, FPU_ARCH_VFP_V1xD, FPU_ARCH_VFP_V1, FPU_ARCH_VFP_V2):
Define in terms of above.
(vfp_dp_reg_pos, vfp_sp_reg_pos, vfp_ldstm_type): New enums.
(vfp_reg): New struct.
(vfp_regs): New array of registers.
(insns): Add VFP instructions.
(sn_table): New array of VFP single-precision register names.
(dn_table): New array of VFP double-precision register names.
(all_reg_maps): Add the new register tables.
(arm_reg_type): Add new values for above.  Increase RET_TYPE_MAX.
(vfp_sp_reg_required_here, vfp_dp_reg_required_here, do_vfp_sp_monadic)
(do_vfp_dp_monadic, do_vfp_sp_dyadic, do_vfp_dp_dyadic)
(do_vfp_reg_from_sp, do_vfp_sp_reg2, do_vfp_sp_from_reg)
(do_vfp_reg_from_dp, do_vfp_reg2_from_dp, do_vfp_dp_from_reg)
(do_vfp_dp_from_reg2, vfp_psr_parse, vfp_psr_required_here)
(do_vfp_reg_from_ctrl, do_vfp_ctrl_from_reg, do_vfp_sp_ldst)
(do_vfp_dp_ldst, vfp_sp_reg_list, vfp_dp_reg_list, vfp_sp_ldstm)
(vfp_dp_ldstm, do_vfp_sp_ldstmia, do_vfp_sp_ldstmdb, do_vfp_ldstmia)
(do_vfp_dp_ldstmdb, do_vfp_xp_ldstmia, do_vfp_xp_ldstmdb)
(do_vfp_sp_compare_z, do_vfp_dp_compare_z, do_vfp_dp_sp_cvt)
(do_vfp_sp_dp_cvt): New functions.
(md_begin): Set soft-float flag for appropriate VFP work.
(md_atof): Handle VFP-format doubles.
(md_parse_option): Handle VFP command-line options.
(md_show_usage): Display VFP command-line options.

* testsuite/gas/arm/vfp1.s gas/arm/vf1.d: New files.
* testsuite/gas/arm/vfp1xD.s gas/arm/vf1xD.d: New files.
* testsuite/gas/arm/vfp-bad.s gas/arm/vfp-bad.l: New files.
* testsuite/gas/arm/arm.exp: Run new VFP tests.
2002-01-15 16:05:34 +00:00
Richard Earnshaw fcd6d8d6b7 * tc-arm.c (md_parse_option): Tidy up setting of cpu_variant for
various command line options.
2002-01-15 14:43:09 +00:00
Nick Clifton 1f7fd47891 Fix up generation of VTINHERIT relocs 2002-01-15 11:58:45 +00:00
Richard Earnshaw 21f0f23a55 * tc-arm.c (md_longopts): On targets that aren't bi-endian, support
the -EL/-EB option that matches the target's endianness.
(md_parse_option): Likewise.
2002-01-14 17:37:23 +00:00
Richard Earnshaw ce058b6cfb * tc-arm.c (md_longopts): Fix misplaced #endif -- the -oabi option
is not dependent on ARM_BI_ENDIAN.
2002-01-14 15:36:30 +00:00
Richard Earnshaw f03698e661 * tc-arm.c (all error messages): Normalize capitalization of messages.
* tc-arm.h (md_operand): Delete define.
* tc-arm.c (in_my_get_expression): New static variable.
(my_get_expression): Set and clear it.
(md_operand): New function.  If called from my_get_expression
put the error in inst.error.
(output_inst): Now takes argument of instruction being assembled.
Print it out with any error message.
(do_ldst, do_ldstv4, thumb_load_store): Fault attempt to use a store
with '=' syntax.
(end_of_line): Don't update inst.error if it is already set.
2002-01-14 15:01:04 +00:00
Richard Earnshaw e28cd48c21 * tc-arm.c ((do_ldst): Fix handling an immediate expression pseudo
op that can be translated into a mvn instruction.

* gas/arm/ldconst.s gas/arm/ldconst.d: New files.  Test ldr with
immediate pseudo-operations.
* gas/arm/arm.exp: Run it.
2002-01-11 18:00:17 +00:00
Nick Clifton 1cd8ff3882 Add support for ia64-hpux target. 2002-01-11 09:27:39 +00:00
Richard Earnshaw 6c43fab6fb * tc-arm.c (struct reg_entry): Move before prototypes.
(int_register, cp_register, fp_register): Delete.
(reg_table): Delete.  Replaced with ...
(rn_table, cp_table, cn_table, fn_table, mav_mvf_table)
(mav_mvd_table, mav_mvfx_table, mav_mvdx_table, mav_mvax_table)
(mav_dspsc_table): ... one table per register set.
(arm_reg_hsh): Delete.
(struct reg_map): New structure.
(all_reg_maps): New array.
(enum arm_reg_type): New enums.
(build_reg_hsh): New function.
(insert_reg_alias): Use hash table passed by caller.  Adjust all
callers.
(create_register_alias): New function, split out from ...
(md_assemble): ... here.
(md_begin): Build new register hash tables.
(arm_reg_parse): New argument for the hash table to search.  Adjust all
callers.
(arm_reg_parse_any): New function.
(co_proc_number): Look up the processor number in the processor hash
table.
(cirrus_regtype): Delete.
(cirrus_register, cirrus_mvf_register, cirrus_mvd_register)
(cirrus_mvfx_register, cirrus_mvdx_register, cirrus_mvax_register)
(ARM_EXT_MAVERICKsc_register): Delete.
(do_c_binops_1, do_c_binops_2, do_c_binops_3): Delete.
(do_c_binops_1[a-o], do_c_binops_2[a-c], do_c_binops_3[a-d]): New
functions.
(do_c_triple_4, do_c_triple_5): Delete.
(do_c_triple_4[ab], do_c_triple_5[a-h]): New functions.
(do_c_quad_6): Delete.
(do_c_quad_6[ab]): New functions.
(do_c_binops, do_c_triple, do_c_quad, do_c_shift, do_c_ldst): Rework
arguments to use new register parsing methods.
(cirrus_reg_required_here): Likewise.
(insns): Reclassify cirrus maverick worker functions.
(cirrus_valid_reg): Delete.
2002-01-10 11:47:35 +00:00
Jason Thorpe 8d05742ff6 bfd:
* Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
(BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
(elf32-sh-nbsd.lo): New rule.
* Makefile.in: Regenerate.
* config.bfd (sh*le-*-netbsdelf*): New target.
(sh*-*-netbsdelf*): New target.
* configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
(bfd_elf32_shnbsd_vec): New vector.
(bfd_elf32_shlnbsd_vec): New vector.
* configure: Regenerate.
* elf32-sh-nbsd.c: New file.
* targets.c: Update copyright years.
(_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
bfd_elf32_shnbsd_vec.

gas:
* configure.in (sh*le): Set cpu_type=sh and endian=little.
(sh*-*-netbsdelf*): New target.
* configure: Regenerate.
* tc-sh.h: Update copyright years.
(TARGET_FORMAT): Add version for TE_NetBSD.

ld:
* Makefile.am (ALL_EMULATIONS): Add eshelf_nbsd.o and eshlelf_nbsd.o.
(eshelf_nbsd.c): New rule.
(eshlelf_nbsd.c): New rule.
* Makefile.in: Regenerate.
* configure.tgt (sh*le-*-netbsdelf*): New target.
(sh*-*-netbsdelf*): New target.
* emulparams/shelf.sh: Document that shelf_nbsd.sh sources this file.
* ld/emulparams/shelf_nbsd.sh: New emulation.
* ld/emulparams/shlelf_nbsd.sh: New emulation.
2002-01-08 04:23:02 +00:00
Alan Modra d7861ad2a5 * config/tc-m68k.h (md_prepare_relax_scan): Rewrite.
* config/tc-m68k.c (md_relax_table): Add md_prepare_relax_scan comment.
2002-01-06 12:15:45 +00:00
Daniel Jacobowitz 7a62114442 2002-01-05 Daniel Jacobowitz <drow@mvista.com>
* tc-mips.c (mips_cprestore_valid): New flag.
        (mips_frame_reg_valid): New flag.
        (macro) [M_JAL_2]: Check both flags.
        [M_JAL_A]: Likewise.
        (s_cprestore): Set mips_cprestore_valid.
        (tc_get_register): If setting mips_frame_reg, set
        mips_frame_reg_valid and clear mips_cprestore_valid.
        (s_mips_ent): Clear both flags.
        (s_mips_end): Clear both flags.

2002-01-05  Daniel Jacobowitz  <drow@mvista.com>

        * gas/mips/jal-svr4pic.s: Add .ent and .frame directives.
        * gas/mips/mips-abi32-pic.s: Add .frame directive.
        * gas/mips/mips-gp32-fp32-pic.s: Likewise.
        * gas/mips/mips-gp32-fp64-pic.s: Likewise.
        * gas/mips/mips-gp64-fp32-pic.s: Likewise.
        * gas/mips/mips-gp64-fp64-pic.s: Likewise.
2002-01-05 19:06:52 +00:00
Alan Modra 7c6beb6988 * write.c (write_object_file): Make use of bfd_section_list_remove.
* config/obj-ecoff.c (ecoff_frob_file): Likewise.
	* config/tc-mmix.c (mmix_frob_file): Likewise.
2002-01-05 13:13:18 +00:00
Matthew Green a09cf9bd77 [gas/ChangeLog]
* config/tc-ppc.c (md_parse_option): BookE is not Motorola specific.

[include/opcode/ChangeLog]
* ppc.h (PPC_OPCODE_BOOKE): BookE is not Motorola specific.
(PPC_OPCODE_BOOKE64): Likewise.
2002-01-03 02:07:19 +00:00
Nick Clifton 23b7f870fb Test for a NULL frag link. 2002-01-02 17:19:07 +00:00
Richard Henderson cb5301b617 * config/tc-ia64.c (has_suffix_p): New.
(note_register_values): Use it instead of strstr.
2002-01-01 01:18:17 +00:00
Richard Henderson 86cf98f345 * config/tc-ia64.c (errata_nop_necessary_p): Prototype.
(make_unw_section_name): Constify local variables.
2002-01-01 01:16:44 +00:00
Jeff Law 1d358ee0cc * config/tc-hppa.c (pa_ip): Handle new 'c' mode completers,
'X', 'M', and 'A'.
2001-12-31 23:47:02 +00:00
Jakub Jelinek bd5e6e7e3a * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix dst_mask for
R_SPARC_DISP32.  Support R_SPARC_PLT32.
	(sparc_reloc_map): Add BFD_RELOC_16_PCREL and BFD_RELOC_SPARC_PLT32.
	(elf32_sparc_check_relocs): Handle R_SPARC_PLT32.
	(elf32_sparc_relocate_section): Likewise.
	* elf64-sparc.c (sparc64_elf_howto_table): Fix dst_mask for
	R_SPARC_DISP32.  Support R_SPARC_PLT32 and R_SPARC_PLT64.
	(sparc_reloc_map): Add BFD_RELOC_16_PCREL, BFD_RELOC_64_PCREL
	and BFD_RELOC_SPARC_PLT32.
	(sparc64_elf_check_relocs): Handle R_SPARC_PLT32 and R_SPARC_PLT64.
	(sparc64_elf_relocate_section): Likewise.
	* reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SPARC_PLT32.
	* bfd-in2.h, libbfd.h: Rebuilt.

	* config/tc-sparc.h (TC_PARSE_CONS_EXPRESSION): Define.
	(sparc_cons): Provide prototype.
	* config/tc-sparc.c (tc_gen_reloc): Handle BFD_RELOC_*_PCREL and
	BFD_RELOC_SPARC_PLT{32,64}.  Enumerate for which relocs
	reloc->addend = fixp->fx_addnumber shouldn't be done instead of
	enumarating for which pc relative ones it should be done.
	(sparc_cons_special_reloc): New variable.
	(sparc_cons): New function.
	(cons_fix_new_sparc): Use sparc_cons_special_reloc.
	* testsuite/gas/sparc/pcrel.s: New test.
	* testsuite/gas/sparc/pcrel.d: Expected output.
	* testsuite/gas/sparc/pcrel64.s: New test.
	* testsuite/gas/sparc/pcrel64.d: Expected output.
	* testsuite/gas/sparc/plt.s: New test.
	* testsuite/gas/sparc/plt.d: Expected output.
	* testsuite/gas/sparc/plt64.s: New test.
	* testsuite/gas/sparc/plt64.d: Expected output.
	* testsuite/gas/sparc/sparc.exp: Add pcrel, pcrel64, plt and plt64
	tests.
2001-12-21 22:35:24 +00:00
Daniel Jacobowitz a8e8e86325 2001-12-20 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
Daniel Jacobowitz <drow@mvista.com>

        * config/tc-mips.c (file_mips_gp32): Initialize to invalid value.
        (file_mips_fp32): Likewise.
        (md_begin): Compatibility handling for -mipsN option.
2001-12-20 21:11:26 +00:00
Alexandre Oliva 8d4d84c202 * config/tc-sh.c (parse_at): Reject @(r0) and @(r0,). 2001-12-20 17:28:13 +00:00
Matthew Green 8a5886591d * config/tc-ppc.c (md_parse_option): Make -maltivec default
to generating PowerPC instructions.
2001-12-20 07:34:44 +00:00
Nick Clifton 2d9069a43f Remove redundant definition. 2001-12-18 14:35:34 +00:00
Richard Henderson 84b229ef24 * config/tc-alpha.c (alpha_handle_align): Encode unop with RB as $sp. 2001-12-18 00:24:47 +00:00
Alan Modra f91fafbd30 * config/obj-elf.c (obj_elf_init_stab_section): References are
kept to section name strings.  Don't alloca them!
2001-12-14 15:53:11 +00:00
Alexandre Oliva 8c0392a98a * config/tc-d10v.c (get_operands): Mark OPERAND_PLUS after
OPERAND_ATSIGN as O_absent.
2001-12-12 07:32:47 +00:00
Geoffrey Keating 93fbbb04b8 Index: bfd/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>
	    Corinna Vinschen  <vinschen@redhat.com>

	* Makefile.am: Add support for xstormy16.
	* archures.c: Add support for xstormy16.
	* config.bfd: Add support for xstormy16.
	* configure.in: Add support for xstormy16.
	* reloc.c: Add support for xstormy16.
	* targets.c: Add support for xstormy16.
	* cpu-xstormy16.c: New file.
	* elf32-xstormy16.c: New file.
	* Makefile.in: Regenerated.
	* bfd-in2.h: Regenerated.
	* configure: Regenerated.
	* libbfd.h: Regenerated.

Index: binutils/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>

	* readelf.c (guess_is_rela): Add support for stormy16.
	(dump_relocations): Likewise.
	(get_machine_name): Likewise.

Index: gas/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	* configure.in: Add support for xstormy16.
	* configure: Regenerated.
	* Makefile.am: Add support for xstormy16.
	* Makefile.in: Regenerated.
	* config/tc-xstormy16.c: New file.
	* config/tc-xstormy16.h: New file.

Index: gas/testsuite/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    matthew green  <mrg@redhat.com>

	* gas/xstormy16/allinsn.d: New file.
	* gas/xstormy16/allinsn.exp: New file.
	* gas/xstormy16/allinsn.s: New file.
	* gas/xstormy16/allinsn.sh: New file.
	* gas/xstormy16/gcc.d: New file.
	* gas/xstormy16/gcc.s: New file.
	* gas/xstormy16/gcc.sh: New file.
	* gas/xstormy16/reloc-1.d: New file.
	* gas/xstormy16/reloc-1.s: New file.
	* gas/xstormy16/reloc-2.d: New file.
	* gas/xstormy16/reloc-2.s: New file.

Index: ld/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	* Makefile.am: Add support for xstormy16.
	* configure.tgt: Add support for xstormy16.
	* Makefile.in: Regenerate.
	* emulparams/elf32xstormy16.sh: New file.
	* scripttempl/xstormy16.sc: New file.

Index: opcodes/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>

	* Makefile.am: Add support for xstormy16.
	* Makefile.in: Regenerate.
	* configure.in: Add support for xstormy16.
	* configure: Regenerate.
	* disassemble.c: Add support for xstormy16.
	* xstormy16-asm.c: New generated file.
	* xstormy16-desc.c: New generated file.
	* xstormy16-desc.h: New generated file.
	* xstormy16-dis.c: New generated file.
	* xstormy16-ibld.c: New generated file.
	* xstormy16-opc.c: New generated file.
	* xstormy16-opc.h: New generated file.

Index: include/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>

	* dis-asm.h (print_insn_xstormy16): Declare.

Index: include/elf/ChangeLog
2001-12-07  Geoffrey Keating  <geoffk@redhat.com>
	    Richard Henderson  <rth@redhat.com>

	* common.h (EM_XSTORMY16): Define.
	* xstormy16.h: New file.
2001-12-08 03:46:03 +00:00
Richard Earnshaw f2b7cb0a5f * tc-arm.c (do_arit, do_cmp, do_mov, do_ldst, do_ldstt, do_ldmstm)
(do_branch, do_swi, do_adr, do_adrl, do_empty, do_mul, do_mla)
(do_swap, do_msr, do_mrs, do_mull, do_ldstv4, do_bx, do_blx)
(do_bkpt, do_clz, do_lstc2, do_cdp2, do_co_reg2, do_smla, do_smlal)
(do_smul, do_qadd, do_pld, do_ldrd, do_co_reg2c, do_cdp, do_lstc)
(do_co_reg, do_fpa_ctrl, do_fpa_ldst, do_fpa_ldmstm, do_fpa_monadic)
(do_fpa_dyadic, do_fpa_cmp, do_fpa_from_reg, do_fpa_to_reg, do_mia)
(do_mar, do_mra, do_c_binops, do_c_binops_1, do_c_binops_2)
(do_c_binops_3, do_c_triple, do_c_triple_4, do_c_triple_5, do_c_quad)
(do_c_quad_6, do_c_dspsc, do_c_dspsc_1, do_c_dspsc_2, do_c_shift)
(do_c_shift_1, do_c_shift_2, do_c_ldst, do_c_ldst_1, do_c_ldst_2)
(do_c_ldst_3, do_c_ldst_4, do_branch25): Delete redundant argument,
FLAGS.
(struct asm_opcode): Adjust parms field accordingly.
(md_assemble): Don't pass dummy second argument when calling worker
functions.
(build_arm_ops_hsh): Add prototype
(BAD_FLAGS): Delete.
2001-12-06 10:23:20 +00:00
Richard Earnshaw 90e4755aee * tc-arm.c (struct asm_opcode): Delete comp_suffix and flags. Add
cond_offset.  Rename variants->variant.
(insns): Adjust for new format.  Explicitly code each variant that
takes flags.  Remove temporary instructions.
(struct arm_it): Remove redundant field suffix.
(s_flag, ldr_flags, str_flags, byte_flag, cmp_flags, ldm_flags)
(stm_flags, lfm_flags, sfm_flags, round_flags, fix_flags, except_flag)
(long_flag): Delete.
(struct asm_flg): Delete.
(LONGEST_INST): Delete.
(V4_STR_BIT): Define.
(struct thumb_opcode): Rename variants->variant.
(do_empty): Renamed from do_nop.
(ldst_extend): Delete argument hwse.  Split code for half-word and
signed byte instructions to ...
(ldst_extend_v4): ... here.
(ld_mode_required_here): Use ldst_extend_v4.
(do_ldrd): Simplify now that this is only called for ldrd.  No
need to test for XScale, which was wrong anyway.  Don't reject r12
as a target register.  Add test that ldrd doesn't update an index
register.
(do_pld): Don't allow post-indexed or write-back addressing modes.
Adjust call to ldst_extend.
(do_adr): Split code for adrl to ...
(do_adrl): ... here.
(do_cmp): No need to fold in COND_BIT.
(do_ldst): Simplify.  Split code for ldrt/strt into do_ldstt.  Split
code to handle half-word and signed byte instructions to ...
(do_ldstv4): ... here.
(do_ldstt): New function.  Handle load/store with translate.
(do_ldmstm): Write feature modification bits directly into
inst.instruction.
(do_fpa_ldst): Remove suffix handling code.
(do_fpa_dyadic, do_fpa_monadic, do_fpa_from_reg): Likewise.
(do_fpa_ldmstm): Type of access is now held in inst.instruction.
(build_arm_ops_hsh): New function.
(md_begin): Call it.  Don't build the ARM opcode directly.
(md_assemble): Simplify ARM instruction handling.
2001-12-05 11:59:26 +00:00
Nick Clifton 006299d307 Corrected incorrect op->type selection due to missing 'else'. 2001-12-05 09:52:32 +00:00
Alexandre Oliva c2c607a488 * config/tc-d10v.c (write_2_short): Don't skip dummy fixups, so
that we can tell which operand refers to the insn put in the L
container and mark it as such, so that the relocation type can be
adjusted.
2001-12-04 17:30:43 +00:00
Thiemo Seufer 956cd1d64d * config.bfd: Remove trailing blanks.
* elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
	* strings.c (get_char): Initialize value.
	* config/tc-mips.c (mips_cpreturn_offset): Better comment.
	(load_register): Better error message. Cast away signedness
	mismatches. Add casts needed for varargs.
	(load_address): Replace checks of HAVE_64BIT_ADDRESS with dbl.
	Remove superfluous casts.
	(macro): Cast away signedness mismatches. Remove superfluous casts.
	(s_cpload): Fix wrong comment.
	(s_mips_weakext): Standardize output message.
	(get_number): Likewise.
2001-12-04 14:38:48 +00:00
Thiemo Seufer 7496292d88 * config/tc-mips.c (append_insn): Add jump address range overflow
check.
2001-12-04 14:05:54 +00:00
Thiemo Seufer 34ba82a8bb * config/tc-mips.c (md_parse_option): Fix comment. Allow -mabi option
for ELF only.
	(show): Document -mabi option.
2001-12-04 13:27:56 +00:00
Nick Clifton 8350bcd967 Only clear cpu part when specifying 'xscale' cpu (don't change the fpu part) 2001-12-04 11:28:29 +00:00
Alexandre Oliva 461448d855 * config/tc-d10v.c (find_opcode): Reject SP operand if
OPERAND_NOSP flag is present.
2001-12-04 10:07:03 +00:00
Eric Christopher d11008e15f 2001-12-03 Eric Christopher <echristo@redhat.com>
* config/tc-mips.c (tc_gen_reloc): One missed BFD_RELOC_MIPS_GPREL.
2001-12-04 00:51:33 +00:00
Thiemo Seufer cdf6fd85e6 * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
	* pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
	* elf32-mips.c (mips_reloc_map): Likewise. Replace
	BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
	* elf64-mips.c (mips_reloc_map): Likewise.
	* reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
	(BFD_RELOC_MIPS_GPREL32): Remove.
	* config/tc-mips.c (macro_build): Replace BFD_RELOC_MIPS_GPREL
	by BFD_RELOC_GPREL16.
	(load_address): Likewise.
	(macro): Likewise.
	(md_apply_fix): Likewise. Replace BFD_RELOC_MIPS_GPREL32 by
	BFD_RELOC_GPREL32.
	(s_gpword): Replace BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
	(tc_gen_reloc): Replace BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
	*config/tc-mips.h: Replace BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
2001-12-02 13:14:48 +00:00
Alexandre Oliva 3543a2f195 * config/tc-d10v.c (get_operands): Emit OPERAND_PLUS for
prefix `+'.
2001-11-29 18:23:11 +00:00
Alexandre Oliva 55aa1bc40b * config/tc-d10v.c (find_opcode): Reject non-SP operand if
flags requires SP.
2001-11-29 18:04:12 +00:00
Nick Clifton 1000a02a29 Remove case sensitivity in register names. 2001-11-29 09:41:34 +00:00
Jakub Jelinek f7460f5f76 * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
(elf64_alpha_relocate_section): Translate local_got_entries
	for STT_SECTION symbol to SHF_MERGE section the first time
	we see it.
	* elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
	sec_merge_done.
	(get_local_sym_hash): New, extracted from get_dyn_sym_info.
	(get_dyn_sym_info): Use it.
	(elfNN_ia64_relocate_section): Translate local dyn entries
	for STT_SECTION symbol to SHF_MERGE section the first time
	we see it.

        * write.c (adjust_reloc_syms): Mark SEC_MERGE symbols as used
        in reloc if it has non-zero addend.
        * config/tc-alpha.c (tc_gen_reloc): Reinstall SEC_MERGE check.
        * config/tc-sparc.c (md_apply_fix3): Likewise.
2001-11-28 19:15:14 +00:00
Andreas Schwab acebd4ce9d * as.c (parse_args): Call md_after_parse_args if defined.
* config/tc-ia64.h (md_after_parse_args): Define.
	* config/tc-ia64.c (ia64_after_parse_args): Reject --gstabs.
	* doc/internals.texi (CPU backend): Document md_after_parse_args.
2001-11-28 17:00:46 +00:00
Jakub Jelinek f8df10f4f5 * elf.c (_bfd_elf_rela_local_sym): New.
* elflink.h (elf_link_input_bfd): Don't consider empty
	merged sections as removed in relocation tests.
	* elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
	* elf32-i386.c (elf_i386_relocate_section): Handle relocs
	against STT_SECTION symbol of SHF_MERGE section.
	* elf32-arm.h (elf32_arm_relocate_section): Likewise.
	* elf32-avr.c (elf32_avr_relocate_section): Call
	_bfd_elf_rela_local_sym.
	* elf32-cris.c (cris_elf_relocate_section): Likewise.
	* elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
	* elf32-fr30.c (fr30_final_link_relocate): Likewise.
	* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
	* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
	* elf32-i370.c (i370_elf_relocate_section): Likewise.
	* elf32-i860.c (elf32_i860_relocate_section): Likewise.
	* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
	* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
	* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
	* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
	* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
	* elf32-s390.c (elf_s390_relocate_section): Likewise.
	* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
	* elf32-v850.c (v850_elf_relocate_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elf64-mmix.c (mmix_elf_relocate_section): Likewise.
	* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
	* elf64-s390.c (elf_s390_relocate_section): Likewise.
	* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
	* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
	* elf-hppa.h (elf_hppa_relocate_section): Likewise.
	* elf-m10200.c (mn10200_elf_relocate_section): Likewise.
	* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
	* elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
	* elf32-sh.c (sh_elf_relocate_section): Likewise for
	!partial_inplace relocs. Handle relocs against STT_SECTION
	symbol of SHF_MERGE for partial_inplace relocs.

	* config/tc-alpha.c (tc_gen_reloc): Remove SEC_MERGE test.
	* write.c (adjust_reloc_syms): Don't handle relocs against
	SEC_MERGE section symbols specially.
	(fixup_segment): Likewise.
2001-11-23 12:17:21 +00:00
Richard Sandiford add55e1f31 * config/tc-mips.c (mips_need_elf_addend_fixup): New, extracted from...
(md_apply_fix3): ...here.  Don't prevent the symbol value being
	subtracted twice from GPREL addends.
	(tc_gen_reloc): Add the symbol value to a GPREL addend if it was
	subtracted by the previous function.
2001-11-21 11:24:13 +00:00
Nick Clifton a6567fe028 Fix md_apply_fix3 typo. 2001-11-20 09:33:49 +00:00
Ben Elliston f021c2a7b7 2001-11-20 Ben Elliston <bje@redhat.com>
* config/tc-m88k.c (md_apply_fix3): Match local variable `val' to
	 usage after md_apply_fix3 cleanups.
2001-11-20 03:33:30 +00:00
Hans-Peter Nilsson 920e417765 Fix typo in comment in last commit 2001-11-17 18:51:15 +00:00
Hans-Peter Nilsson 451a1fc524 * config/tc-cris.c (md_apply_fix3): Cast value, not pointer, in
val assignment.
2001-11-17 18:39:03 +00:00
Alan Modra bbe8ef22ff * config/tc-m68k.c (md_apply_fix3): Change val back to a signed type. 2001-11-16 09:34:28 +00:00
H.J. Lu e0ac8af02a 2001-11-15 H.J. Lu <hjl@gnu.org>
* config/tc-hppa.c (md_apply_fix3): Fix a typo.
2001-11-16 07:27:59 +00:00
H.J. Lu 5ce56ab925 2001-11-15 H.J. Lu <hjl@gnu.org>
* config/tc-alpha.c (md_apply_fix3): Fix a typo.
2001-11-16 07:17:12 +00:00
Nick Clifton 94f592af1b Update all uses of md_apply_fix to use md_apply_fix3. Make it a void function. 2001-11-15 21:29:00 +00:00
Alan Modra a847613f74 * config/tc-i386.h (md_end): Define.
(i386_elf_emit_arch_note): Declare.
	(CpuUnknown): Delete.
	* config/tc-i386.c (default_arch): Constify.
	(smallest_imm_type): Remove CpuUnknown test.
	(md_assemble): Don't bother checking cpu_arch_flags non-zero.
	(i386_elf_emit_arch_note): New function.
2001-11-15 13:19:46 +00:00
Thiemo Seufer 645dc66c72 * config/tc-mips.c (mips_ip): Re-allow %hi() op for non-ELF assembler. 2001-11-15 09:50:00 +00:00
Alan Modra 802a735ed9 binutils/ChangeLog
* doc/binutils.texi (objdump): Document ppc -M options.
gas/ChangeLog
	* config/tc-ppc.c (ppc_insert_operand): Pass (ppc_cpu | ppc_size)
	to operand->insert.
	(md_assemble): Likewise.
gas/testsuite/ChangeLog
	* gas/ppc/booke.d: Modify reloc and target matches for powerpc64.
include/opcode/ChangeLog
	* ppc.h (struct powerpc_operand <insert, extract>): Add dialect param.
opcodes/ChangeLog
	* ppc-opc.c (PPC64): Revert 2001-10-12. Do include PPC_OPCODE_PPC.
	(insert_bat, extract_bat, insert_bba, extract_bba,
	insert_bd, extract_bd, insert_bdm, extract_bdm,
	insert_bdp, extract_bdp, valid_bo,
	insert_bo, extract_bo, insert_boe, extract_boe,
	insert_ds, extract_ds, insert_de, extract_de,
	insert_des, extract_des, insert_li, extract_li,
	insert_mbe, extract_mbe, insert_mb6, extract_mb6,
	insert_nb, extract_nb, insert_nsi, extract_nsi,
	insert_ral, insert_ram, insert_ras,
	insert_rbs, extract_rbs, insert_sh6, extract_sh6,
	insert_spr, extract_spr, insert_tbr, extract_tbr): Add dialect param.
	(extract_bd, extract_bdm, extract_bdp,
	extract_ds, extract_des,
	extract_li, extract_nsi): Implement sign extension without conditional.
	(insert_bdm, extract_bdm,
	insert_bdp, extract_bdp, valid_bo): Handle 64 bit branch hints.
	(extract_bdm, extract_bdp): Correct 32 bit validation.
	(AT1_MASK, AT2_MASK): Define.
	(BBOAT_MASK): Define.
	(BBOATCB_MASK, BBOAT2CB_MASK, BBOATBI_MASK): Define.
	(BOFM64, BOFP64, BOTM64, BOTP64): Define.
	(BODNZM64, BODNZP64, BODZM64, BODZP64): Define.
	(PPCCOM32, PPCCOM64): Define.
	(powerpc_opcodes): Modify existing 32 bit insns with branch hints
	and add new patterns to implement 64 bit branches with hints.  Move
	booke instructions so they match before ppc64.
	* ppc-dis.c (powerpc_dialect): Set PPC_OPCODE_64 in dialect for
	64 bit default targets, and parse "32" and "64" in options.
	Formatting fixes.
	(print_insn_powerpc): Pass dialect to operand->extract.
2001-11-15 01:08:53 +00:00
Nick Clifton 42ebd756d5 Do not remove the symbol's value from the addend for fixups against local
symbols in SEC_MERGE sections - it was not added in, in the first place.
2001-11-14 14:07:26 +00:00
Timothy Wall 6e91790347 Fix tic54x testsuite failures and Lmem disassembly bugs. 2001-11-13 14:22:53 +00:00
Alan Modra e4afe74295 * config/obj-elf.c (obj_elf_version): Ensure terminating NUL is
put in note section.  Use sizeof instead of hard-coded constants.
2001-11-13 03:24:25 +00:00
Thiemo Seufer ae948b86fe * config/tc-mips.c (support_64bit_objects): Define for OBJ_ELF only.
(md_longopts): Allow OPTION_MABI for ELF compilation only. RE-allow
	OPTION_GP32, OPTION_GP64, OPTION_FP32 for non-ELF compilation.
	Sort options a bit more logical.
	(md_parse_option): Allow OPTION_32, OPTION_N32, OPTION_N64,
	OPTION_MABI only for elf targets.
	* gas/mips/mips.exp: Change naming of some conditionals to reflect
	the object format they actually mean. Don't try mips-abi32 and
	mips-abi32-pic tests for ecoff.
2001-11-12 22:22:20 +00:00
Thiemo Seufer 2396cfb964 * config/tc-mips.c (set_at): Add cast needed for varargs.
(load_register): Likewise.
	(macro): Likewise. Some code reformatting.
	(macro2): Add cast needed for varargs.
	(mips16_macro): Likewise.
2001-11-12 22:20:44 +00:00
Thiemo Seufer c4e7957cc8 * config/tc-mips.c (md_assemble): Remove superflous casts.
(append_insn): Likewise.
	(mips16_macro_build): Likewise.
	(macro): Likewise.
	(mips16_ip): Likewise.
	(s_cpload): Likewise.
	(mips_relax_frag): Likewise.
2001-11-12 22:19:30 +00:00
Thiemo Seufer a325df1d97 * config/tc-mips.c (mips_abi_level): Move in front of
mips_set_options.
	(mips_set_options): Add members gp32, fp32, abi.
	(file_mips_gp32): New flag.
	(file_mips_fp32): New flag.
	(mips_opts): Initialize the new members.
	(mips_gp32): Remove.
	(mips_fp32): Remove.
	(HAVE_32BIT_GPRS): Use the new values from mips_opts.
	(HAVE_32BIT_FPRS): Likewise.
	(HAVE_NEWABI): Likewise.
	(HAVE_64BIT_OBJECTS): Likewise.
	(md_begin): Likewise. Save default (file) values.
	(md_parse_option): Use the new values from mips_opts.
	(s_mipsset): Likewise. Fix logic to keep the ABI selection if
	possible. Let .set mipsN work together with .set push/pop.
	Enhance error messages.
	(mips_elf_final_processing): Use file_mips_* for header processing.
2001-11-12 16:54:54 +00:00
Denis Chertykov 1f8ae5e6f2 * config/tc-avr.c (mcu_types): Update for new devices. 2001-11-10 09:35:53 +00:00
Thiemo Seufer d993a84ec2 * config/tc-mips.c (mips_force_relocation): Remove duplicate code. 2001-11-08 19:32:24 +00:00
Eric Christopher 76b3015fc1 2001-11-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* config/tc-mips.c (my_getSmallParser): Fix small parser bug.
2001-11-06 21:39:09 +00:00
Martin Schwidefsky b8edc45c30 Force got and plt relocations. 2001-11-05 08:47:46 +00:00
Richard Earnshaw c9b604bd23 * tc-arm.c: Re-arrange prototypes by architecture.
(insns): Re-arrange instructions by archtitecture.  Pld instruction
is part of ARMv5E.
(tinsns): blx and bkpt are part of ARMv5T.
(do_fp_{ctrl,ldst,ldstm,dyadic,monadic,cmp,from_reg,to_reg}): Rename
to do_fpa_*.  All callers changed.

* tc-arm.c (insns): Add two temporary instructions to handle
ldrd/strd.
2001-11-02 17:25:11 +00:00
Stephane Carrez 4fe7ef9639 * config/tc-m68hc11.c (build_jump_insn): Allocate worst case storage
for bra/bsr and use frag_variant(), this ensure that the possible
	16-bit BFD_RELOC_16 will be in the same frag.
2001-11-01 09:56:17 +00:00
Chris Demetriou afdbd6d03b [ bfd/ChangeLog ]
2001-10-31  Chris Demetriou  <cgd@demetriou.com>

	* elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
	relocations properly.

[ gas/ChangeLog ]
2001-10-31  Chris Demetriou  <cgd@broadcom.com>

	* config/tc-mips.c (HAVE_32BIT_ADDRESSES): If compiling embedded
	PIC code, assume pointers the same size as GPRs.
	(macro): In M_LA_AB handling for embedded PIC code, support
	"la $treg,foo-bar($breg)".  In load/store handling
	(label ld_st) support "<op> $treg,<sym>-<local_sym>($breg)"
	which is used by the compiler for switch statements.
	In load/store double multi-instruction macro handling
	(label ldd_std) add a comment that no special handling
	is currently done for embedded PIC.
	(mips_ip): In 'o' (16-bit offset) case, only accept 16
	bit offsets.

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

	* gas/mips/empic.s: Undo damage inflicted on 2000-12-02.
	* gas/mips/empic.d: Likewise.
	* gas/mips/elempic.d: Likewise (it was copied into other files).
	* gas/mips/telempic.d: Likewise.
	* gas/mips/tempic.d: Likewise.

	* gas/mips/empic2.s: New test to check new 'la' and 'lw' (and
	related ops) syntax, test loads with large offsets.
	* gas/mips/emcic2.d: Likewise.
	* gas/mips/mips.exp: Run the new test on ELF platforms.
2001-11-01 01:33:47 +00:00
Richard Earnshaw b89dddec96 General cleanup of feature definitions.
* tc-arm.c (ARM_EXT_LONGMUL, ARM_EXT_HALFWORD, ARM_EXT_THUMB): Delete.
(ARM_2UP, ARM_ALL, ARM_3UP, ARM_6UP): Delete.
(FPU_CORE, FPU_FPA10, FPA_FPA11, FPU_ALL, FPA_MEMMULTI): Delete.
(ARM_EXT_V{1,2,2S,3,3M,4,4T,5T,5ExP}): New defines.
(ARM_EXT_V{5,5E}): Synchronize with above.
(ARM_ARCH_V*): Define a complete set in terms of above features.
(ARM_{1,2,3,250,6,7,8,9,STRONG}): Define in terms of architecture.
(FPU_FPA_EXT_V[12]): Define.
(FPU_ARCH_FPE, FPU_ARCH_FPA): Define in terms of above.
(FPU_ANY): Define.
(FPU_DEFAULT): Default to FPA.
(CPU_DEFAULT): For XScale, this is now just ARM_ARCH_XSCALE; for
Thumb, this is now ARM_ARCH_V5T.
(insns): Rework for new feature defines.
(tinsns): Likewise.
(opcode_select, do_ldst, md_begin, md_parse_option): Likewise.
2001-10-31 14:48:23 +00:00
Nick Clifton 3c3bdf30e4 Add MMIX support 2001-10-30 15:20:14 +00:00
Chris Demetriou 0a758a1221 2001-10-24 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (hilo_interlocks, cop_interlocks): Make
        these evaluate to true if mips_arch indicates SB-1.
2001-10-24 21:08:34 +00:00
Chris Demetriou 2e4acd247e 2001-10-20 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c (md_show_usage): Print "sb1" for Broadcom
        SB-1 CPU for consistency.
        (mips_cpu_info_table): Tweak comment about SB-1.
2001-10-21 05:58:55 +00:00
H.J. Lu 8420dfca80 2001-10-20 H.J. Lu <hjl@gnu.org>
* config/tc-arm.c (do_c_shift): Use ISDIGIT instead of isdigit.
	(cirrus_parse_offset): Likewise.
2001-10-20 22:41:09 +00:00
Nick Clifton da89cce1af Restore line_comment_chars after a SNAFU. 2001-10-19 10:53:19 +00:00
Nick Clifton f57c81f6dd Remove semicolon from ARM comment chars list 2001-10-18 21:06:03 +00:00
Matthew Green f5c120c5dc [gas/ChangeLog]
* config/tc-ppc.c (md_show_usage): Add missing -maltivec, -m7400,
	-m7410, -m7450 and -m7455 options.

[gas/testsuite/ChangeLog]
	* gas/ppc/altivec.s: New test for AltiVec.
	* gas/ppc/altivec.d: New file.
	* gas/ppc/ppc.exp: Test altivec.s

[include/opcode/ChangeLog]
	* ppc.h (PPC_OPCODE_BOOKE64): Fix typo.

[opcodes/ChangeLog]
	* ppc-opc.c (STRM): New AltiVec operand.
	(XDSS): New AltiVec instruction form.
	(mtvscr): Correct operand list.
	(dst, dstt, dstst, dststt, dss, dssall): AltiVec instructions.
2001-10-17 13:13:16 +00:00
Alan Modra 15c1449b25 * config/tc-ppc.c (PPC_HA, PPC_HIGHERA, PPC_HIGHESTA): Simplify.
(ppc_size): Select PPC_OPCODE_64 if 64 bit.
	(md_begin): Don't set ppc_size here.
	(ppc_target_format): Test ppc_size as well as BFD_DEFAULT_TARGET_SIZE.
	(md_shortopts): Constify.
	(md_longopts): Likewise.
	(md_longopts_size): Likewise.
	(ppc_elf_suffix): Only allow 64-bit relocs when ppc_size specifies
	64-bit opcodes.
	(ppc_machine): Explain why this function is a nop.
2001-10-17 06:03:41 +00:00
Alan Modra d3ecfc599f * bit_fix.h: Comment typo fix.
* config/tc-mips.c: Likewise.
	* config/tc-sh.c: Likewise.
	* config/tc-arc.c (arc_code_symbol): Remove unnecessary test.
2001-10-17 05:51:12 +00:00
Alan Modra 18566f5563 * config/tc-m68k.c (m68k_ip): Correct absolute jmp opcodes. 2001-10-16 14:27:03 +00:00
Hans-Peter Nilsson 05982cacb9 * config/tc-sh.c (shl): Remove.
(big): New function.
	(little): Remove shl handling.  Emit error for endian mismatch.
	(md_show_usage): Add description of -big.
	(md_parse_option): Handle OPTION_BIG.  Remove shl handling.
	(OPTION_BIG): Add.
	(md_pseudo_table): Add .big.
	(md_longopts): Add -big.
	(md_begin): Don't set target_big_endian here.
	* config/tc-sh.h (TARGET_BYTES_BIG_ENDIAN): Remove.
	(LISTING_HEADER, COFF_MAGIC, TARGET_FORMAT): Use target_big_endian.
	(shl): Remove.
	* configure.in (endian): Default is big.
	(sh-*-pe*): Little endian.
	(cpu_type): Set sh for target sh*.
	* configure: Regenerate.
2001-10-16 02:36:20 +00:00
Thiemo Seufer e369bcce27 * config/tc-mips.c (md_apply_fix): Preliminary handling of NewABI
relocations.
2001-10-15 19:48:04 +00:00
Nick Clifton 05d2d07e5f Replace CONST with const 2001-10-13 09:50:02 +00:00
Matthew Green 418c174284 [gas/ChangeLog]
* config/tc-ppc.c (md_parse_option): New -m7410, -m7450 and -m7455
	flags, equivalent to -m7400.  New -maltivec to enable AltiVec
	instructions.  New -mbook64 and -mbooke/-mbooke32 flags to enable
	64-bit and 32-bit BookE support, respectively.  Change -m403 and
	-m405 to set PPC403 option.
	(md_show_usage): Adjust for new options.
	* doc/all.texi: Set PPC.
	* doc/as.texinfo: Add PPC support and pull in c-ppc.texi.
	* doc/c-ppc.texi: New file.
	* doc/Makefile.am (CPU_DOCS): Add c-ppc.texi.
	* doc/Makefile.in: Regenerate.

[gas/testsuite/ChangeLog]
	* gas/ppc/booke.s: New test for Motorola BookE.
	* gas/ppc/booke.d: New file.
	* gas/ppc/ppc.exp: Test booke.s.

[include/opcode/ChangeLog]
	* ppc.h (PPC_OPCODE_BOOKE, PPC_OPCODE_403): New opcode flags for
	BookE and PowerPC403 instructions.

[opcodes/ChangeLog]
	* ppc-opc.c (insert_de, extract_de, insert_des, extract_des): New
	instruction field instruction/extraction functions for new BookE
	DE form instructions.
	(CT): New macro for CT field in an X form instruction.
	(DE, DES, DEO, DE_MASK): New macros for DE/DES fields in DE form
	instructions.
	(PPC64): Don't include PPC_OPCODE_PPC.
	(403): New opcode macro for PPC403 processors.
	(BOOKE): New opcode macro for BookE processors.
	(bce, bcel, bcea, bcela, bclre, bclrel: New BookE instructions.
	(bcctre, bcctrel, be, bel, bea, bela, icbt, icbte, lwzxe): Likewise.
	(dcbste, lwzuxe, luxe, dcbfe, lbzxe, lwarxe, lbzuxe): Likewise.
	(stwcxe, stwxe, stxe, stwuxe, stuxe, stbxe, dcbtste, stbuxe): Likewise.
	(mfapidi, dcbte, lhzxe, lhzuxe, lhaxe, lhauxe, subfe64): Likewise.
	(subfeo64, adde64, addeo64, sthxe, sthuxe, subfze64): Likewise.
	(subfzeo64, addze64, addzeo64, dcbie, subfme64, subfmeo64): Likewise.
	(addme64, addmeo64, stdcxe., mcrxr64, lwbrxe, lfsxe, lfsuxe): Likewise.
	(lfdxe, lfduxe, stwbrxe, stfsxe, stfsuxe, stfdxe, dcbae): Likewise.
	(stfduxe, tlbivax, tlbivaxe, lhbrxe, ldxe, lduxe, tlbsx): Likewise.
	(tlbsxe, sthbrxe, stdxe, stduxe, icbie, stfiwxe, dcbze, lbze): Likewise.
	(lbzue, ldue, lhze, lhzue, lhae, lhaue, lwze, lwzue): Likewise.
	(stbe, stbue, sthe, sthue, stwe, stwue, lfse, lfsue, lfde): Likewise.
	(lfdue, stde, stdue, stfse, stfsue, stfde, stfdue): Likewise.

	* ppc-dis.c (print_insn_big_powerpc, print_insn_little_powerpc): Look
	for a disassembler option of `booke', `booke32' or `booke64' to enable
	BookE support in the disassembler.
2001-10-13 01:59:09 +00:00
Kazu Hirata b6ff326eba * config/tc-alpha.c: Fix comment typos.
* config/tc-cris.c: Likewise.
	* config/tc-hppa.c: Likewise.
	* config/tc-i370.c: Likewise.
	* config/tc-mips.c: Likewise.
	* config/tc-mn10200.c: Likewise.
	* config/tc-mn10300.c: Likewise.
	* config/tc-sh.c: Likewise.
	* config/tc-tahoe.c: Likewise.
	* config/tc-v850.c: Likewise.
2001-10-11 23:56:33 +00:00
Thiemo Seufer 6478892d2e * config/tc-mips.c (mips_cpreturn_offset): New variable.
(mips_cpreturn_register): Likewise.
	(mips_gp_register): Likewise.
	(s_cpsetup): New function prototype.
	(s_cplocal): Likewise.
	(s_cpreturn): Likewise.
	(s_gpvalue): Likewise.
	(mips_pseudo_table): Add .cpsetup, .cplocal, .cpreturn, .gpvalue
	pseudo-ops.
	(macro): Don't warn about .cprestore for NewABI.
	(md_pcrel_from): Code cleanup.
	(mips_force_relocation): Force output of some NewABI relocations even
	without a defined symbol.
	(s_cpload): Ignore .cpload for NewABI.
	(s_cpsetup): Handle .cpsetup.
	(s_cplocal): Handle .cplocal.
	(s_cprestore): Ignore .cprestore for NewABI.
	(s_cpreturn): Handle .cpreturn.
	(s_gpvalue): Handle .gpvalue.
	(s_cpadd): Ignore .cpadd for NewABI.
	(nopic_need_relax): Take g_switch_value into account as gp
	optimization.
	(tc_gen_reloc): Don't handle BFD_RELOC_MIPS_{CALL,GOT}* for NewABI.
2001-10-10 01:08:35 +00:00
Thiemo Seufer ad8d3bb3cf * config/tc-mips.c (my_getSmallParser): New function prototype.
(small_ex_type): Named this enum, more return values for
	my_getSmallExpression.
	(mips_ip): Allow SPC and HT between arguments. Handle some NewABI
	triple relocations. Protect some parts with ifdef OBJ_ELF.
	(percent_op_match): New struct, lookup table for %some_reloc().
	(my_getSmallParser): New function, parses nested percent_ops also.
	(my_getSmallExpression): Rewite to support nested percent_ops.
2001-10-10 00:54:53 +00:00
Thiemo Seufer d6bc6245d6 * config/tc-mips.c
(load_address): Support both 32- and 64-bit addresses.
	(macro): Call load_register correctly. Expand 64-bit loads ans stores.
	(macro2): Call load_address correctly.
2001-10-10 00:43:36 +00:00
Nick Clifton a5d2034ac0 fix z8k assembly and disassembly 2001-10-09 17:25:58 +00:00
Aldy Hernandez 90f9b791a1 * config/tc-arm.c: Change MAVERIK to MAVERICK. 2001-10-09 16:08:57 +00:00
Alan Modra aa1f4858a4 * config/obj-elf.c: Make use of elf_group_name and elf_next_in_group
throughout file.
	(obj_elf_change_section): Rename "group" to "group_name".
	(obj_elf_section): Likewise.
	(elf_frob_file): Don't use sec->lineno for SHT_GROUP section to store
	first member section; Instead use elf_next_in_group.
2001-10-09 13:13:09 +00:00
Alan Modra 060adf0e2f * config/obj-elf.c: (obj_elf_change_section): Add "group" param.
Set elf_section_data group from it.  Warn if group name changed.
	(obj_elf_parse_section_letters): Parse 'G' too.
	(obj_elf_section): Parse group name.
	(struct group_list): New.
	(build_group_lists): New function.
	(elf_frob_file): Create SEC_GROUP section(s).

	* config/obj-elf.c: (elf_copy_symbol_attributes): Zap trailing
	whitespace.
2001-10-09 06:07:33 +00:00
Aldy Hernandez 22d9c8c52f updated credits 2001-10-08 19:31:33 +00:00
Aldy Hernandez 404ff6b5ae * gas/config/tc-arm.c (ARM_EXT_MAVERIK): New macro.
(cirrus_regtype): New enum.
	(LONGEST_INST): Change to 10.
	(CIRRUS_MODE1): New.
	(CIRRUS_MODE2): New.
	(CIRRUS_MODE3): New.
	(CIRRUS_MODE4): New.
	(CIRRUS_MODE5): New.
	(CIRRUS_MODE6): New.
	(insns): Add cirrus dsp instructions.
	(ARM_EXT_MAVERIKSC_REG): New.
	(cirrus_register): New.
	(cirrus_mvf_register): New.
	(cirrus_mvd_register): New.
	(cirrus_mvfx_register): New.
	(cirrus_mvdx_register): New.
	(cirrus_mvax_register): New.
	(ARM_EXT_MAVERIKsc_register): New.
	(reg_table): Add cirrus registers.
	(cirrus_valid_reg): New.
	(cirrus_reg_required_here): New.
	(do_c_binops_1): New.
	(do_c_binops_2): New.
	(do_c_binops_3): New.
	(do_c_triple_4): New.
	(do_c_triple_5): New.
	(do_c_quad_6): New.
	(do_c_dspsc_1): New.
	(do_c_dspsc_2): New.
	(do_c_shift_1): New.
	(do_c_shift_2): New.
	(do_c_ldst_1): New.
	(do_c_ldst_2): New.
	(do_c_ldst_3): New.
	(do_c_ldst_4): New.
	(do_c_binops): New.
	(do_c_triple): New.
	(do_c_quad): New.
	(do_c_dspsc): New.
	(do_c_shift): New.
	(cirrus_parse_offset): New.
	(do_c_ldst): New.
	(md_parse_option): Add arm9e.
	(md_show_usage): Same.
2001-10-08 19:05:34 +00:00
Tom Rix 8642cce86a Fix 2 xcoff line number problems 2001-10-08 18:14:43 +00:00
Alan Modra 6ce8b3699c * config/obj-elf.c: Standardize error/warning messages - don't
capitalise, no final period or newline, don't say "ignoring" for
	as_bad messages.  In some cases, change the wording to that used
	elsewhere for similar messages.
	(obj_elf_section_name): New function, split out from ..
	(obj_elf_section): .. here.  Correctly mask off SHF_MERGE if
	entsize not specified.
2001-10-07 06:16:54 +00:00
Alexandre Oliva 7dc8f5ceec * config/tc-mn10300.c (tc_gen_reloc): Don't free
reloc->sym_ptr_ptr if it's not allocated.
2001-10-05 07:49:24 +00:00
Thiemo Seufer f668894301 * config/tc-mips.c (prev_insn_reloc_type): Make it an array to hold a
relocation triple.
	(prev_insn_fixp): Likewise.
	(append_insn): Changed prototype to accept a relocation pointer.
	(imm_reloc): Make it an array.
	(offset_reloc): Likewise.
	(md_assemble): Handle triple relocations.
	(append_insn): Likewise. Add handling for some NewABI relocations.
	(mips_no_prev_insn): Handle triple relocations.
	(macro_build): Likewise. Add handling for some NewABI relocations.
	Move handling for the 'u' case to append_insn().
	(mips16_macro_build): Handle triple relocations.
	(macro_build_lui): Likewise. Don't handle _gp_disp as special symbol
	for NewABI.
	(mips_ip): Handle triple relocations.
	(mips16_ip): Likewise.
	(mips_force_relocation): Force handling of triple relocations
	without symbols for NewABI.
	(md_apply_fix): Add handling for some NewABI relocations.
2001-10-04 20:07:00 +00:00
Alan Modra 1ae008798a * config/tc-i386.c (parse_register): If not producing code for
x86_64, reject x86_64 register name matches.
	(md_assemble): Remove now redundant check for x86_64 regs.
2001-10-04 18:01:46 +00:00
Alan Modra 9c7977b3bd * config/tc-ppc.c (md_assemble <DS relocs>): Test ppc_size as well
as BFD_DEFAULT_TARGET_SIZE.
	(ppc_tc): Likewise.
	(ppc_is_toc_sym): Likewise.
	(md_apply_fix3): Likewise.
2001-10-04 05:03:44 +00:00
Thiemo Seufer e013f6904c * config/tc-mips.c (mips_64): Remove.
(mips_target_format): Move downwards in file, use HAVE_64BIT_OBJECTS
	in it.
	(mips_abi_level, mips_abi): New enum.
	(mips_32bit_abi): Remove.
	(HAVE*PRS): Use mips_abi instead of mips_32bit_abi.
	(HAVE_NEWABI): New define.
	(HAVE_64BIT_OBJECTS): New define.
	(HAVE_32BIT_ADDRESSES): Don't return true for 64bit objects.
	(HAVE_64BIT_ADDRESSES): New define, inverse of HAVE_32BIT_ADDRESSES.
	(support_64bit_objects): New prototype.
	(md_begin): Use mips_abi instead of mips_32bit_abi. Don't write
	.reginfo section for n32, use .MIPS.options instead.
	(support_64bit_objects): New function, code from md_parse_option.
	(md_longopts): Add -n32 option.
	(md_parse_option): Use mips_abi instead of mips_32bit_abi/mips64.
	Add -n32 option. Protect with OBJ_ELF.
	(s_mipsset): Use mips_abi instead of mips_32bit_abi.
	(mips_elf_final_processing): Likewise. Don't write .reginfo section
	for n32, use .MIPS.options instead.
2001-10-03 20:30:15 +00:00
Alan Modra 32a5aae294 * config/tc-ppc.c (md_apply_fix3 <BFD_RELOC_CTOR>): Make it 64
bits if target is 64 bit.
2001-10-02 09:28:53 +00:00
H.J. Lu 34105363c2 2001-09-30 H.J. Lu <hjl@gnu.org>
* config/obj-elf.c (obj_elf_parse_section_letters): Accept "am"
	and "ams" for compatibility.
2001-10-01 06:30:19 +00:00
Hans-Peter Nilsson 79ad6e9430 * config/tc-sh.h (MD_PCREL_FROM_SECTION): Define.
(md_pcrel_from_section): Prototype.
2001-10-01 00:08:36 +00:00
Hans-Peter Nilsson ef17112f8d * config/tc-sh.c (md_pcrel_from_section): Transformed from
md_pcrel_from.  Handle pc-relativeness against link-time
	symbol.  Handle relativeness to elsewhere than the fixup.
2001-10-01 00:06:58 +00:00
Stephane Carrez 27302d639b * config/tc-m68hc11.c (cmp_opcode): Define prototype.
(print_opcode_format, skip_whites): Likewise.
	(convert_branch, m68hc11_new_insn): Likewise.
	(build_dbranch_insn, build_indexed_byte): Likewise.
	(build_reg_mode, find, find_opcode): Likewise.
	(print_insn_format): Fix call to print_opcode_format.
	(md_assemble): Fix call to build_dbranch_insn.
2001-09-30 09:20:55 +00:00
Nick Clifton 2c20dfb248 Add missing function protoypes. 2001-09-27 09:58:01 +00:00
Alexandre Oliva 6e22e505ed * config/tc-mn10300.c (tc_gen_reloc): Don't emit an *ABS*
relocation for differences between symbols in a section other
than the one in which the difference is to be placed; apply
the relocation instead.
2001-09-25 08:51:52 +00:00
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
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