]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix gas's 'macro count' test for various targets
authorNick Clifton <nickc@redhat.com>
Tue, 14 May 2024 14:30:52 +0000 (15:30 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 14 May 2024 14:30:52 +0000 (15:30 +0100)
gas/app.c
gas/testsuite/gas/macros/count.s

index 3fd3765fcf99d10734525f4d5c8ec8b4a20cd7f6..041941a19266164ebf1e61755fb8a3db0719ddd7 100644 (file)
--- 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':
index 650a416f6faea21dfe7d7e0dfc136cf9dd78e9d5..c752ca8367d3856e553ce35b5d94499205cf591e 100644 (file)
@@ -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