From: Nelson Chu <nelson@rivosinc.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Binutils <binutils@sourceware.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Andrew Waterman <andrew@sifive.com>,
Jim Wilson <jim.wilson.gcc@gmail.com>
Subject: Re: [PATCH 2/2] RISC-V: adjust logic to avoid register name symbols
Date: Wed, 15 Feb 2023 16:48:28 +0800 [thread overview]
Message-ID: <CAPpQWtBgBrjku9=kEHNND3H-E22wUBUedUj9FzJoGJBQRRpXTg@mail.gmail.com> (raw)
In-Reply-To: <bcf87e1b-a1df-0552-f91a-5c496a656ef1@suse.com>
Thanks for the detailed clarify :-)
A quick update, I just use riscv-gnu-toolchain to build a linux toolchain with,
gcc (releases/gcc-12.2.0) + binutils (master + these two patches) +
glibc (release/2.37/master),
and then I get some unexpected errors from gcc testsuite, which won't
occurred without these patches.
========= Summary of gcc testsuite =========
| # of unexpected case / # of unique unexpected case
| gcc | g++ | gfortran |
rv64gc/ lp64d/ medlow | 347 / 62 | 29 / 9 | 0 / 0 |
I haven't tested the elf regressions, and the whole linux regression,
but it seems that there are some unexpected situations that we have
not considered in this patch.
Reproduce commands,
1. git clone https://github.com/riscv-collab/riscv-gnu-toolchain.git --recursive
2. need to install some tools before build,
https://github.com/riscv-collab/riscv-gnu-toolchain#prerequisites
3. git checkout branches of gcc, binutils and glibc to the branches
mentioned above
4. cd <patch-to-build-folder>
5. <patch-to-riscv-gnu-toolchain>configure
--prefix=<patch-to-build-folder>build-install --with-arch=rv64gc
6. make report-gcc-linux -j32
Thanks
Nelson
On Wed, Feb 15, 2023 at 4:03 PM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 15.02.2023 04:09, Nelson Chu wrote:
> > Though the logic becomes kind of complicated to me, you are more
> > familiar with other targets than me, so maybe this is the right way to
> > do it. Basically, the logic looks correct and fine to me, but I still
> > need to run regressions in case of an accident. Just make sure that -
> > 1. The deferred_sym_rootP are the symbols that have the same names as
> > GPR (or FPR, VPR in the future maybe), but we still need to add them
> > into the symbol table?
>
> Yes, with "may" inserted ahead of "need". We only need to if the probing
> actually succeeds.
>
> > 2. Even if the expression has the same name as GPR, only
> > my_getSmallExpression is possible to set exp to O_register, but
> > my_getExpression won't have, so the probing_insn_operands is used to
> > distinguish between them?
>
> Yes, albeit I find this distinction between the two functions suspicious
> (and as said in a post-commit-message remark I'm also having trouble
> spotting a pattern of when which of the two functions is [to be] used).
> But I didn't want to affect existing behavior too much; iirc there was
> at least one testcase which would break otherwise. As said elsewhere -
> as a first step towards further improvements it would need settling on
> what the intended behavior in various cases actually ought to be.
>
> As to the role of probing_insn_operands: Its two possible non-zero
> values distinguish these two cases; zero vs non-zero distinguish whether
> we deal with insn operands vs directive (or alike) ones.
>
> Jan
next prev parent reply other threads:[~2023-02-15 8:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 8:01 [PATCH 0/2] RISC-V/gas: re-work register named symbols avoidance logic Jan Beulich
2023-02-13 8:02 ` [PATCH 1/2] RISC-V: test for expected / no unexpected symbols Jan Beulich
2023-02-13 8:02 ` [PATCH 2/2] RISC-V: adjust logic to avoid register name symbols Jan Beulich
2023-02-15 3:09 ` Nelson Chu
2023-02-15 8:03 ` Jan Beulich
2023-02-15 8:48 ` Nelson Chu [this message]
2023-02-15 9:21 ` Jan Beulich
2023-02-16 9:36 ` Nelson Chu
2023-02-16 16:49 ` Jan Beulich
2023-02-16 16:54 ` Palmer Dabbelt
2023-03-03 13:52 ` Jan Beulich
2023-03-15 10:07 ` Nelson Chu
2023-03-15 11:49 ` Jan Beulich
2023-03-16 0:30 ` Nelson Chu
2023-04-19 9:37 ` Jan Beulich
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='CAPpQWtBgBrjku9=kEHNND3H-E22wUBUedUj9FzJoGJBQRRpXTg@mail.gmail.com' \
--to=nelson@rivosinc.com \
--cc=andrew@sifive.com \
--cc=binutils@sourceware.org \
--cc=jbeulich@suse.com \
--cc=jim.wilson.gcc@gmail.com \
--cc=palmer@dabbelt.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).