aboutsummaryrefslogtreecommitdiff
path: root/linux-user/riscv/target_cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/riscv/target_cpu.h')
-rw-r--r--linux-user/riscv/target_cpu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux-user/riscv/target_cpu.h b/linux-user/riscv/target_cpu.h
index c5549b1120..7e090f376a 100644
--- a/linux-user/riscv/target_cpu.h
+++ b/linux-user/riscv/target_cpu.h
@@ -15,4 +15,8 @@ static inline void cpu_set_tls(CPURISCVState *env, target_ulong newtls)
env->gpr[xTP] = newtls;
}
+static inline abi_ulong get_sp_from_cpustate(CPURISCVState *state)
+{
+ return state->gpr[xSP];
+}
#endif