aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
Diffstat (limited to 'gas')
-rw-r--r--gas/macro.c5
-rw-r--r--gas/testsuite/gas/macros/macros.exp1
-rw-r--r--gas/testsuite/gas/macros/rept.l8
3 files changed, 14 insertions, 0 deletions
diff --git a/gas/macro.c b/gas/macro.c
index d0c90d3..8b376f7 100644
--- a/gas/macro.c
+++ b/gas/macro.c
@@ -220,6 +220,11 @@ buffer_and_nest (const char *from, const char *to, sb *ptr,
{
/* Reset the string to not include the ending rune. */
ptr->len = line_start;
+
+ /* With the ending directive consumed here, announce the
+ line for macro-expanded listings. */
+ if (listing & LISTING_MACEXP)
+ listing_newline (NULL);
break;
}
}
diff --git a/gas/testsuite/gas/macros/macros.exp b/gas/testsuite/gas/macros/macros.exp
index 3e84902..3ac199f 100644
--- a/gas/testsuite/gas/macros/macros.exp
+++ b/gas/testsuite/gas/macros/macros.exp
@@ -29,6 +29,7 @@ run_dump_test test3
if { ![istarget *c54x*-*-*] && ![istarget *c4x*-*-*] && ![istarget "nds32*-*-*"] } {
run_dump_test irp
run_dump_test rept
+ run_list_test rept "-almn"
run_dump_test repeat
run_dump_test vararg
}
diff --git a/gas/testsuite/gas/macros/rept.l b/gas/testsuite/gas/macros/rept.l
new file mode 100644
index 0000000..626e9dc
--- /dev/null
+++ b/gas/testsuite/gas/macros/rept.l
@@ -0,0 +1,8 @@
+#...
+[ ]*[1-9][0-9]*[ ]+\.rept 3
+[ ]*[1-9][0-9]*[ ]+\.long foo1
+[ ]*[1-9][0-9]*[ ]+\.endr
+[ ]*[1-9][0-9]* 0000 [0 ]+> +\.long foo1
+[ ]*[1-9][0-9]* 000[48] [0 ]+> +\.long foo1
+[ ]*[1-9][0-9]* 00[01][08] [0 ]+> +\.long foo1
+#pass