Commit Graph

94 Commits

Author SHA1 Message Date
Alan Modra c9dea48b1f * as.h (assert): Warning fix.
* expr.c (expr): Correct assertion.
	* read.c (s_comm_internal): Remove assertion.
	* write.c (relax_segment): Enable vma assertion only for BFD_ASSEMBLER.
	(fixup_segment): Remove assertion.
	* config/tc-dlx.c (machine_ip): Remove untrue assertions.
	(md_apply_fix3): Likewise.
	* config/tc-i370.c (md_begin): Correct assertion.
	(i370_macro): Warning fix for assertion.
2005-03-01 02:00:15 +00:00
Catherine Moore ee3c981485 * read.c (read_a_source_file): Reinstate TC_EQUAL_IN_INSN test.
* doc/internals.texi (TC_EQUAL_IN_INSN): Reinstate.
2005-02-23 02:44:18 +00:00
Alan Modra b7712f8d34 * read.c: Warning fixes.
* config/obj-elf.c: Likewise.
2005-02-22 12:58:35 +00:00
Alan Modra cc1bc22af7 gas/
* read.c (address_bytes): New function.
	(TC_ADDRESS_BYTES): Default for BSD_ASSEMBLER to address_bytes.
	(potable): Add "dc.a".
	(cons_worker): Handle "dc.a".
	* doc/internals.texi (TC_ADDRESS_BYTES): Document.
ld/testsuite/
	* ld-elf/exclude1.s: Use ".dc.a".
	* ld-elfvsb/hidden2.s: Likewise.
2005-02-21 08:39:53 +00:00
Alan Modra b5682e5666 * config/tc-hppa.h (TC_EQUAL_IN_INSN): Delete.
* read.c (read_a_source_file): Remove TC_EQUAL_IN_INSN test.
	* doc/internals.texi (TC_EQUAL_IN_INSN): Delete.
2005-02-19 08:56:08 +00:00
Alan Modra f17c130bd8 * tc.h (struct relax_type, relax_typeS): Move from here..
* as.h: ..to here.  Make rlx_forward and rlx_backward an offsetT.
	* ecoff.c (ecoff_new_file): Add appfile param.
	* ecoff.h (ecoff_new_file): Likewise.
	* itbl-lex.h: New file.
	* itbl-lex.l: Include itbl-lex.h.
	* itbl-parse.y: Likewise.
	(insntbl_line, yyparse, yylex): Move to itbl-lex.h.
	* read.c (s_app_file_string): Mark appfile possibly unused.
	* subsegs.c (seg_not_empty_p): Make sec possibly unused.
	* subsegs.h (struct seg_info_trash): Delete.
	(seg_info): Use segment_info_type instead.
	* config/obj-coff.c (struct filename_list): Make filename const char *.
	* config/obj-ecoff.h (obj_app_file): Pass app to ecoff_new_file.
	* config/obj-elf.c (elf_file_symbol): Similarly.
	* config/tc-a29k.c (md_apply_fix3): Make val a valueT.  Don't use
	signed right shift.
	* config/tc-arc.c (md_operand): Warning fix.
	* config/tc-arm.c (arm_parse_reloc): Only define when OBJ_ELF.
	(md_begin): Rearrange #if defined OBJ_COFF || defined OBJ_ELF.
	* config/tc-cris.h (TC_IMPLICIT_LCOMM_ALIGNMENT): Use do while.
	* config/tc-frv.c (frv_force_relocation): Warning fix.
	* config/tc-m68k.c (md_parse_option): Delete unused var.
	* config/tc-mcore.c (mylog2): Rename from log2 throughout.
	* config/tc-sparc.c: Likewise.
	(s_common): Warning fix.
	* config/tc-mips.c (append_insn): Use unsigned long long expressions.
	* config/tc-mmix.c (PUSHJSTUB_MAX, PUSHJSTUB_MIN): Define from
	addressT.
	* config/tc-s390.c (s390_insn): Delete test of unsigned >= 0.
	* config/tc-sh.c (sh_cfi_frame_initial_instructions,
	sh_regname_to_dw2regnum): Only define for OBJ_ELF.
	* config/tc-tic4x.c (tic4x_insert_reg): Use ISLOWER.
	(tic4x_do_align): Use TIC_NOP_OPCODE.
	* config/tc-tic4x.h (TIC_NOP_OPCODE): Rename from NOP_OPCODE.
	* config/tc-vax.c: Include netinet/in.h.
	(tc_headers_hook): Formatting.
	* config/tc-xstormy16.c (md_pcrel_from_section): Correct parens.
2005-02-17 13:46:05 +00:00
Jan Beulich 057f53c1ad gas/
2005-01-31  Jan Beulich  <jbeulich@novell.com>

	* macro.c (do_formals): Adjust to no longer accept empty parameter
	names.
	(define_macro): Adjust to no longer accept empty macro name, garbage
	following the parameters, or macros that were previously defined.
	* read.c (s_bad_end): Declare.
	(potable): Add endm. Handler for endr and endm is s_bad_end.
	(s_bad_end): Rename from s_bad_endr. Adjust to handle both .endm
	and .endr.
	* read.h (s_bad_endr): Remove.

gas/testsuite/
2005-01-31  Jan Beulich  <jbeulich@novell.com>

	* gas/macros/badarg.[ls]: New.
	* gas/macros/end.[ls]: New.
	* gas/macros/redef.[ls]: New.
	* gas/macros/macros.exp (run_list_test): Copy from elsewhere.
	Run new tests.
2005-01-31 14:26:13 +00:00
Ben Elliston 59c871b457 * as.h: Remove #if 0'd code.
* atof-generic.c (atof_generic): Likewise.
	* ecoff.c (ecoff_directive_frame): Likewise.
	* frags.h (FRAG_APPEND_1_CHAR): Likewise.
	* itbl-ops.c (itbl_add_reg): Likewise.
	* listing.c (calc_hex): Likewise.
	* read.c (MASK_CHAR): Likewise.
	* subsegs.c (subsegs_print_statistics): Likewise.
	* symbols.c (indent): Likewise.
	* write.c (write_relocs): Likewise.
	(write_object_file): Likewise.
	(relax_frag): Likewise.
2005-01-21 05:54:38 +00:00
Alan Modra c556cc9c6d PR gas/684
* read.c (s_incbin): Adjust default count for skip.  Check validity
	of count and skip rigorously.
2005-01-20 06:46:41 +00:00
Richard Sandiford e5604d797e * read.c (convert_to_bignum): New function, split out from...
(emit_expr): ...here.  Handle the case where X_add_number is
	positive and the input value is negative.
	(output_big_sleb128): Fix setting of continuation bit.  Check whether
	the final byte needs to be sign-extended.  Fix size-shrinking loop.
	(emit_leb128_expr): When generating a signed leb128, see whether the
	sign of an O_constant's X_add_number matches the sign of the input
	value.  Use a bignum if not.
2005-01-19 11:53:53 +00:00
Alan Modra a207757ebf PR gas/619
* read.c (s_comm_internal): Don't zero end of name until size
	expression has been parsed.
2004-12-29 10:21:58 +00:00
Ben Elliston b617dc20de * read.c (s_align): Use an align_limit temporary to allay a GCC
signed/unsigned comparison warning.
2004-12-07 12:13:24 +00:00
Alan Modra 9ebd302d5e * read.c (ALIGN_LIMIT): Define, increasing limit for BFD_ASSEMBLER.
(s_align): Use it.
2004-12-02 09:39:14 +00:00
Hans-Peter Nilsson d190d04643 * read.c (potable): Add "error" and "warning".
(s_errwarn): New function.
	* read.h (s_errwarn): Declare.
	* doc/as.texinfo (Error, Warning): Document .error and .warning.
2004-11-22 13:05:27 +00:00
Alan Modra c04f57872c * obj.h (struct format_ops <app_file>): Add int param.
* read.h (s_app_file_string): Likewise.
	* read.c (s_app_file_string): Likewise.
	(s_app_file): Adjust s_app_file_string call.
	* config/tc-mips.c (s_mips_file): Likewise.
	* config/obj-coff.h (obj_app_file): Add app param.
	* config/obj-ecoff.h (obj_app_file): Likewise.
	* config/obj-multi.h (obj_app_file): Likewise.
	* config/obj-elf.h (elf_file_symbol): Likewise.
	* config/obj-elf.c (elf_file_symbol): Only emit one file symbol
	if called for # preprocessor lines.
2004-11-10 03:28:45 +00:00
Nick Clifton caa32fe507 Add and handle new --alternate command line option. 2004-08-13 19:53:52 +00:00
Nathan Sidwell b8861cfbc7 * read.c (do_align): Call md_flush_pending_output, if defined. 2004-04-19 09:32:55 +00:00
Nathan Sidwell c95b35a920 * read.c (read_a_source_file): Use demand_empty_rest_of_line.
(demand_empty_rest_of_line): Issue an error here.
	(ignore_rest_of_line): Silently skip to end.
	(demand_copy_string): Issue an error, not warning.
	(equals): Likewise.
	* config/obj-elf.c (obj_elf_section_name): Likewise.
	(obj_elf_section): Likewise.
	* config/tc-arc.c (arc_extoper): Remove bogus NULL checks.
	(arc_extinst): Likewise.
	* config/tc-ia64.c (dot_saveb): Use demand_empty_rest_of_line.
	(dot_spill): Likewise.
	(dot_unwabi): Likewise.
	(dot_prologue): Likewise.
2004-03-18 13:31:04 +00:00
Bob Wilson 00bbdfe753 * read.c (s_leb128): Call md_flush_pending_output. 2004-03-12 17:48:12 +00:00
Nathan Sidwell a8a3b3b21c * read.h (IGNORE_OPCODE_CASE): Do not define. Replace with ...
(TC_CASE_SENSITIVE): ... this.
	* read.c: Replace IGNORE_OPCODE_CASE with TC_CASE_SENSITIVE.
	* doc/internals.texi (TC_CASE_SENSITIVE): Document.
2004-02-09 12:12:42 +00:00
Nathan Sidwell e4475e391f .:
* dwarf2dbg.c (DWARF2_ADDR_SIZE): Remove trailing ';'
	* read.h (SKIP_WHITESPACE): Turn into an expression.
	* read.c (read_a_source_file): A pseudo is removed by having a
	NULL handler.
testsuite:
	* gas/macros/test2.s: Lowercase it.
2004-02-06 16:00:21 +00:00
Alan Modra 13c5698440 * read.c (s_lcomm_internal): Make global.
* read.h (s_lcomm_internal): Declare.
	* config/obj-elf.c (elf_pseudo_table): Handle lcomm.
	(obj_elf_lcomm): New function.
2003-12-13 08:59:24 +00:00
Alan Modra e13bab5a71 * read.c: Remove unneeded prototypes.
(s_comm): Split out code to..
	(s_comm_internal): ..here.  Tidy error returns.  Rearrange so that
	"name" from input line may be used in more places.  Merge code
	testing for valid size from elf_common.  Merge code from
	s_lcomm_internal.  Call comm_parse_extra.
	(bss_alloc): New function, split out of s_lcomm_internal and
	elf_common.
	(parse_align): Likewise.
	(s_lcomm_internal): Rewrite.
	(s_lcomm, s_lcomm_bytes): Use s_comm_internal.
	* read.h (bss_alloc, parse_align, s_comm_internal): Declare.
	* config/obj-elf.c (elf_common): Split out code to..
	(elf_common_parse): ..here.  Remove code common to s_comm_internal,
	parse_align and bss_alloc.  Rearrange and Tidy.
	* config/tc-alpha.h (TC_IMPLICIT_LCOMM_ALIGNMENT): Define.
2003-12-13 08:23:05 +00:00
Kazu Hirata 39e6acbdff * read.c: Convert to ISO-C.
* read.h: Likewise.
2003-11-27 19:14:41 +00:00
Kazu Hirata 47eebc207f * ChangeLog: Fix typos.
* ChangeLog-9295: Likewise.
	* as.c: Fix comment typos.
	* as.h: Likewise.
	* atof-generic.c: Likewise.
	* bit_fix.h: Likewise.
	* frags.h: Likewise.
	* hash.c: Likewise.
	* input-file.c: Likewise.
	* input-scrub.c: Likewise.
	* itbl-ops.c: Likewise.
	* itbl-parse.y: Likewise.
	* listing.c: Likewise.
	* macro.h: Likewise.
	* read.c: Likewise.
	* sb.c: Likewise.
	* sb.h: Likewise.
	* symbols.c: Likewise.
	* symbols.h: Likewise.
2003-10-27 12:45:17 +00:00
Alan Modra d6415f6cd6 * read.c (s_print): Check for NULL. 2003-08-16 14:04:48 +00:00
Rainer Orth 2d150871cf * read.c (s_space): Revert 2003-07-28 change. 2003-07-30 17:21:52 +00:00
Rainer Orth 8d548edbc9 * read.c (s_space): Don't warn about .space 0. 2003-07-28 20:35:59 +00:00
H.J. Lu b41b1f95b7 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
* read.c (do_parse_cons_expression): Mark nbytes unused to
	silence gcc.
2003-07-22 15:27:06 +00:00
Nick Clifton 685736be24 Update .comm error messages to assume an unsigned value.
Update relaxing code to work in 64-bit address spaces.
2003-06-24 11:10:47 +00:00
Richard Henderson cdfbf930b9 * dw2gencfi.c (struct cfi_escape_data): New.
(cfi_add_CFA_nop): Remove.
        (CFI_escape, dot_cfi_escape): New.
        (dot_cfi): Remove nop.
        (cfi_pseudo_table): Remove nop; add escape.
        (output_cfi_insn): Likewise.
        (select_cie_for_fde): Stop on escape.
        * dw2gencfi.h (cfi_add_CFA_nop): Remove.
        * read.c, read.h (do_parse_cons_expression): New.
        * doc/as.texinfo (.cfi_escape): New.

        * gas/cfi/cfi-common-3.[ds]: New.
        * gas/cfi/cfi.exp: Run it.
2003-06-11 23:16:58 +00:00
Alan Modra ed7d5d1a43 * read.c (emit_expr): Set dot_value.
* dw2gencfi.c (output_fde): Remove pcrel reloc hack.
2003-06-02 22:48:59 +00:00
Alan Modra 54cfded08e * dw2gencfi.c, dw2gencfi.h: New files.
* config/tc-i386.c (tc_x86_cfi_init): New function.
	* config/tc-i386.h (TARGET_USE_CFIPOP, tc_cfi_init): New defines.
	* as.c (parse_args): Set verbose flag on --verbose.
	(main): Call tc_cfi_init()/cfi_finish().
	* as.h (verbose): New external variable.
	* read.c (pobegin): Insert CFI pops to the list.
	* symbols.c (local_symbol_make): Make symbol external.
	* symbols.h (local_symbol_make): New prototype.
	* Makefile.am: Add dw2gencfi.[ch] files.  Run "make dep-am".
	* Makefile.in: Regenerate.
	* doc/as.texinfo: Added node "CFI directives" with description of
	all implemented .cfi_* directives.
	* doc/Makefile.in: Regenerate.
	* po/POTFILES.in: Regenerate.
2003-05-20 07:58:07 +00:00
Hans-Peter Nilsson 64e55042d6 * read.c (old_buffer, old_input, old_limit): Remove variables.
(read_a_source_file): Delete label contin.
	<handling #APP/#NO_APP>: Use an "sb" to push #APP expansion into
	input as with macros, instead of in separate old_* variables.
	Zero-terminate string being scrubbed.
2003-05-13 01:51:40 +00:00
H.J. Lu a645d1eb84 2003-05-01 H.J. Lu <hjl@gnu.org>
* config/tc-ia64.c (ia64_check_label): New.
	* config/tc-ia64.h (tc_check_label): New.

	* read.c (read_a_source_file): Call tc_check_label after
	creating a user-defined label if defined.
2003-05-02 02:41:45 +00:00
Nick Clifton 0822d0753e (buffer_and_nest): Store more to sb instead of '\n'.
(get_line_sb): Return end of line character or '\n' if it is zero or
non-existent.
2003-03-13 11:49:33 +00:00
Alan Modra a0ea3e1db8 * read.c (get_absolute_expr): New, split out from..
(get_absolute_expression): ..here.
	* read.h (get_absolute_expr): Declare.
	* config/obj-elf.c (elf_common): Use offsetT for "temp" and "size".
	Trim size to arch bits_per_address, and test for negative input
	via get_absolute_expr.
2003-01-11 06:24:12 +00:00
Nick Clifton fea179166e Remove GASP. 2002-12-02 15:42:15 +00:00
Hans-Peter Nilsson dc59a89726 * read.c (emit_expr) [WORKING_DOT_WORD]: Initialize x->use_jump. 2002-12-02 07:18:53 +00:00
Hans-Peter Nilsson a6bd2a4f18 * read.c (do_align): Use ATTRIBUTE_UNUSED_LABEL for label, not
ATTRIBUTE_UNUSED.
2002-08-31 18:51:07 +00:00
Alan Modra 7065849339 * dwarf2dbg.c: Always include dwarf2dbg.h.
(dwarf2_directive_file): Adjust dummy version args.
	* ecoff.c (ecoff_directive_weakext): Add ATTRIBUTE_UNUSED.
	* expr.c (clean_up_expression <O_subtract>): Allow subtraction
	when symbol values differ.
	* read.c (do_align): Add ATTRIBUTE_UNUSED to label.
	(pseudo_set <O_subtract>): Remove unnecessary segment test.
	* config/obj-bout.c (obj_pseudo_table): Warning fix.
2002-08-27 11:09:43 +00:00
Nick Clifton 8ac9ba6cf2 Catch attempts to create strings in the abs section. 2002-08-14 16:38:14 +00:00
Daniel Jacobowitz ecb4347ade 2002-06-14 H.J. Lu <hjl@gnu.org>
Daniel Jacobowitz  <drow@mvista.com>

        * dwarf2dbg.h (dwarf2_directive_file): Return char *.
        * dwarf2dbg.c (dwarf2_directive_file): Return filename.
        * config/tc-mips.c (s_mips_file): Call s_app_file_string
        and new_logical_line for the first .file directive.
        * read.c (s_app_file_string): New function.
        (s_app_file): Call it.
        * read.h (s_app_file_string): Add declaration.

2002-06-14  Daniel Jacobowitz  <drow@mvista.com>

        * configure.in: Remove MIPS_STABS_ELF.
        * configure: Regenerated.
        * config.in: Regenerated.
        * config/obj-elf.h (ECOFF_DEBUGGING): Define to mips_flag_mdebug
        for MIPS targets.
        * config/tc-mips.c (mips_pseudo_table): Remove #ifdef around
        ".extern".
        (pdr_seg): Declare unconditionally.
        (md_begin): Always generate .pdr unless ECOFF_DEBUGGING or not ELF.
        (s_mips_end): Likewise.  Generate stabs function markers.
        (s_mips_ent): Generate stabs function markers.
        (s_mips_frame): Always generate .pdr unless ECOFF_DEBUGGING or not
        ELF.
        (s_mips_mask): Likewise.
        (mips_flag_mdebug): New.
        (md_longopts): Add "mdebug" and "no-mdebug".
        (md_parse_options): Add OPTION_MDEBUG and OPTION_NO_MDEBUG.
        (mips_after_parse_args): Set mips_flag_mdebug.
        * doc/as.texinfo: Add "-mdebug" and "-no-mdebug" for MIPS.

2002-06-14  Daniel Jacobowitz  <drow@mvista.com>

        * gas/mips/lineno.d: Use --gstabs.
        * gas/mips/mips.exp (lineno.s): Remove XFAIL.
2002-06-14 14:08:54 +00:00
Kazu Hirata d1a6c2428d * as.h: Fix formatting.
* cgen.c: Likewise.
	* cgen.h: Likewise.
	* dwarf2dbg.c: Likewise.
	* frags.h: Likewise.
	* gasp.c: Likewise.
	* macro.c: Likewise.
	* read.c: Likewise.
	* stabs.c: Likewise.
	* symbols.c: Likewise.
2002-05-03 02:25:33 +00:00
Nick Clifton ceac3f6271 do not allow size or nbytes to go negative. 2002-01-07 17:51:18 +00:00
Nick Clifton 7f28ab9dc7 Generate warning message if .endr is used without preceeding .rept/.irc/.irp 2001-10-12 08:56:17 +00:00
Alan Modra ebeb92533b * subsegs.c (subseg_text_p): Return 0 for absolute section.
* read.c (do_align): If in absolute section, warn about and ignore
	non-zero fill pattern.
2001-10-05 10:53:00 +00:00
H.J. Lu 3882b01078 Locale changes from Bruno Haible <haible@clisp.cons.org>. 2001-09-19 05:33:36 +00:00
Alan Modra 23fe39dfb9 * ecoff.c (ecoff_frob_symbol): Remove casts from bfd_get_gp_size.
(ecoff_build_symbols): Likewise.
	* read.c (s_lcomm_internal): Fix signed/unsigned warning.
2001-08-17 16:01:49 +00:00
Alan Modra 0e389e770d * read.c: Standardize error/warning messages - don't capitalise, no
final period or newline, don't say "ignored" or "zero assumed" for
	as_bad messages.  In some cases, change the wording to that used
	elsewhere for similar messages.
	* app.c, as.c, atof-generic.c, cgen.c, cond.c, depend.c, dwarf2dbg.c,
	  ecoff.c, expr.c, frags.c, input-file.c, input-scrub.c, listing.c,
	  output-file.c, stabs.c, subsegs.c, symbols.c, write.c: Likewise.
	* ecoff.c (ecoff_directive_end): Test for missing name by
	comparing input line pointers rather than reading string.
	(ecoff_directive_ent): Likewise.
	* read.c (s_set): Likewise.
	(s_align): Report a warning rather than an error for
	alignment too large.
	(s_comm): Check for missing symbol name.
	(s_lcomm_internal): Likewise.
	(s_lsym): Likewise.
	(s_globl): Use is_end_of_line instead of looking for '\n'.
	(s_lcomm_internal): Likewise.
	(ignore_rest_of_line): Report a warning rather than an error.
2001-08-01 01:44:25 +00:00