[PATCH v2 07/17] Arm: correct macro use in gas testsuite
Jan Beulich
jbeulich@suse.com
Fri Jul 12 13:02:57 GMT 2024
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.
--- 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)]
--- 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)]
More information about the Binutils
mailing list