[v3,0/3] RISC-V: Add ratified 'E' base ISA support with draft ABIs

Message ID cover.1693904909.git.research_trasio@irq.a4lg.com
Headers
Series RISC-V: Add ratified 'E' base ISA support with draft ABIs |

Message

Tsukasa OI Sept. 5, 2023, 9:08 a.m. UTC
  Hi,

PATCH v1 (only Binutils):
<https://sourceware.org/pipermail/binutils/2023-July/128583.html>
PATCH v2 (Binutils+GDB):
<https://sourceware.org/pipermail/binutils/2023-August/129314.html>

Changes: v1 -> v2
-   Added GDB support

Changes: v2 -> v3
-   Rebased against the latest master
    (PATCH 1/3 related merge conflict is now resolved)


Related Project:
    PATCH 1/3: Binutils
    PATCH 2/3: Binutils
    PATCH 3/3: GDB



This patch set reflects ratified 'E' base ISAs (except version number of
'E') and draft/pre-draft RVE ABIs, ILP32E and LP64E.

RV32E / RV64E (ratified): The latest RISC-V ISA Manual
<https://github.com/riscv/riscv-isa-manual/releases/tag/riscv-isa-release-1239329-2023-05-23>
ILP32E (draft): RISCV ABIs Specification version 1.0
<https://github.com/riscv-non-isa/riscv-elf-psabi-doc/releases/tag/v1.0>
LP64E (pre-draft): Submission to add RVE API corresponding RV64E
<https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/299>

Adding pre-draft LP64E would be a problem on GCC but I bet not on Binutils
(ELF flags [to handle on Binutils/GAS] are not very detailed).


Note that this patch set does not reflect the version number of the 'E' base
ISA (ratified version 2.0) because the latest ratified specification,
"20191213", comes with the draft version 1.9 and adding the version 2.0 with
ISA_SPEC_CLASS_DRAFT does not work (due to the default value of
`DEFAULT_RISCV_ISA_SPEC'; note that it cannot be set to "draft").

I think the next unprivileged ISA specification release is the best timing
to add 'E' version 2.0 (along with new ISA_SPEC_CLASS_20??????).

Thanks,
Tsukasa




Tsukasa OI (3):
  RISC-V: Remove RV64E conflict
  RISC-V: Add "lp64e" ABI support
  RISC-V: Add RV64E support to GDB

 bfd/elfxx-riscv.c                             |  7 -----
 gas/config/tc-riscv.c                         |  4 ++-
 gas/doc/c-riscv.texi                          |  5 ++-
 .../gas/riscv/mabi-fail-rv32e-lp64d.l         |  2 +-
 .../gas/riscv/mabi-fail-rv32e-lp64f.l         |  2 +-
 .../gas/riscv/mabi-fail-rv32e-lp64q.l         |  2 +-
 gas/testsuite/gas/riscv/march-fail-base-02.d  |  3 --
 gas/testsuite/gas/riscv/march-fail-base-02.l  |  2 --
 gdb/arch/riscv.c                              | 15 +++++++--
 gdb/arch/riscv.h                              |  2 +-
 gdb/features/Makefile                         |  1 +
 gdb/features/riscv/rv64e-xregs.c              | 30 ++++++++++++++++++
 gdb/features/riscv/rv64e-xregs.xml            | 31 +++++++++++++++++++
 gdb/riscv-tdep.c                              |  9 +-----
 14 files changed, 85 insertions(+), 30 deletions(-)
 delete mode 100644 gas/testsuite/gas/riscv/march-fail-base-02.d
 delete mode 100644 gas/testsuite/gas/riscv/march-fail-base-02.l
 create mode 100644 gdb/features/riscv/rv64e-xregs.c
 create mode 100644 gdb/features/riscv/rv64e-xregs.xml


base-commit: d4868004365e6bc4232a1b8ebd4b328fc5bec8b1
  

Comments

Nelson Chu Sept. 25, 2023, 3:07 a.m. UTC | #1
On Tue, Sep 5, 2023 at 5:08 PM Tsukasa OI <research_trasio@irq.a4lg.com>
wrote:

> Hi,
>
> PATCH v1 (only Binutils):
> <https://sourceware.org/pipermail/binutils/2023-July/128583.html>
> PATCH v2 (Binutils+GDB):
> <https://sourceware.org/pipermail/binutils/2023-August/129314.html>
>
> Changes: v1 -> v2
> -   Added GDB support
>
> Changes: v2 -> v3
> -   Rebased against the latest master
>     (PATCH 1/3 related merge conflict is now resolved)
>
>
> Related Project:
>     PATCH 1/3: Binutils
>     PATCH 2/3: Binutils
>

Looks good to me :-)


>     PATCH 3/3: GDB
>

I cannot approve anything about gdb, so this will need gdb experts to help.

Thanks
Nelson
  
Tsukasa OI Sept. 25, 2023, 8:04 a.m. UTC | #2
On 2023/09/25 12:07, Nelson Chu wrote:
> 
> 
> On Tue, Sep 5, 2023 at 5:08 PM Tsukasa OI <research_trasio@irq.a4lg.com
> <mailto:research_trasio@irq.a4lg.com>> wrote:
> 
>     Hi,
> 
>     PATCH v1 (only Binutils):
>     <https://sourceware.org/pipermail/binutils/2023-July/128583.html
>     <https://sourceware.org/pipermail/binutils/2023-July/128583.html>>
>     PATCH v2 (Binutils+GDB):
>     <https://sourceware.org/pipermail/binutils/2023-August/129314.html
>     <https://sourceware.org/pipermail/binutils/2023-August/129314.html>>
> 
>     Changes: v1 -> v2
>     -   Added GDB support
> 
>     Changes: v2 -> v3
>     -   Rebased against the latest master
>         (PATCH 1/3 related merge conflict is now resolved)
> 
> 
>     Related Project:
>         PATCH 1/3: Binutils
>         PATCH 2/3: Binutils
> 
> 
> Looks good to me :-)
>  
> 
>         PATCH 3/3: GDB
> 
> 
> I cannot approve anything about gdb, so this will need gdb experts to help.
> 
> Thanks
> Nelson
>  

Thanks, I understand that you cannot approve GDB part so it's okay.

I'll commit if GDB part is also approved or I confirm that not applying
PATCH 3/3 does not cause unnecessary effects to Binutils and GDB (in
this case, I'll commit only PATCH 1-2/3).

Tsukasa
  
Tsukasa OI Oct. 16, 2023, 8:20 a.m. UTC | #3
Committed PATCH 1-2/3 because as far as I could test, there's no problem
even on the GDB side (except obviously, GDB cannot support RV64E ELF files).

Due to my tendonitis, I could not type much for recent few weeks.

Since it got much better (not complete recovery though), I should commit
the approved part before I forget (or tendonitis gets any worse).

Thanks,
Tsukasa

On 2023/09/25 17:04, Tsukasa OI wrote:
> On 2023/09/25 12:07, Nelson Chu wrote:
>>
>>
>> On Tue, Sep 5, 2023 at 5:08 PM Tsukasa OI <research_trasio@irq.a4lg.com
>> <mailto:research_trasio@irq.a4lg.com>> wrote:
>>
>>     Hi,
>>
>>     PATCH v1 (only Binutils):
>>     <https://sourceware.org/pipermail/binutils/2023-July/128583.html
>>     <https://sourceware.org/pipermail/binutils/2023-July/128583.html>>
>>     PATCH v2 (Binutils+GDB):
>>     <https://sourceware.org/pipermail/binutils/2023-August/129314.html
>>     <https://sourceware.org/pipermail/binutils/2023-August/129314.html>>
>>
>>     Changes: v1 -> v2
>>     -   Added GDB support
>>
>>     Changes: v2 -> v3
>>     -   Rebased against the latest master
>>         (PATCH 1/3 related merge conflict is now resolved)
>>
>>
>>     Related Project:
>>         PATCH 1/3: Binutils
>>         PATCH 2/3: Binutils
>>
>>
>> Looks good to me :-)
>>  
>>
>>         PATCH 3/3: GDB
>>
>>
>> I cannot approve anything about gdb, so this will need gdb experts to help.
>>
>> Thanks
>> Nelson
>>  
> 
> Thanks, I understand that you cannot approve GDB part so it's okay.
> 
> I'll commit if GDB part is also approved or I confirm that not applying
> PATCH 3/3 does not cause unnecessary effects to Binutils and GDB (in
> this case, I'll commit only PATCH 1-2/3).
> 
> Tsukasa