mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-26 19:44:11 +08:00
gas: generated code/data listing output vs .endr and alike
These ending directives are swallowed by buffer_and_nest() and hence aren't seen by read_a_source_file(). Thus they also weren't announced to the listing subsystem. That was, when macro expansions are included, thus misguided to associate possible output resulting from the first line of the construct being expanded with both the .endr and that first line (i.e. showing it twice).
This commit is contained in:
parent
358ada8bc5
commit
4f14f47e0c
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
8
gas/testsuite/gas/macros/rept.l
Normal file
8
gas/testsuite/gas/macros/rept.l
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user