[08/11] Arm: correct macro use in gas testsuite

Message ID d05756e1-3dec-49d0-8c9f-66f9738b0d82@suse.com
State Superseded
Headers
Series gas: scrubber adjustments |

Commit Message

Jan Beulich June 28, 2024, 1:23 p.m. UTC
  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.
  

Patch

--- 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)]