aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2024-05-14 15:30:52 +0100
committerNick Clifton <nickc@redhat.com>2024-05-14 15:30:52 +0100
commitb9a16391e8fa89cb986b0788040f59cb8a089e81 (patch)
treeecb0d0ac007532d409641a282ce86d83cc566304
parent414aa6987f21a814851e5f3113388a3616993fa3 (diff)
downloadgdb-b9a16391e8fa89cb986b0788040f59cb8a089e81.zip
gdb-b9a16391e8fa89cb986b0788040f59cb8a089e81.tar.gz
gdb-b9a16391e8fa89cb986b0788040f59cb8a089e81.tar.bz2
Fix gas's 'macro count' test for various targets
-rw-r--r--gas/app.c5
-rw-r--r--gas/testsuite/gas/macros/count.s20
2 files changed, 15 insertions, 10 deletions
diff --git a/gas/app.c b/gas/app.c
index 3fd3765..041941a 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 650a416..c752ca8 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