This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Macro parameter parsing problem
- From: Andreas Schwab <schwab at suse dot de>
- To: binutils at sources dot redhat dot com
- Date: Fri, 01 Jul 2005 15:11:24 +0200
- Subject: Macro parameter parsing problem
Is the following supposed to work (on ppc)?
.macro sxrk rk src
lwz %r24,0(\src)
.endm
.macro eblock rk src
sxrk \rk \src
.endm
eblock rk=%r3 src=%r5
With current CVS I'm getting an error:
macro.s: Assembler messages:
macro.s:7: Error: bad expression
macro.s:7: Error: syntax error; found `
The problem is that "eblock rk=%r3 src=%r5" is expanded to "sxrk %r3 %r5"
which is then compressed to "sxrk %r3%r5" during scrubbing. Changing the
body of eblock to "sxrk \rk,\src" makes this work, but it's not very well
documented how macro parameters are parsed.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."