mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 05:38:19 +00:00
RISC-V: linux-user support for RVE ABI
This change checks elf_flags for EF_RISCV_RVE and if present uses the RVE linux syscall ABI which uses t0 for the syscall number instead of a7. Warn and exit if a non-RVE ABI binary is run on a cpu with the RVE extension as it is incompatible. Backports relevant parts of 5836c3eccedb6dfab16b8f606f2de24b8938b69c from qemu
This commit is contained in:
parent
2e0c040062
commit
bd3e9ebaea
2 changed files with 6 additions and 1 deletions
|
@ -125,6 +125,10 @@ struct CPURISCVState {
|
|||
|
||||
uint32_t features;
|
||||
|
||||
#ifdef CONFIG_USER_ONLY
|
||||
uint32_t elf_flags;
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
target_ulong priv;
|
||||
target_ulong resetvec;
|
||||
|
|
|
@ -10,4 +10,5 @@
|
|||
#define xA4 14
|
||||
#define xA5 15
|
||||
#define xA6 16
|
||||
#define xA7 17 /* syscall number goes here */
|
||||
#define xA7 17 /* syscall number for RVI ABI */
|
||||
#define xT0 5 /* syscall number for RVE ABI */
|
||||
|
|
Loading…
Reference in a new issue