This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Macro parameter parsing problem
- From: "Jan Beulich" <JBeulich at novell dot com>
- To: "Andreas Schwab" <schwab at suse dot de>
- Cc: <binutils at sources dot redhat dot com>
- Date: Fri, 01 Jul 2005 15:30:50 +0200
- Subject: Re: Macro parameter parsing problem
This was asked a couple of days back (http://sourceware.org/ml/binutils/2005-06/msg00578.html), and a bug was also entered (http://sources.redhat.com/bugzilla/show_bug.cgi?id=1036). Jan
>>> Andreas Schwab <schwab@suse.de> 01.07.05 15:11:24 >>>
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."