This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gas macro handling broken in 2.16.91.0.1
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Olaf Hering <olh at suse dot de>
- Cc: binutils at sources dot redhat dot com
- Date: Tue, 23 Aug 2005 15:49:48 +0930
- Subject: Re: gas macro handling broken in 2.16.91.0.1
- References: <42BFFAA0020000780001D858@emea1-mh.id2.novell.com> <20050627111214.GA30768@suse.de>
On Mon, Jun 27, 2005 at 01:12:14PM +0200, Olaf Hering wrote:
> On Mon, Jun 27, Jan Beulich wrote:
> > This is caused by now scrubbing the output of a macro expansion
> > (http://sourceware.org/ml/binutils/2005-05/msg00561.html), which
> > results in macro arguments separated by spaces (rather than commas,
> > and in a macro expansion) where the first argument finishes with a
> > symbol and the second doesn't start with one to be concatenated. In
> > my opinion, the root cause here is the failure of tc-ppc.c to
> > include % in the symbol characters (hence % followed by a register
> > name isn't treated as a symbol, but rather as an operator followed
> > by a symbol); similar i386 code works well because % there
> > specifically is a symbol character.
I'd say the root cause is the fact that the scrubber eats white space
completely, but fixing that requires checking that all targets will
strip a single space before each operand..
So for now, use the tc_symbol_chars hack. I added '[' too, for PE
toc entry parsing.
PR 1036
* config/tc-ppc.c (ppc_symbol_chars): Add '%' and '['.
Index: gas/config/tc-ppc.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-ppc.c,v
retrieving revision 1.105
diff -u -p -r1.105 tc-ppc.c
--- gas/config/tc-ppc.c 16 Aug 2005 03:17:53 -0000 1.105
+++ gas/config/tc-ppc.c 23 Aug 2005 05:58:02 -0000
@@ -184,8 +184,10 @@ const char EXP_CHARS[] = "eE";
const char FLT_CHARS[] = "dD";
/* '+' and '-' can be used as postfix predicate predictors for conditional
- branches. So they need to be accepted as symbol characters. */
-const char ppc_symbol_chars[] = "+-";
+ branches. So they need to be accepted as symbol characters.
+ Also, anything that can start an operand needs to be mentioned here,
+ to stop the input scrubber eating whitespace. */
+const char ppc_symbol_chars[] = "+-%[";
/* The dwarf2 data alignment, adjusted for 32 or 64 bit. */
int ppc_cie_data_alignment;
--
Alan Modra
IBM OzLabs - Linux Technology Centre