mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
RISC-V Linux User Emulation
Implementation of linux user emulation for RISC-V. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Sagar Karandikar <sagark@eecs.berkeley.edu> Signed-off-by: Michael Clark <mjc@sifive.com>
This commit is contained in:
parent
65c5b75c38
commit
47ae93cdfe
13 changed files with 1012 additions and 6 deletions
18
linux-user/riscv/target_cpu.h
Normal file
18
linux-user/riscv/target_cpu.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
#ifndef TARGET_CPU_H
|
||||
#define TARGET_CPU_H
|
||||
|
||||
static inline void cpu_clone_regs(CPURISCVState *env, target_ulong newsp)
|
||||
{
|
||||
if (newsp) {
|
||||
env->gpr[xSP] = newsp;
|
||||
}
|
||||
|
||||
env->gpr[xA0] = 0;
|
||||
}
|
||||
|
||||
static inline void cpu_set_tls(CPURISCVState *env, target_ulong newtls)
|
||||
{
|
||||
env->gpr[xTP] = newtls;
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue