Commit Graph

805 Commits

Author SHA1 Message Date
Richard Henderson d61a78a7af * config/tc-alpha.c (alpha_elf_section_letter): New.
(alpha_elf_section_flags): New.
        * config/tc-alpha.h (md_elf_section_letter): New.
        (md_elf_section_flags): New.
        * config/tc-ia64.c (ia64_elf_section_letter): New.
        * config/tc-ia64.h (md_elf_section_letter): New.
2001-09-11 18:26:04 +00:00
Jakub Jelinek 9469ddf0d0 * config/obj-elf.c (obj_elf_parse_section_letters): Use 'M' instead
of 'm', 'S' instead of 's'.  Update bad_msg.
	* config/tc-ppc.c (ppc_section_letter): Update bad_msg.
	* config/tc-i370.c (i370_sectioN_letter): Update bad_msg.
2001-09-11 16:46:38 +00:00
Alan Modra e0890092b6 * expr.c (expr): Move code setting "retval" to the end of the loop,
and rearrange for efficiency.  For "PIC code" subtraction, use
	"rightseg" rather than recalculating.  For "symbol OP symbol"
	subtract, set "retval" to absolute_section if symbols in same
	section.
	* symbols.c (resolve_symbol_value): Resolve "sym +/- expr" to an
	O_symbol.  Simplify a +/- b code.  Allow equality and non-equality
	comparisons on symbols from any section.  Allow other comparison
	operators as for subtraction.
	(symbol_equated_reloc_p): New predicate function.
	* symbols.h (symbol_equated_reloc_p): Declare.
	* write.c (adjust_reloc_syms): Use symbol_equated_reloc_p.
	(write_relocs): Likewise.
	(write_object_file): Likewise.
	(relax_segment <rs_machine_dependent>): Ensure segment for
	expression syms is set correctly.
	* config/tc-mips.c (md_estimate_size_before_relax): Likewise.
	* config/tc-i386.c (md_assemble <Output jumps>): Don't lose part
	of a complex expression when setting up frag_var.
2001-09-09 14:01:17 +00:00
Richard Henderson ec8fcf4a1d * config/tc-alpha.c (alpha_reloc_op_tag): Replace need_seq with
require_seq and allow_seq.  Let !literal omit the sequence number.
        (tokenize_arguments): Reject sequence numbers of !allow_seq.
2001-09-08 01:12:00 +00:00
Jakub Jelinek 891937bff4 * config/tc-sparc.c (md_apply_fix3): Handle relocs against SEC_MERGE
section symbols the same way as externs.
2001-09-07 22:41:03 +00:00
Thiemo Seufer 553178e47b Reallow unrestricted use of .set mipsX pseudo-op in gas.
Update testcases accordingly.
2001-09-07 05:54:12 +00:00
Thiemo Seufer cb56d3d327 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
of R_MIPS_PC16.

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

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

 	* gas/alpha/alpha.exp: New file.
 	* gas/alpha/elf-reloc-1.[sd]: New test.
 	* gas/alpha/elf-reloc-2.[sl]: New test.
 	* gas/alpha/elf-reloc-3.[sl]: New test.
 	* gas/alpha/elf-reloc-4.[sd]: New test.
 	* gas/alpha/fp.exp: Remove file.
 	* gas/alpha/fp.s: Output to .data not .rdata.
 	* gas/alpha/fp.d: Adjust to match.
2001-09-05 02:39:43 +00:00
Jeff Law de342d07b9 * tc-h8300.c (tc_gen_reloc): Give an error if we try to take the
address of two symbols in different sections.
2001-09-05 02:01:08 +00:00
Jeff Law 3c1ba8a308 * config/tc-h8300.c (build_bytes): For OBJ_ELF, make relocation's
offset match H8 ELF spec.
        (md_section_align): Alternate implementation for BFD_ASSEMBLER.
        (md_apply_fix): Fix argument and return types for BFD_ASSEMBLER.
2001-08-31 22:43:55 +00:00
Eric Christopher 3c02b2abd6 2001-08-31 Eric Christopher <echristo@redhat.com>
Jason Eckhardt  <jle@redhat.com>

	* config/tc-mips.c (mips_cpu_info): Add support for mipsisa32,
	5kc, and 20kc.  Clean up old entries.
2001-08-31 21:06:40 +00:00
Jeff Law 36ed2fff06 * tc-h8300.c (relocation mappings): Remove. Moved to tc-h8300.h.
(build_bytes): Mark fixups for PCrel branches as signed.  For
        OBJ_ELF, make sure the reloc's offset points to the first byte
        to be modified.
        (md_convert_frag): Update definiton based on BFD_ASSEMBLER.
        * tc-h8300.h (relocation mappings): Add.
2001-08-31 17:43:52 +00:00
Jeff Law 5facebfccc Nuts. Checked in wrong version of previous patch. Fixed. 2001-08-30 20:38:35 +00:00
Jeff Law f333765ffd Thu Aug 30 12:05:13 2001 J"orn Rennecke <amylaar@redhat.com>
* tc-h8300.c (tc_crawl_symbol_chain, tc_headers_hook): Don't
        define for BFD_ASSEMBLER.
        (tc_reloc_mangle): Likewise.
        (tc_gen_reloc): New function for BFD_ASSEMBLER.
More of Joern's patches with minor changes s/OBJ_ELF/BFD_ASSEMBLER/
2001-08-30 20:15:06 +00:00
Jeff Law 7e0de7bf18 * tc-h8300.c: If OBJ_ELF, include elf/h8.h, and define
assorted coff relocations to the corresponding elf relocations.
        * tc-h8300.h (TARGET_ARCH, TARGET_FORMAT): Define appropriately.
More of Joern's patches.
2001-08-29 18:56:50 +00:00
Jeff Law 83e20b45a3 * config/tc-h8300.c (h8300hmode): Record the machine type
if BFD_ASSEMBLER is defined.
	(h8300smode, md_begin): Similarly.
2001-08-29 18:50:56 +00:00
Thiemo Seufer 7283eb8605 * tc_mips.c (load_address): Reflect change to MAX_GPREL_OFFSET.
(macro): Reflect change to MAX_GPREL_OFFSET.
2001-08-27 18:48:27 +00:00
Alan Modra 0baf16f23c * configure.in: Recognise powerpc*le*, not just powerpcle*.
* configure: Regenerate.
	* config/tc-ppc.c (PPC_LO, PPC_HI, PPC_HA, PPC_HIGHER,
	PPC_HIGHERA, PPC_HIGHEST, PPC_HIGHESTA, SEX16): New macros.
	(md_assemble): Use them.
	(ppc_machine): Support stub for ELF64 as well as XCOFF.
	(md_pseudo_table): Add "llong", "quad".
	(md_parse_option): Match default_cpu of powerpc*.
	(ppc_arch): Likewise.
	(ppc_subseg_align): Only for OBJ_XCOFF.
	(ppc_target_format): Return elf64-powerpc strings for 64 bit ELF.
	(md_begin): Select PPC_OPCODE_64 for 64 bit.
	(ppc_insert_operand): Don't bother testing 'file' before calling
	as_bad_where.  Use as_bad_where for operand->insert errors.
	(mapping): Add ELF64 relocation modifiers.
	(ppc_elf_suffix): Replace symbol on BFD_RELOC_PPC64_TOC reloc
	expressions with abs_symbol.
	(ppc_elf_cons): Correct offset for little endian targets.
	(ppc_elf_frob_symbol): New.
	(md_assemble): Add support for 64 bit ELF relocs.
	(ppc_tc): Ensure 8 byte alignment when 64 bit.
	(ppc_is_toc_sym): Only define for OBJ_XCOFF and OBJ_ELF.  Match
	".toc" section for 64 bit ELF.
	(ppc_fix_adjustable): New.  Macro body moved from tc-ppc.h.
	(md_apply_fix3): Silence warning with ATTRIBUTE_UNUSED.  Only do
	the ppc_is_toc_sym check for OBJ_XCOFF and OBJ_ELF.  For 64 bit,
	use BFD_RELOC_PPC64_TOC16_DS instead of BFD_RELOC_PPC_TOC16.
	Expand on comments, error message.  Add support for 64 bit relocs,
	and use PPC_HI etc. macros.
	* config/tc-ppc.h (MAX_MEM_FOR_RS_ALIGN_CODE): Define.
	(HANDLE_ALIGN): Define to generate nops in code sections rather
	than zeros.
	(TC_FORCE_RELOCATION): Force for BFD_RELOC_PPC64_TOC.
	(ELF_TC_SPECIAL_SECTIONS): Add 64 bit ELF sections.
	(tc_fix_adjustable): Move body of macro to tc-ppc.c.
	(ppc_fix_adjustable): Declare.
	(tc_frob_symbol): Define.
	(ppc_elf_frob_symbol): Declare.
2001-08-27 10:42:16 +00:00
Andreas Jaeger 9d654c1ca4 * config/tc-s390.c: Add missing prototypes
(md_gather_operands): Make static.
2001-08-26 11:44:51 +00:00
Thiemo Seufer e7d556dfef * tc_mips.h (MAX_GPREL_OFFSET): Change it to the maximum allowed
value, not the word beyond maximum.
	* tc_mips.c (macro_build_lui): Code cleanup.
	(macro): Reflect change to MAX_GPREL_OFFSET.
	(mips_ip): Check explicitly against S_EX_NONE.
	(my_get_SmallExpression): parse for %gp_rel, not %gprel.
	(md_apply_fix): Code cleanup.
2001-08-26 10:42:12 +00:00
Andreas Jaeger 34f63668bf * config/tc-ppc.h: Fix prototype declaration. 2001-08-24 19:18:45 +00:00
Jakub Jelinek c538998c23 * config/tc-ia64.c (dot_endp): Set function symbol sizes.
* config/obj-elf.c (obj_elf_size): When size is constant, free
	and clear symbol_get_obj(sym)->size if any.
2001-08-23 20:43:01 +00:00
Thiemo Seufer 1ff54a84b4 * tc_mips.c (md_begin): Warn about incompatibility between -march=FOO
and -mipsN option, continue with default ISA.
2001-08-21 01:13:05 +00:00
Thiemo Seufer a6bacc8047 * config/tc-mips.c (md_parse_option): #ifdef the
traditional/non-traditional names as it is done in mips_target_format.
2001-08-21 00:59:48 +00:00
Richard Henderson ca3f769514 * config/tc-alpha.h (MD_APPLY_FIX3): Define.
* config/tc-alpha.c (md_apply_fix3): Rename from md_apply_fix;
        use seg parameter instead of now_seg.
2001-08-21 00:22:23 +00:00
H.J. Lu e87a02842a 2001-08-18 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (show): Add the missing prototype.
2001-08-18 18:03:24 +00:00
Thiemo Seufer fb1b323293 * config/tc-mips.c (S_EX_*): New enum for my_getSmallExpression()
return values.
	(mips_ip): Use the new return values instead of characters. Add
	support for %higher and %highest.
	(LP): Remove.
	(RP): Remove.
	(my_getSmallExpression): Make parsing case insensitive and more
	reliable. Add support for %higher and %highest. Further support	to
	parse %gprel and %neg is implemented but currently deactivated.
2001-08-18 17:24:52 +00:00
Thiemo Seufer be00bdddad Set MIPS n32 ABI flag in ELF header if appropriate. 2001-08-16 21:48:28 +00:00
Thiemo Seufer 07ae3efa01 Remove obsolete special handling of 64bit Relocations. 2001-08-16 15:12:09 +00:00
Nick Clifton 5d430f8ba5 Add missing prototypes 2001-08-13 11:05:29 +00:00
Andreas Jaeger 198ce79b6b * config/tc-s390.c (s390_elf_cons): Correct fixups for PLT
relocations.
2001-08-13 08:03:52 +00:00
Nick Clifton 4ffadb11c8 Fix behaviour of unaligned data directives 2001-08-12 08:47:02 +00:00
Kazu Hirata f72c8c98df * config/tc-mips.c: Fix a comment typo. 2001-08-11 15:15:15 +00:00
Richard Sandiford ea1fb5dc3b * config/tc-mips.c (move_register): New function.
(macro_build): Remove OPCODE_IS_MEMBER's gp32 argument.
	(mips_ip): Likewise.
	(macro2): Use move_register rather than macro_build for moves.
	(mips16_macro): Likewise.
	(macro): Likewise.  Handle M_MOVE.
2001-08-10 16:24:32 +00:00
Alan Modra 11b37b7b84 Revert 2001-08-08 changes. 2001-08-10 01:34:47 +00:00
Alan Modra 8d28c9d7be * symbols.c: Add missing prototypes.
* config/e-i386elf.c: Likewise.
	* config/e-i386coff.c: Likewise.
	* config/e-i386aout.c: Likewise.
	* config/obj-coff.c: Likewise.
	(def_symbol_in_progress, stack): Move definition.
	* config/obj-elf.c: Add missing prototypes.
	(obj_elf_change_section): Make static.
	(obj_elf_parse_section_letters): Likewise.
	(obj_elf_section_word): Likewise.
	(obj_elf_section_type): Likewise.
2001-08-09 14:42:07 +00:00
Alan Modra fce3099f60 * config/tc-ppc.c (md_apply_fix3): Replace haphazard code for
determining reloc type with code reading operands->reloc field.
2001-08-08 13:23:07 +00:00
Alan Modra 8fd3e36b84 * config/obj-elf.c (elf_copy_symbol_attributes): Make it a global
function, and expand old obj-elf.h OBJ_COPY_SYMBOL_ATTRIBUTES here.
	* config/obj-elf.h (elf_copy_symbol_attributes): Declare.
	(OBJ_COPY_SYMBOL_ATTRIBUTES): Call elf_copy_symbol_attributes.
2001-08-08 13:11:58 +00:00
Thiemo Seufer 38487616e6 Replace a bunch of magic constants in tc-mips.c with their proper
defines from mips.h.
2001-08-07 13:22:46 +00:00
Thiemo Seufer 9a41af6410 Some formatting fixes and assorted cleanup in tc-mips.c. 2001-08-07 13:15:26 +00:00
Thiemo Seufer 6dce9e24b3 * config/tc-mips.c (md_begin): Take -mcpu value into account even when
-mipsX is specified. Make both -mcpu/-march and -mcpu/-mtune pairs
	mutually exclusive (if they are different).
	(md_parse_option): Warn if an -march/-mtune/-mcpu/-m<cpu> option is
	set more than once.
2001-08-07 12:46:22 +00:00
Richard Sandiford 236bd878b5 * config/tc-mips.c (md_apply_fix): Don't subtract the symbol value
from GPREL addends.
2001-08-03 18:33:34 +00:00
Richard Sandiford ca4e0257d1 * doc/c-mips.tex (-mgp32, -mfp32): Added -mfp32, unified with -mgp32.
* config/tc-mips.c (mips_fp32, mips_32bit_abi): New static variables.
	(md_long_opts): Add -mfp32 option.
	(md_parse_option): Handle it.  Set mips_32bit_abi given -mabi=32.
	(md_show_usage): Show usage for -mfp32 and -mgp32.
	(HAVE_32BIT_GPRS, HAVE_32BIT_FPRS): New macros.
	(HAVE_64BIT_GPRS, HAVE_64BIT_FPRS): New macros, inverse of the above.
	(HAVE_32BIT_ADDRESSES): New macro.
	(load_register): Use HAVE_32BIT_GPRS to determine the register width.
	(load_address): Use HAVE_32BIT_ADDRESSES to determine the address size.
	(s_cprestore, s_cpadd): Likewise.
	(macro): Use HAVE_32BIT_GPRS to determine the width of registers
	used in branch and M_LI_D macros.  Use HAVE_64BIT_FPRS to determine
	the width registers used in M_LI_DD macros.  Use HAVE_32BIT_ADDRESSES
	to determine the width of addresses in load, store and jump macros.
	(macro2): Use HAVE_32BIT_GPRS to determine the width of registers
	used in set instructions; do not check the address size for them.
	Use HAVE_32BIT_ADDRESSES to determine the width of addresses in
	unaligned load and store macros.
	(mips_ip): Use the new macros to check the width of a register when
	processing float constants.  Force a constant into memory if it is
	destined for an FPR and the FPRs are wider than the GPRs.  Warn about
	odd FPR numbers if HAVE_32BIT_FPRS.  Use HAVE_32BIT_GPRS rather
	than mips_gp32 to select synthetic instructions.
	(macro_build): Use HAVE_32BIT_GPRS rather than mips_gp32 to select
	synthetic instructions.
2001-08-02 10:15:24 +00:00
Nick Clifton 28bab82b5a Cleanups for z8k target 2001-08-01 15:39:17 +00:00
Alan Modra 28f815927f * config/tc-i386.c (lex_got): Match lower case relocation tokens.
Don't allocate more space than necessary for the input line copy.
2001-08-01 02:27:11 +00:00
Geoffrey Keating e138127ab2 * config/tc-ppc.c (ppc_elf_validate_fix): It's OK to have
any kind of relocation against a not-loaded section.
2001-07-31 19:24:57 +00:00
Alan Modra 468cced8b9 * config/obj-elf.c (obj_elf_symver): Temporarily modify lex_type
to include '@' in symbol names when parsing versioned symbols
	rather than calling get_symbol_end multiple times.
	* config/tc-i370.c (register_name): Format fixes.  Don't call
	get_symbol_end after parsing number.
	* config/tc-mn10200.c (data_register_name): Format fixes.  Hoist
	code out of conditional.
	(address_register_name): Likewise.
	(other_register_name): Likewise.
	* config/tc-mn10300.c (r_register_name): Likewise.
	(xr_register_name): Likewise.
	(data_register_name): Likewise.
	(address_register_name): Likewise.
	(other_register_name): Likewise.
	* config/tc-ppc.c (register_name): Likewise.
	* config/tc-s390.c (register_name): Likewise.
2001-07-30 06:15:49 +00:00
Stephane Carrez 13283e2df1 * config/tc-m68hc11.c (md_estimate_size_before_relax): Fix bsr
and bra relax: update fragP->fr_fix after the fixup.
2001-07-28 19:28:04 +00:00
H.J. Lu 46bac6de18 2001-07-25 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (md_estimate_size_before_relax): Make sure
	we treat weak like extern only for ELF.
	(mips_fix_adjustable): Make sure we don't adjust extern/weak
	symbols only for ELF.
2001-07-25 22:27:46 +00:00
Chris Demetriou 2f4dcb115b 2001-07-25 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.c: Fix spelling error in comment.
2001-07-25 20:34:39 +00:00
Kazu Hirata 0772685173 * config/tc-alpha.h: Fix formatting.
* config/tc-arc.c: Likewise.
	* config/tc-d10v.h: Likewise.
	* config/tc-hppa.c: Likewise.
	* config/tc-i370.c: Likewise.
	* config/tc-i386.h: Likewise.
	* config/tc-i960.h: Likewise.
	* config/tc-ia64.c: Likewise.
	* config/tc-ia64.h: Likewise.
	* config/tc-m32r.c: Likewise.
	* config/tc-m68k.c: Likewise.
	* config/tc-m88k.c: Likewise.
	* config/tc-ns32k.c: Likewise.
	* config/tc-pdp11.c: Likewise.
	* config/tc-pj.h: Likewise.
	* config/tc-s390.c: Likewise.
	* config/tc-sparc.c: Likewise.
	* config/tc-sparc.h: Likewise.
	* config/tc-tic80.c: Likewise.
	* config/tc-w65.h: Likewise.
2001-07-23 14:02:13 +00:00
Alan Modra ac62c3468d * symbols.c (S_GET_VALUE): Don't treat O_constant and local
symbols specially.  Always resolve, adding fr_address to value.
	* write.c (write_object_file): Don't add fr_address to sym values.
	(relax_frag): Likewise.
	(relax_segment): Likewise.
	* config/obj-ieee.c (do_symbols): Likewise.
	* config/tc-cris.c (md_convert_frag): Likewise.
	* config/tc-fr30.c (md_convert_frag): Likewise.
	* config/tc-i386.c (md_convert_frag): Likewise.
	* config/tc-m32r.c (md_convert_frag): Likewise.
	* config/tc-m68hc11.c (md_convert_frag): Likewise.
	* config/tc-mcore.c (md_convert_frag): Likewise.
	* config/tc-mips.c (mips16_extended_frag): Likewise.
	* config/tc-ns32k.c (md_convert_frag): Likewise.
	* config/tc-m68k.c (md_convert_frag_1): Likewise.
	(BRANCHBWL, BRABSJUNC, BRABSJCOND, BRANCHBW, FBRANCH, DBCCLBR,
	DBCCABSJ, PCREL1632, PCINDEX, ABSTOPCREL): Decrement.
	(md_relax_table): Remove first four entries.  Format.
	(md_estimate_size_before_relax): Remove old_fix.  Don't bother
	setting fr_var.  Simplify byte branch checks.
2001-07-23 13:03:40 +00:00
Alan Modra 677537c186 * config/tc-hppa.c (pa_parse_nonneg_cmpsub_cmpltr): Remove
"isbranch" param as all calls have it set.
	(pa_parse_neg_cmpsub_cmpltr): Likewise.
	(pa_parse_nonneg_add_cmpltr): Likewise.  Remember result of
	strcasecmp in "nullify" var.
	(pa_parse_neg_add_cmpltr): Likewise.
	(pa_ip): Don't "save_s" unnecessarily.  Update calls to above
	functions.  Don't print wrong conditions in error messages.
2001-07-23 12:50:22 +00:00
Andreas Jaeger c745b67a33 * config/tc-s390.c (s390_force_relocation): Removed.
* config/tc-s390.h: Remove double declaration of
	TC_FORCE_RELOCATION.
2001-07-23 10:21:22 +00:00
H.J. Lu 2b3c5a5dc1 2001-07-22 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (s_mips_end): Remove unused variables.
	(s_mips_frame): Add ATTRIBUTE_UNUSED.
2001-07-22 18:11:29 +00:00
Andreas Schwab f27a38390b * config/tc-m68k.c (md_pseudo_table) [OBJ_ELF]: Add .file and
.loc.
	(md_assemble) [OBJ_ELF]: Call dwarf2_emit_insn before emitting
	insn.
	* config/tc-m68k.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
2001-07-18 10:25:58 +00:00
Matthew Green 5bae9b28a0 * config/tc-i386.c (comment_chars): Don't use '/' as comment start if
TE_NetBSD.
	(line_comment_chars): Set to '/' if TE_NetBSD.
2001-07-17 09:57:52 +00:00
John Healy cdbb0887ba *** empty log message *** 2001-07-11 19:35:17 +00:00
Nick Clifton bdbe95c8c5 Don't merge if the storage class of the non-debug symbol is C_NULL. 2001-07-11 09:26:27 +00:00
John Healy 07e97ae2e3 2001-07-10 John Healy <jhealy@redhat.com>
* config/obj-elf.c (obj_elf_section): md_elf_section_change_data_hook
	added to grab section information after it's been extracted from the
	.section directive.
2001-07-10 21:49:11 +00:00
John Healy 002de68b31 2001-07-06 John Healy <jhealy@redhat.com>
* cgen.c (gas_cgen_save_fixups): Modified to allow more than one
        set of fixups to be stored.
        (gas_cgen_restore_fixups): Modified to allow the fixup chain to be
        restored to be chosen from any that are saved.
        (gas_cgen_swap_fixups): Modified to allow the current set of
        fixups to be swapped with any other set that has been saved.
        (gas_cgen_initialize_saved_fixups_array): New routine.
        * cgen.h: Modifed prototypes for gas_cgen_save_fixups,
        gas_cgen_restore_fixups, and gas_cgen_swap_fixups.  Added definitions
        or MAX_SAVED_FIXUP_CHAINS.
        * config/tc-m32r.c (assemble_two_insns): Changed calls to fixup
        store, swap and restore fuctions to reflect the new interface.
2001-07-06 19:09:23 +00:00
Nick Clifton 7099f9f917 Catch and ignore empty, ineffectual alignment frags when deciding if a
branch can be short.
2001-07-06 08:21:35 +00:00
Jim Wilson 557debbaef 32-bit unwind data for ia64-hpux, from Steve Ellcey
* config/tc-ia64.c (special_section): Add SPECIAL_SECTION_INIT_ARRAY
	and SPECIAL_SECTION_FINI_ARRAY.
	(special_section_name): Add .init_array and .fini_array.
	(md_pseudo_table): Add init_array and fini_array.
	(md): Add pointer_size and pointer_size_shift fields.
	(setup_unwind_header): New static function.
	(output_unw_records): Modify to use setup_unwind_header.
	(generate_unwind_image, dot_endp): Modify to use md.pointer_size and
	md.pointer_size_shift.
	(md_begin): Initialize md.pointer_size and md.pointer_size_shift.
2001-07-06 07:32:42 +00:00
Ben Elliston 4ad0936356 2001-07-05 Ben Elliston <bje@redhat.com>
* config/tc-m88k.c (md_pseudo_table): Remove redundant "global".
2001-07-05 07:28:06 +00:00
Jim Wilson 87885043df Fix ia64-linux gas ehopt testsuite failure.
* config/tc-ia64.c (md_pseudo_table): Add 2byte, 4byte, and 8byte.
2001-07-05 03:34:42 +00:00
Jim Wilson 3e37788f8d Fix 2 ia64-linux gas testsuite failures.
* config/tc-ia64.c (is_conditional_branch): Rewrite to exclude mod
	sched branches.
2001-07-05 02:30:21 +00:00
Eric Christopher 18ae5d728b 2001-07-04 Eric Christopher <echristo@redhat.com>
* doc/c-mips.texi (MIPS Opts): Document 12000 as valid cpu.

	* config/tc-mips.c (mips_cpu_info_table): Add rm5200, rm5231, rm5261,
	and rm5721 as valid cpu strings.
	(md_show_usage): Add rm5200, rm5231, rm5261, rm5721.
2001-07-04 12:32:07 +00:00
Richard Sandiford 7461da6e23 [gas]
* config/tc-mips.c (md_apply_fix): Prevent addend from becoming zero
	if it's expected to be non-zero.
[gas/testsuite]
	* gas/mips/elf-rel3.s: Add zero word to end of file.
2001-07-04 09:49:29 +00:00
Nick Clifton 7bcad3e505 Fix seg fault by replacing symbol_get_frag() with fscan->fx_frag. 2001-07-03 15:22:19 +00:00
Alan Modra 99a814a1cc * config/tc-ppc.c: Formatting fixes. 2001-07-02 10:54:49 +00:00
Ben Elliston bd59b34f1e 2001-07-01 Ben Elliston <bje@redhat.com>
* config/tc-m88k.c: Back out warning fixes from 2001-06-24, as
	they cause some subtle breakage.  Will fix them again later.
2001-07-01 06:36:43 +00:00
Nick Clifton e237d851a4 Treat a .ln directive outside of a function as a .appline directive. 2001-06-30 10:09:40 +00:00
Eric Christopher ec68c924f0 2001-06-28 Eric Christopher <echristo@redhat.com>
H.J. Lu  <hjl@gnu.org>

        * config/tc-mips.c (mips_arch): New. Use mips_arch instead
        of mips_cpu for the ISA selection.
        (md_longopts): Add OPTION_MARCH and OPTION_MTUNE.
        (md_parse_option): Handle OPTION_MARCH and OPTION_MTUNE.
	(mips_tune): New.  Use mips_tune for scheduling and optimization
	issues.
	(append_insn): Use mips_tune and mips_arch.
	(macro_build): Ditto.
	(mips_ip): Ditto.
	(md_begin): Handle mips_arch, mips_tune and mips_cpu.  For
	backwards compatability mips_cpu generates arch and tune.
	(md_show_usage): Document new behavior.

	* doc/c-mips.texi (MIPS Opts): Document -march and -mtune.
	Deprecate -mcpu.

	* NEWS: Update.

2001-06-28  Eric Christopher  <echristo@redhat.com>

	* gas/mips/usd.d: Change for march/mtune.
	* gas/mips/ulh-xgot.d: Ditto.
	* gas/mips/uld.d: Ditto.
	* gas/mips/trunc.d: Ditto.
	* gas/mips/rol.d: Ditto.
	* gas/mips/nodelay.d: Ditto.
	* gas/mips/mul.d: Ditto.
	* gas/mips/mul-ilocks.d: Ditto.
	* gas/mips/trap20.d: Ditto.
	* gas/mips/mips4.d: Ditto.
	* gas/mips/mips16.d: Ditto.
	* gas/mips/lif-xgot.d: Ditto.
	* gas/mips/lif-svr4pic.d: Ditto.
	* gas/mips/ld-xgot.d: Ditto.
	* gas/mips/ld-svr4pic.d: Ditto.
	* gas/mips/ld-ilocks-addr32.d: Ditto.
	* gas/mips/lb-xgot.d: Ditto.
	* gas/mips/jal-xgot.d: Ditto.
	* gas/mips/jal-svr4pic.d: Ditto.
	* gas/mips/delay.d: Ditto.
	* gas/mips/lb-xgot-ilocks.d: Ditto.
	* gas/mips/div.d: Ditto.
	* gas/mips/break20.d: Ditto.
	* gas/mips/delay.d: Ditto.
	* gas/mips/elf_e_flags3.d: Ditto.
	* gas/mips/elf_e_flags4.d: Ditto.
	* gas/mips/lineno.d: Ditto.
	* gas/mips/mips16.d: Ditto.
	* gas/mips/mips4.d: Ditto.
	* gas/mips/mips4010.d: Ditto.
	* gas/mips/mips4650.d: Ditto.
2001-06-29 21:27:43 +00:00
Nick Clifton d827344236 Use MVN to build simple inverted constants. 2001-06-27 08:15:52 +00:00
Jakub Jelinek 6f112c47dc * config/tc-alpha.c (tc_gen_reloc): Handle relocs against SEC_MERGE
section symbols the same way as externs.
2001-06-24 16:43:31 +00:00
Ben Elliston 453520d7ad 2001-06-24 Ben Elliston <bje@redhat.com>
* config/tc-m88k.c (md_number_to_imm): Remove; unused since 1993.
	(emit_relocations): Ditto.
	(s_bss): Ditto.
	(md_begin): Reformat comments to conform to the GNU standards.
	(md_assemble): Ditto.
2001-06-24 06:01:49 +00:00
Ben Elliston e21e484e83 * fixes to silence all compiler warnings.
2001-06-24  Ben Elliston  <bje@redhat.com>

	* config/tc-m88k.c (get_reg): Adjust type of `reg_prefix' to char.
	(md_parse_option): Mark parameters as unused.
	(md_show_usage): Ditto.
	(calcop): Adjust type of `reg_prefix' to char.
	(get_reg): Ditto.
	(getval): Adjust type of local `c' to char.
	(md_create_short_jump): Mark from_addr, to_addr params as unused.
	(md_create_long_jump): Ditto.
	(md_estimate_size_before_relax): Mark parameters as unused.
2001-06-24 01:56:48 +00:00
Ben Elliston a181d81e0c 2001-06-24 Ben Elliston <bje@redhat.com>
* config/tc-m88k.c (md_pseudo_table): Properly terminate the table
	to allay a possible compiler warning.
2001-06-23 23:02:57 +00:00
Nick Clifton 8be31359fc Add %mrp (millicode return pointer) alias for %r2 or %r31, depending on 32 or
64 bit architecture.
2001-06-22 08:17:57 +00:00
Nick Clifton 1cac90122e Allow adrCCl. [Patch from Phillip BLundel]
Updated ARM tests.
2001-06-21 19:46:54 +00:00
Alan Modra b091f402a9 * config/tc-hppa.c (CHECK_FIELD_WHERE): Define.
(md_apply_fix): Use it here.  Replace printf with equivalent
	as_bad_where.
	(tc_gen_reloc): Use as_bad_where instead of as_bad.
	(md_apply_fix): Here too.
	* config/tc-i386.c (tc_gen_reloc): Use as_bad_where instead of as_bad.
	* config/tc-m68k.c (tc_gen_reloc): Likewise.
	(md_convert_frag_1): Likewise.
2001-06-21 06:12:11 +00:00
Tom Rix 1ad63b2f00 Fix for problem with default alignment of .comm 2001-06-20 13:34:10 +00:00
Nick Clifton b99bd4efbd Restore file accidentally deleted during man page cleanup 2001-06-19 16:26:43 +00:00
Nick Clifton c45021f2d2 Remove auot generated man pages 2001-06-19 11:57:29 +00:00
Phil Blundell 2172d73b21 2001-06-18 Philip Blundell <philb@gnu.org>
* config/tc-arm.c (do_msr): Remove restriction on usage of
	immediate operands.
2001-06-19 07:33:21 +00:00
Phil Blundell 0b317b0807 2001-06-13 Philip Blundell <philb@gnu.org>
* config/tc-arm.c (thumb_shift): Improve wording of error message.
	(do_t_arit): Likewise.
2001-06-14 07:58:12 +00:00
Nick Clifton 2bc0a1288f Stop sh-coff port from trying to call dwarf2 debug functions 2001-06-13 16:46:05 +00:00
Nick Clifton e1f44d1052 Fix m68k/mri mode problems. 2001-06-12 10:35:24 +00:00
Nick Clifton 3971ce954f fix test for overlflow of literal pool 2001-06-12 08:27:53 +00:00
H.J. Lu 63486801dd 2001-06-11 H.J. Lu <hjl@gnu.org>
* NEWS: Updated for the new -n option for the MIPS assembler.

	* config/tc-mips.c (md_show_usage): Add -n.

	* doc/as.texinfo: Document the new -n option.
	* doc/c-mips.texi: Likewise.
	* doc/as.1: Regenerated.
2001-06-11 20:40:36 +00:00
Alan Modra 5dd0794dca Branch hints for Pentium4 as insn modifiers, and some minor tweaks
to formatting.
2001-06-10 14:07:12 +00:00
H.J. Lu 39c0a33100 2001-06-08 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (warn_nops): New variable. Set to 0 to
	disable warning about all NOPS that the assembler generates.
	(macro): Warn NOPS generated only if warn_nops is not 0.
	(md_shortopts): Add `n'.
	(md_parse_option): Set warn_nops to 1 for `n'.
2001-06-09 05:24:39 +00:00
H.J. Lu 268f6bed84 2001-06-08 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (mips_ip): Properly handle illegal operands.
2001-06-09 05:01:29 +00:00
H.J. Lu ea4ff978a2 2001-06-08 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (md_apply_fix): Don't adjust common
	extern/weak symbols for ELF.
	(md_estimate_size_before_relax): Treat weak like extern for
	ELF.
	(mips_fix_adjustable): Don't adjust extern/weak symbols for
	ELF.
2001-06-09 03:28:04 +00:00
Alan Modra 98aa84af0e * Makefile.am: 'som' is not wrongly spelled 'some'.
* Makefile.in: Regenerate.

	* config/tc-mips.c (mips16_mark_labels): Reduce number of calls to
	S_GET_VALUE by using a temp.
	(append_insn): Likewise, and for S_GET_VALUE too.
	(mips_emit_delays): Likewise.
	(my_getExpression): Likewise.
	(md_apply_fix): Likewise.  Use "valueT" rather than "long" for "value".
	(mips16_extended_frag): Remove code concerned with avoiding
	locking in a frag address now that symbols are not finalized until
	relaxation is complete.  Cater for first relaxation pass having
	bogus addresses.  Use relax_marker to reliably determine whether a
	symbol frag has been reached on the current pass.
2001-06-08 06:07:13 +00:00
H.J. Lu add565213d 2001-06-07 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (mips_pseudo_table): Add "extern" if
	MIPS_STABS_ELF is defined.
2001-06-07 16:52:19 +00:00
Nick Clifton 879db8be1a Remove warnings building z8k port.
Fix ld -r behaviour
2001-06-06 17:01:35 +00:00
Nick Clifton 98b3248268 correct some 68k/ColdFire problems 2001-06-06 14:28:00 +00:00
Alan Modra d6767af842 * config/tc-s390.h (TC_FORCE_RELOCATION): Always emit relocations
BFD_RELOC_VTABLE_INHERIT and BFD_RELOC_VTABLE_ENTRY.
2001-06-06 12:06:56 +00:00