[binutils-gdb] Fix gas's 'macro count' test for various targets
Nick Clifton
nickc@sourceware.org
Tue May 14 14:30:58 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b9a16391e8fa89cb986b0788040f59cb8a089e81
commit b9a16391e8fa89cb986b0788040f59cb8a089e81
Author: Nick Clifton <nickc@redhat.com>
Date: Tue May 14 15:30:52 2024 +0100
Fix gas's 'macro count' test for various targets
Diff:
---
gas/app.c | 5 +++++
gas/testsuite/gas/macros/count.s | 20 ++++++++++----------
2 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/gas/app.c b/gas/app.c
index 3fd3765fcf9..041941a1926 100644
--- a/gas/app.c
+++ b/gas/app.c
@@ -686,6 +686,11 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
PUT (quotechar);
continue;
+ /* These two are used inside macros. */
+ case '@':
+ case '+':
+ break;
+
case '"':
case '\\':
case 'b':
diff --git a/gas/testsuite/gas/macros/count.s b/gas/testsuite/gas/macros/count.s
index 650a416f6fa..c752ca8367d 100644
--- a/gas/testsuite/gas/macros/count.s
+++ b/gas/testsuite/gas/macros/count.s
@@ -1,19 +1,19 @@
-.macro mac1 count=10
+ .macro mac1 count
.print "\@"
.print "\+"
-.if \count > 1
+ .if \count > 1
mac1 \count-1
-.endif
-.endm
+ .endif
+ .endm
-.macro mac2 count=100
+ .macro mac2 count
.print "\@"
.print "\+"
-.if \count > 1
+ .if \count > 1
mac2 \count-1
-.endif
-.endm
+ .endif
+ .endm
-mac1 2
-mac2 3
+ mac1 2
+ mac2 3
More information about the Binutils-cvs
mailing list