From: Dimitar Dimitrov <dimitar@dinux.eu>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] sim: Fix argument handling for RISC-V E syscalls
Date: Sat, 4 Jan 2025 18:16:37 +0200 [thread overview]
Message-ID: <Z3le5WLS5sTK2Nws@kendros> (raw)
In-Reply-To: <20241117092738.449206-1-dimitar@dinux.eu>
On Sun, Nov 17, 2024 at 11:27:36AM +0200, Dimitar Dimitrov wrote:
> The I and E base ISA variants have incompatible ecall ABI. The system
> call number for E ISA is passed in t0 register, whereas for I ISA it
> is passed in a7 register.
>
> Fix by checking the base ISA variant to choose which register to read
> for the system call number. That requires a bit of refactoring to split
> the I and E ISA base variants, since they are fundamentally different
> per the specification [1].
>
> With this fix I can run the GCC testsuite for RV32EC.
>
> [1] The RISC-V Instruction Set Manual, volume I, version 2.1
>
> Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
> ---
> sim/riscv/machs.c | 75 ++++++++++++++++---
> sim/riscv/machs.h | 12 ++-
> sim/riscv/model_list_e.def | 8 ++
> .../{model_list.def => model_list_i.def} | 8 --
> sim/riscv/riscv-sim.h | 5 ++
> sim/riscv/sim-main.c | 6 +-
> 6 files changed, 93 insertions(+), 21 deletions(-)
> create mode 100644 sim/riscv/model_list_e.def
> rename sim/riscv/{model_list.def => model_list_i.def} (54%)
>
Gentle ping.
Regards,
Dimitar
prev parent reply other threads:[~2025-01-04 16:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-17 9:27 Dimitar Dimitrov
2024-11-17 9:27 ` [PATCH 2/2] sim: Add rv32e test cases Dimitar Dimitrov
2025-01-04 16:16 ` Dimitar Dimitrov [this message]
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=Z3le5WLS5sTK2Nws@kendros \
--to=dimitar@dinux.eu \
--cc=gdb-patches@sourceware.org \
/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