cachepc-qemu

Fork of AMDESE/qemu with changes for cachepc side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-qemu
Log | Files | Refs | Submodules | LICENSE | sfeed.txt

target_cpu.h (566B)


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