diff options
author | Jan Beulich <jbeulich@suse.com> | 2024-06-10 09:06:37 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2024-06-10 09:06:37 +0200 |
commit | 1e3c814459d83247707f8c9840ac660726cfaae0 (patch) | |
tree | 9135b4011333ae2afc9c2b882a5f3f6f4d40cca8 /gas/doc | |
parent | d967140f8ca04a3fbe607382d615af35f9df9453 (diff) | |
download | gdb-1e3c814459d83247707f8c9840ac660726cfaae0.zip gdb-1e3c814459d83247707f8c9840ac660726cfaae0.tar.gz gdb-1e3c814459d83247707f8c9840ac660726cfaae0.tar.bz2 |
gas: extend \+ support to .rept
PR gas/31752
While not quite as macro-like as .irp / .irpc, this perhaps benefits from
supporting \+ even more than those: It allows, where desired, to get away
without maintaining an explicit count variable in source code.
Keep .rep (and custom per-arch uses of s_rept() / do_repeat()) behavior
unaltered.
Diffstat (limited to 'gas/doc')
-rw-r--r-- | gas/doc/as.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gas/doc/as.texi b/gas/doc/as.texi index 90898d7..33169a5 100644 --- a/gas/doc/as.texi +++ b/gas/doc/as.texi @@ -6739,6 +6739,13 @@ is equivalent to assembling A count of zero is allowed, but nothing is generated. Negative counts are not allowed and if encountered will be treated as if they were zero. +Much like for macros, @code{.irp}, and @code{.irpc} the @samp{\+} sequence can +be used to substitute in the number of iterations done so far. In such cases, +i.e. when any @samp{\+} character sequence is present between @code{.rept} and +the corresponding @code{.endr}, other backslashes also need escaping by +backslashes. Naturally the amount of escaping necessary may increase when +using nested constructs. + @node Sbttl @section @code{.sbttl "@var{subheading}"} |