From: Dmitry Selyutin <ghostmansd@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: lkcl <luke.leighton@gmail.com>,
Binutils <binutils@sourceware.org>,
Alan Modra <amodra@gmail.com>
Subject: Re: Teaching expression() to treat some operations specially
Date: Tue, 12 Jul 2022 11:50:06 +0300 [thread overview]
Message-ID: <CAMqzjetDNeWLyttf+FHNayoP2XMrQYWEP5zCM4UHt4kj4EX8yg@mail.gmail.com> (raw)
In-Reply-To: <6ede8e90-9db2-3676-3749-58382dd74e40@suse.com>
On Tue, Jul 12, 2022 at 9:57 AM Jan Beulich <jbeulich@suse.com> wrote:
> x86 uses it only for identifier-like unary operators. So it may
> indeed be that * doesn't presently have a way to make it to
> md_operator() when used in unary way.
Frankly speaking, md_operator is somewhat confusing. What kind of
arguments does it expect?
I tried defining both -- ppc_parse_name, ppc_operand and ppc_operator.
The exact sequence of how these are called depends on many conditions.
Let's consider this code:
.set REG, %r0
extsw REG, 2
By default, I don't see any calls to ppc_operator at all, only calls
to ppc_operand.
If I update tc-ppc.h with `#define LEX_PCT (LEX_BEGIN_NAME)`,
ppc_operator is called before ppc_operand.
internals.texi lacks any information on ppc_operator, so I'm unsure
how to use it.
Also, it's especially confusing to see this call: `md_operator (NULL, 2, NULL)`.
Is there any documentation on how md_operator works? i386_operator
doesn't really explain it.
I think that, to make it work, lex_type must be updated with
LEX_BEGIN_NAME with % and * symbols.
But, considering the current depths of my knowledge for this code,
these are mostly guesses.
--
Best regards,
Dmitry Selyutin
next prev parent reply other threads:[~2022-07-12 8:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-09 16:47 Dmitry Selyutin
2022-07-11 1:01 ` Alan Modra
2022-07-11 2:33 ` lkcl
2022-07-11 3:08 ` Alan Modra
2022-07-11 14:28 ` Dmitry Selyutin
2022-07-11 19:13 ` Dmitry Selyutin
2022-07-11 23:37 ` Alan Modra
2022-07-12 4:18 ` Dmitry Selyutin
2022-07-12 6:25 ` Jan Beulich
2022-07-12 6:47 ` Dmitry Selyutin
2022-07-12 6:57 ` Jan Beulich
2022-07-12 8:50 ` Dmitry Selyutin [this message]
2022-07-12 10:44 ` Jan Beulich
2022-07-12 11:17 ` Dmitry Selyutin
2022-07-12 11:39 ` Jan Beulich
2022-07-12 9:01 ` Dmitry Selyutin
2022-07-12 6:58 ` Dmitry Selyutin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMqzjetDNeWLyttf+FHNayoP2XMrQYWEP5zCM4UHt4kj4EX8yg@mail.gmail.com \
--to=ghostmansd@gmail.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=jbeulich@suse.com \
--cc=luke.leighton@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).