2
0

target_cpu.h 566 B

123456789101112131415161718192021222324252627
  1. #ifndef RISCV_TARGET_CPU_H
  2. #define RISCV_TARGET_CPU_H
  3. static inline void cpu_clone_regs_child(CPURISCVState *env, target_ulong newsp,
  4. unsigned flags)
  5. {
  6. if (newsp) {
  7. env->gpr[xSP] = newsp;
  8. }
  9. env->gpr[xA0] = 0;
  10. }
  11. static inline void cpu_clone_regs_parent(CPURISCVState *env, unsigned flags)
  12. {
  13. }
  14. static inline void cpu_set_tls(CPURISCVState *env, target_ulong newtls)
  15. {
  16. env->gpr[xTP] = newtls;
  17. }
  18. static inline abi_ulong get_sp_from_cpustate(CPURISCVState *state)
  19. {
  20. return state->gpr[xSP];
  21. }
  22. #endif