This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: support for PowerPC pair singles instructions


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]