]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Arm: correct macro use in gas testsuite
authorJan Beulich <jbeulich@suse.com>
Fri, 19 Jul 2024 09:55:54 +0000 (11:55 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 19 Jul 2024 09:55:54 +0000 (11:55 +0200)
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.

gas/testsuite/gas/arm/group-reloc-ldrs-encoding-bad.s
gas/testsuite/gas/arm/group-reloc-ldrs.s

index ac7a90f0e9e2e8d68e421924225983c6ffca4820..7799bf114bdf913c5fb06215f977e23ba5d7737b 100644 (file)
@@ -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)]
index fa74e7eabe0af0fc050ac66267ac5f47a2f16ff9..96655e14d9835655f4f5aa2db44268b7a5f920e8 100644 (file)
@@ -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)]