Commit Graph

15 Commits

Author SHA1 Message Date
Jan Beulich 6eaeac8ad7 gas/
2005-05-06  Jan Beulich  <jbeulich@novell.com>

	* macro.c (new_formal, del_formal): New.
	(do_formals): Use new_formal. Check for and parse qualifier. Warn if
	required argument has default value. Stop looking for more formal
	when there was a vararg one.
	(macro_expand_body): Use new_formal and del_formal.
	(macro_expand): Likewise. Initialize local variable err. Don't
	return immediately when encountering an error. Warn when keyword
	argument already had a value assigned. Eliminate duplicate clearing
	of argument value. When current positional argument matches parameter
	of vararg type, assign to it all the remaining arguments. Issue error
	when required parameter does not have value.
	(free_macro): Use del_formal.
	(expand_irp): Initialize formal type. Free buffers associated with
	formal prior to returning.
	* macro.h (struct formal_struct): Add new field 'type' with new
	enumeration type 'formal_type'.
	* doc/as.texinfo: Document macro parameter qualifiers.
	* NEWS: Mention new functionality.

gas/testsuite/
2005-05-06  Jan Beulich  <jbeulich@novell.com>

	* gas/macros/badarg.s: Add check for bad qualifier specification.
	* gas/macros/badarg.l: Adjust.
	* gas/macros/vararg.[sd]: New.
	* gas/macros/macros.exp: Run new test.
2005-05-06 06:50:31 +00:00
Nick Clifton 4b4da1607a Update the address and phone number of the FSF 2005-05-05 09:13:19 +00:00
Nick Clifton c1d05a606c * config/obj-ecoff.c (ecoff_frob_file_before_fix): Fix invocations of bfd_section_list... macros.
* config/tc-mmix.c (mmix_frob_file): Likewise.
* config/tc-xtensa.c (xtensa_remove_section): Likewise.
	(xtensa_insert_section): Likewise.

* macro.c (macro_hash): Remove static.
* macro.h (macro_hash): Provide an external declaration.
2005-05-03 12:02:47 +00:00
Jan Beulich 02ddf15681 gas/
2005-04-25  Jan Beulich  <jbeulich@novell.com>

	* macro.c (macro_expand_body): Replace locals indicator parameters
	with actual macro_entry. New local variables macro_line and err.
	Don't return when encountering an error, just record the fact.
	Detect local symbol name colliding with parameter. Track line number
	inside of macro expansion.
	(do_formals): Move local variable name to wider scope. Check
	parameter of the same name doesn't already exist. In MRI mode, also
	check it doesn't collide with the argument count pseudo-parameter).
	(define_macro): Add file and line number parameters. Remove local
	variable namestr. New local variable error. Initialize macro_entry
	members file, line, and name. Don't return when encountering an
	error, just record the fact. Use %s in some diagnostics for read.c
	to insert the macro name. Free macro_entry on error.
	(macro_expand): Pass macro_entry to macro_epand_body. Don't return
	when encountering an error, just record the fact.
	(expand_irp): Don't return when encountering an error, just record
	the fact.
	* macro.h (macro_struct): New members name, file, and line.
	(define_macro): Add file and line number parameters.
	* read.c (s_macro): Pass file and line to define_macro. Tag warning
	regarding pseudo-op redefinition with the file/line that macro
	definition started at.

gas/testsuite/
2005-04-25  Jan Beulich  <jbeulich@novell.com>

	* gas/macros/badarg.s: Add tests for collisions between/among macro
	parameters and local symbols.
	* gas/macros/badarg.l: Adjust.
2005-04-25 06:43:46 +00:00
Alan Modra 2da5c03714 update copyright dates 2005-03-03 01:29:54 +00:00
Nick Clifton caa32fe507 Add and handle new --alternate command line option. 2004-08-13 19:53:52 +00:00
Kazu Hirata 254d758cf9 * listing.c: Convert to ISO-C.
* listing.h: Likewise.
	* macro.c: Likewise.
	* macro.h: Likewise.
2003-11-24 17:52:33 +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
Nick Clifton fea179166e Remove GASP. 2002-12-02 15:42:15 +00:00
Kazu Hirata 411863a44d * app.c: Fix formatting.
* as.c: Likewise.
	* ehopt.c: Likewise.
	* expr.c: Likewise.
	* input-file.c: Likewise.
	* listing.c: Likewise.
	* macro.h: Likewise.
	* stabs.c: Likewise.
	* symbols.c: Likewise.
2002-05-18 12:53:30 +00:00
Nick Clifton f7e42eb4af Fix copyright notices 2001-03-08 23:24:26 +00:00
Kazu Hirata ef99799a42 2000-11-06 Kazu Hirata <kazu@hxi.com>
* as.c: Fix formatting.
	* dwarf2dbg.c: Likewise.
	* itbl-ops.c: Likewise.
	* listing.c: Likewise.
	* macro.h: Likewise.
	* messages.c: Likewise.
	* read.c: Likewise.
	* subsegs.c: Likewise.
	* subsegs.h: Likewise.
	* write.c: Likewise.
2000-11-07 01:18:45 +00:00
Kazu Hirata a01b9fa4ba 2000-09-12 Kazu Hirata <kazu@hxi.com>
* as.h: Fix formatting.
	* asintl.h: Likewise.
	* bit_fix.h: Likewise.
	* dwarf2dbg.h: Likewise.
	* expr.h: Likewise.
	* flonum.h: Likewise.
	* frags.h: Likewise.
	* itbl-ops.h: Likewise.
	* macro.h: Likewise.
	* read.h: Likewise.
	* sb.h: Likewise.
	* struc-symbol.h: Likewise.
	* subsegs.h: Likewise.
	* symbols.h: Likewise.
	* tc.h: Likewise.
	* write.h: Likewise.
2000-09-12 20:57:14 +00:00
Timothy Wall 9f10757c40 Add macro handling extensions and line substitution support. 2000-03-26 14:47:33 +00:00
Richard Henderson 252b5132c7 19990502 sourceware import 1999-05-03 07:29:11 +00:00