On 8/14/23 00:09, Tsukasa OI wrote:
From: Tsukasa OI <research_tra...@irq.a4lg.com>

After commit c283c4774d1c ("RISC-V: Throw compilation error for unknown
extensions") changed how do we handle unknown extensions, we have no
guarantee that we can share the same architectural string with Binutils
(specifically, the assembler).

To avoid compilation errors on shared Assembler-C/C++ projects, GCC should
support almost all extensions that Binutils support, even if the GCC does
not touch a thing.

This commit adds stub supported standard unprivileged extensions to
riscv_ext_version_table and its implications to riscv_implied_info
(all information is copied from Binutils' bfd/elfxx-riscv.c except not yet
merged 'Zce', 'Zcmp' and 'Zcmt' support).

gcc/ChangeLog:

        * common/config/riscv/riscv-common.cc
        (riscv_implied_info): Add implications from unprivileged extensions.
        (riscv_ext_version_table): Add stub support for all unprivileged
        extensions supported by Binutils as well as 'Zce', 'Zcmp', 'Zcmt'.

gcc/testsuite/ChangeLog:

        * gcc.target/riscv/predef-31.c: New test for a stub unprivileged
        extension 'Zcb' with some implications.
This series (most likely patch 3/3) seems to break arch-24.c and arch-25.c.

Please fix and post a V3.

Jeff

Reply via email to