Teaching expression() to treat some operations specially

Jan Beulich jbeulich@suse.com
Tue Jul 12 11:39:36 GMT 2022


On 12.07.2022 13:17, Dmitry Selyutin wrote:
> On Tue, Jul 12, 2022 at 1:44 PM Jan Beulich <jbeulich@suse.com> wrote:
>> why again can't you deal with *
>> there (converting the thing to an X_md<N> expression)?
> 
> Actually this is what we already do. :-)
> https://git.libre-soc.org/?p=binutils-gdb.git;a=blob;f=gas/config/tc-ppc.c;h=989d1a29a56a364cdfcce6b670f7466ff8eaaeea;hb=refs/heads/svp64-ng#l4238
> 
> There are two issues:
> 1. Handle register names in macros in a uniform way.

Note that from all I can tell equates (which is what I think you
mean) are a problem for expression in a wider sense. Things get
especially "interesting" once using transitive equates ...

Jan

> 2. Handle unary * operator.
> 
> The thread became a bit confusing due to these questions being
> somewhat related (e.g. whether these should be parsed in the same
> place).
> My point was, since * is indeed an unary operator, it's kind of
> natural for it to be handled at md_operator.
> However, we can stick to md_operand, no problems; so the second
> question is already solved.
> As for the first one, I'm now preparing a patch for it (it's also
> about md_operand, anyway).
> I attempt to make the code somewhat more straightforward and generic,
> and also handle X_md stuff at port's side.
> I'll update on this. Thank you for your help and advice!
> 



More information about the Binutils mailing list