aboutsummaryrefslogtreecommitdiff
path: root/gas/macro.c
AgeCommit message (Collapse)AuthorFilesLines
2008-08-12Banish PARAMS and PTR. Convert to ISO C.Alan Modra1-1/+1
Delete unnecessary forward declarations.
2008-08-11 PR 6575Alan Modra1-5/+7
* hash.c: Expand PTR to void *. (hash_delete): Add "freeme" parameter. Call obstack_free. * hash.h: Expand PTR to void *. (hash_delete): Update prototype. * macro.c (macro_expand_body): hash_delete LOCALs from formal_hash. * config/tc-tic54x.c (tic54x_remove_local_label): Update hash_delete call. (subsym_substitute): Likewise. * doc/internals.texi (hash_delete): Update.
2007-07-03Switch to GPLv3Nick Clifton1-2/+2
2007-01-12PR gas/3856Nick Clifton1-2/+12
* macro.c (expand_irp): Do not ignore spaces inside quoted strings.
2006-06-07remove some duplicate #include's.Alan Modra1-37/+1
2006-05-01 * listing.c (listing_listing): Remove useless loop.Ben Elliston1-3/+0
* macro.c (macro_expand): Remove is_positional local variable. * read.c (s_comm_internal): Simplify `if' condition 1 || x -> 1 and simplify surrounding expressions, where possible. (assign_symbol): Likewise. (s_weakref): Likewise. * symbols.c (colon): Likewise.
2006-02-28gas/Jan Beulich1-4/+3
2006-02-28 Jan Beulich <jbeulich@novell.com> * macro.c (get_any_string): Don't insert quotes for <>-quoted input. gas/testsuite/ 2006-02-28 Jan Beulich <jbeulich@novell.com> * gas/all/altmacro.s: Adjust. * gas/all/altmac2.s: Adjust.
2006-02-28gas/Jan Beulich1-37/+40
2006-02-28 Jan Beulich <jbeulich@novell.com> PR/1070 * macro.c (getstring): Don't treat parentheses special anymore. (get_any_string): Don't consider '(' and ')' as quoting anymore. Special-case '(', ')', '[', and ']' when dealing with non-quoting characters. gas/testsuite/ 2006-02-28 Jan Beulich <jbeulich@novell.com> * gas/macros/paren[sd]: New. * gas/macros/macros.exp: Run new test.
2005-11-07 * macro.c (buffer_and_nest): Skip labels regardless ofAlan Modra1-36/+33
NO_PSEUDO_DOT and flag_m68k_mri.
2005-08-09PR 1070Nick Clifton1-5/+26
* macro.c (getstring): Do not treat round parentheses exactly the same as angle brackets - the parentheses need to be preserved and passed on to the macro processing code.
2005-08-08PR 1070Nick Clifton1-8/+16
* macro.c (getstring): Treat round parentheses in the same way as angle brackets. (get_any_string): Likewise.
2005-05-10gas/Jan Beulich1-23/+14
2005-05-10 Jan Beulich <jbeulich@novell.com> * macro.c (get_any_string): Remove the two last parameters. Replace references to the former expand parameter by using macro_alternate. Simplify loop condition for checking for end-of-string. (get_string): Remove redunant call to sb_skip_white. (do_formals): Remove two last arguments to get_any_string. (macro_expand): Likewise. (expand_irp): Likewise.
2005-05-06gas/Jan Beulich1-69/+143
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-05Update the address and phone number of the FSFNick Clifton1-2/+2
2005-05-03* config/obj-ecoff.c (ecoff_frob_file_before_fix): Fix invocations of ↵Nick Clifton1-1/+1
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-04-29 * Makefile.am (GAS_CFILES): Remove bignum-copy.c.Ben Elliston1-1/+1
(GENERIC_OBJS): Likewise, remove bignum-copy.o. (bignum-copy.o): Remove. * Makefile.in: Regenerate. * makefile.vms (OBJS): Remove bignum-copy.obj. * symbols.h (local_symbol_make): Remove declaration. (verify_symbol_chain_2): Likewise. * symbols.c (local_symbol_make): Make static. (max_indent_level): Likewise. (verify_symbol_chain_2): Remove. * macro.c (macro_hash): Make static. * messages.c (fprint_value): Remove. * read.h (get_absolute_expr): Remove. (emit_leb128_expr): Likewise. (do_s_func): Likewise. * read.c (do_s_func): Make static. (emit_leb128_expr): Likewise. (get_absolute_expr): Likewise. * as.h (as_howmuch): Remove declaration. (fprint_value): Likewise. * as.c (myname): Make static. * input-scrub.c (as_howmuch): Remove. (as_1_char): Likewise. * input-file.h (input_file_is_open): Remove. * input-file.c (input_file_is_open): Likewise. * expr.h (expr_build_unary): Remove declaration. (expr_build_binary): Likewise. * expr.c (expr_build_unary): Remove. (expr_build_binary): Likewise. * hash.h (hash_replace): Remove declaration. (hash_delete): Likewise. * hash.c (hash_replace): Remove. (hash_delete): Likewise. * bignum-copy.c (bignum_copy): Move from here .. * config/tc-vax.c (bignum_copy): .. to here. * bignum.h (LOG_TO_BASE_2_OF_10): Remove. (bignum_copy): Remove extern declaration. * sb.h (string_count): Remove extern declaration. (sb_build, sb_add_buffer, sb_print, sb_print_at): Likewise. (sb_name): Likewise. * sb.c (dsize): Replace preprocessor macro with static int. (string_count): Make static. (sb_build, sb_add_buffer, sb_print, sb_print_at): Likewise. (sb_name): Likewise. * config/obj-coff.c (dim_index): Make static. * config/tc-i386.c (GOT_symbol): Likewise. (output_invalid_buf): Likewise. * doc/internals.texi (Warning and error messages): Remove the prototype for fprint_value.
2005-04-25gas/Jan Beulich1-55/+93
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-18gas/Jan Beulich1-3/+43
2005-04-18 Jan Beulich <jbeulich@novell.com> * macro.c (free_token): New, freeing all the memory associated with a macro. (do_formals): Move initializers to ... (define_macro): ... here. (delete_macro): Convert passed in name to lower case. Warn when purging macro that doesn't exist. Use hash_jam instead of hash_delete. gas/testsuite/ 2005-04-18 Jan Beulich <jbeulich@novell.com> * gas/macros/purge.[ls]: New. * gas/macros/macros.exp: Run new test.
2005-04-11gas/Jan Beulich1-36/+52
2005-04-11 Jan Beulich <jbeulich@novell.com> * NEWS: Mention these changes and their effects. * macro.c (get_token): Use is_name_beginner/is_part_of_name/ is_name_ender. (check_macro): Likewise. (buffer_and_nest): Likewise. Permit multiple labels. Don't discard labels together with the closing pseudo-op. (macro_expand_body): Adjust comment. Range-check input before use. Adjust mis-spelled diagnostic. Use is_name_beginner. * read.c (try_macro): New. (read_a_source_file): New static variable last_eol. Don't list macro expansion lines more than once. Call try_macro. (s_macro): Set section of line_label to absolute instead of undefined. * doc/as.texinfo: Add information on the caveats of these changes. gas/testsuite/ 2005-04-11 Jan Beulich <jbeulich@novell.com> * gas/macros/dot.[ls]: New. * gas/macros/macros.exp: Run new test.
2005-03-03update copyright datesAlan Modra1-2/+2
2005-01-31gas/Jan Beulich1-13/+26
2005-01-31 Jan Beulich <jbeulich@novell.com> * macro.c (buffer_and_nest): Allow 'from' being NULL; handle anything that can end with .endr in that case. Make requiring/permitting pseudo-ops without leading dot closer to the logic in read.c serving the same purpose. (expand_irp): Don't pass a mnemonic to buffer_and_nest as it will be ignored. gas/testsuite/ 2005-01-31 Jan Beulich <jbeulich@novell.com> * gas/macros/repeat.[ds]: New. * gas/macros/macros.exp: Run new test.
2005-01-31gas/Jan Beulich1-14/+35
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.
2004-10-07For ELF targets use .LL rather than LL as the prefix for symbol names generatedNick Clifton1-2/+3
from the LOCAL macro directive.
2004-08-16(macro_set_alternate): Use ISO C90 formatting.Nick Clifton1-2/+1
2004-08-13Add and handle new --alternate command line option.Nick Clifton1-0/+9
2003-11-24 * listing.c: Convert to ISO-C.Kazu Hirata1-83/+30
* listing.h: Likewise. * macro.c: Likewise. * macro.h: Likewise.
2003-06-02 * macro.c (sub_actual): Don't lose string if it turns out thatAlan Modra1-0/+1
&string wasn't an arg.
2003-03-13(buffer_and_nest): Store more to sb instead of '\n'.Nick Clifton1-2/+2
(get_line_sb): Return end of line character or '\n' if it is zero or non-existent.
2003-01-03 * configure.in: Add iq2000-elf target.Stan Cox1-2/+2
* configure: Regenerate. * config/tc-iq2000.c: New file. * config/tc-iq2000.h: Likewise.
2002-12-02Remove GASP.Nick Clifton1-44/+20
2002-11-11 * macro.c (get_any_string): Correct logic for not going beyond endHans-Peter Nilsson1-1/+1
of in->ptr[].
2002-05-03 * as.h: Fix formatting.Kazu Hirata1-24/+24
* 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-01-17Add no-c-format comment to prevent confusion when translating string.Nick Clifton1-1/+2
2001-09-19Locale changes from Bruno Haible <haible@clisp.cons.org>.H.J. Lu1-18/+15
2001-08-10 * as.h (alloca): Don't declare if __GNUC__. Remove an old comment.Alan Modra1-11/+5
Comment indentation of #pragma. * macro.c (alloca): Likewise.
2001-06-12Fix m68k/mri mode problems.Nick Clifton1-15/+23
2001-03-08Fix copyright noticesNick Clifton1-1/+1
2000-12-12Fix formattingNick Clifton1-5/+5
2000-08-312000-08-31 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-62/+65
* frags.c: Fix formatting. * macro.c: Likewise.
2000-06-25Fix spelling typos.Nick Clifton1-5/+12
Remove use of DEFUN().
2000-06-142000-06-13 Ulf Carlsson <ulfc@engr.sgi.com>Ulf Carlsson1-0/+11
* macro.c (getstring): Make it possible to escape the quote character.
2000-05-01* macro.c (macro_expand_body): Don't prepend macro number with zeroes.Catherine Moore1-1/+1
2000-03-26Add macro handling extensions and line substitution support.Timothy Wall1-37/+6
1999-11-12fix typo.Nick Clifton1-1/+1
1999-11-12do not look beyond the end of the bufferNick Clifton1-2/+2
1999-11-11Look for seperator after TO and FROM tokens when exploring nested structuresNick Clifton1-2/+4
1999-06-03 * gasp.c (chunksize): New variable.Ian Lance Taylor1-2/+4
* macro.c (macro_expand_body): Call hash_jam with NULL rather than hash_delete .CVS: ----------------------------------------------------------------------
1999-05-0319990502 sourceware importbinu_ss_19990502Richard Henderson1-0/+1259