diff options
author | Jan Beulich <jbeulich@novell.com> | 2005-04-11 12:46:38 +0000 |
---|---|---|
committer | Jan Beulich <jbeulich@novell.com> | 2005-04-11 12:46:38 +0000 |
commit | 5e75c3ab6ea7b02ce1262fc42fc436d604b47dde (patch) | |
tree | 853728772fd453f862e3b8ba62e77914b21077f5 /gas/doc | |
parent | 116c20d240af833e0a1f1f959951f57b6e465782 (diff) | |
download | gdb-5e75c3ab6ea7b02ce1262fc42fc436d604b47dde.zip gdb-5e75c3ab6ea7b02ce1262fc42fc436d604b47dde.tar.gz gdb-5e75c3ab6ea7b02ce1262fc42fc436d604b47dde.tar.bz2 |
gas/
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.
Diffstat (limited to 'gas/doc')
-rw-r--r-- | gas/doc/as.texinfo | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo index a316451..02e4ab4 100644 --- a/gas/doc/as.texinfo +++ b/gas/doc/as.texinfo @@ -4594,6 +4594,9 @@ is equivalent to assembling move d3,sp@@- @end example +For some caveats with the spelling of @var{symbol}, see also the discussion +at @xref{Macro}. + @node Irpc @section @code{.irpc @var{symbol},@var{values}}@dots{} @@ -4622,6 +4625,9 @@ is equivalent to assembling move d3,sp@@- @end example +For some caveats with the spelling of @var{symbol}, see also the discussion +at @xref{Macro}. + @node Lcomm @section @code{.lcomm @var{symbol} , @var{length}} @@ -4869,6 +4875,32 @@ When you call a macro, you can specify the argument values either by position, or by keyword. For example, @samp{sum 9,17} is equivalent to @samp{sum to=17, from=9}. +Note that since each of the @var{macargs} can be an identifier exactly +as any other one permitted by the target architecture, there may be +occasional problems if the target hand-crafts special meanings to certain +characters when they occur in a special position. For example, if colon +(@code{:}) is generally permitted to be part of a symbol name, but the +architecture specific code special-cases it when occuring as the final +character of a symbol (to denote a label), then the macro parameter +replacement code will have no way of knowing that and consider the whole +construct (including the colon) an identifier, and check only this +identifier for being the subject to parameter substitution. In this +example, besides the potential of just separating identifier and colon +by white space, using alternate macro syntax (@xref{Altmacro}.) and +ampersand (@code{&}) as the character to separate literal text from macro +parameters (or macro parameters from one another) would provide a way to +achieve the same effect: + +@example + .altmacro + .macro label l +l&: + .endm +@end example + +This applies identically to the identifiers used in @code{.irp} (@xref{Irp}.) +and @code{.irpc} (@xref{Irpc}.). + @item .endm @cindex @code{endm} directive Mark the end of a macro definition. |