From b9a16391e8fa89cb986b0788040f59cb8a089e81 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 14 May 2024 15:30:52 +0100 Subject: [PATCH] Fix gas's 'macro count' test for various targets --- 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 -- 2.11.4.GIT