From: Jan Beulich Date: Fri, 19 Jul 2024 09:55:54 +0000 (+0200) Subject: Arm: correct macro use in gas testsuite X-Git-Tag: binutils-2_43~65 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cfa18744d435b55bbbbc5ef1ae1df67e84aa1777;p=thirdparty%2Fbinutils-gdb.git Arm: correct macro use in gas testsuite The way the inner macro invocations are written doesn't quite work as expected (and would actually break subsequently): Due to overly aggressive removal of whitespace by the scrubber, the incoming \sym and \offset arguments actually get concatenated; an empty 3rd argument is being passed to ldrtest2. That just so happened to work as intended; any use of \offset alone would have exposed the problem. Quote the 3rd argument, thus retaining enough whitespace to be independent of scrubber internals. --- diff --git a/gas/testsuite/gas/arm/group-reloc-ldrs-encoding-bad.s b/gas/testsuite/gas/arm/group-reloc-ldrs-encoding-bad.s index ac7a90f0e9e..7799bf114bd 100644 --- a/gas/testsuite/gas/arm/group-reloc-ldrs-encoding-bad.s +++ b/gas/testsuite/gas/arm/group-reloc-ldrs-encoding-bad.s @@ -14,7 +14,7 @@ .macro ldrtest load store sym offset - ldrtest2 \load \sym \offset + ldrtest2 \load \sym "\offset" \store r0, [r0, #:pc_g1:(\sym \offset)] \store r0, [r0, #:pc_g2:(\sym \offset)] diff --git a/gas/testsuite/gas/arm/group-reloc-ldrs.s b/gas/testsuite/gas/arm/group-reloc-ldrs.s index fa74e7eabe0..96655e14d98 100644 --- a/gas/testsuite/gas/arm/group-reloc-ldrs.s +++ b/gas/testsuite/gas/arm/group-reloc-ldrs.s @@ -14,7 +14,7 @@ .macro ldrtest load store sym offset - ldrtest2 \load \sym \offset + ldrtest2 \load \sym "\offset" \store r0, [r0, #:pc_g1:(\sym \offset)] \store r0, [r0, #:pc_g2:(\sym \offset)]