This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: support for PowerPC pair singles instructions
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Ben Elliston <bje at au1 dot ibm dot com>
- Cc: binutils at sourceware dot org, drow at false dot org
- Date: Thu, 23 Aug 2007 17:48:55 +0930
- Subject: Re: PATCH: support for PowerPC pair singles instructions
- References: <1187771243.29553.3.camel@localhost>
On Wed, Aug 22, 2007 at 04:27:23PM +0800, Ben Elliston wrote:
> +/* Extended opcodes for the pair singles includes operands after an
> + index and displacement pair.
> +
> + EXAMPLE: 10(r5) can now be 10(r5),0,2
> +
> + The GNU assembler thinks that it is done after the last paren
> + and it's unclear it was design for more in ppc. To circumvent
> + the problem, the new shorter displacement field will have a
> + flag to indicate there are two delimters, a paren and comma,
> + before more operands are expected. */
> +#define PPC_OPERAND_TWODELIMITERS (0x20000)
I think you can easily do without this hack. Something like the
following ought to do it.
if (need_paren)
{
endc = ')';
need_paren = 0;
/* If expecting more operands, the we want to see "),". */
if (*str == endc && opindex_ptr[1] != 0)
{
do
++str;
while (ISSPACE (*str));
endc = ',';
}
}
else ...
--
Alan Modra
Australia Development Lab, IBM