2020-10-13 22:45:25 +02:00
|
|
|
#ifndef E2K_TARGET_CPU_H
|
|
|
|
#define E2K_TARGET_CPU_H
|
|
|
|
|
2020-11-13 15:49:28 +01:00
|
|
|
#include "qemu/log.h"
|
|
|
|
|
2020-10-13 22:45:25 +02:00
|
|
|
static inline void cpu_clone_regs_child(CPUE2KState *env, target_ulong newsp,
|
|
|
|
unsigned flags)
|
|
|
|
{
|
2020-11-13 15:49:28 +01:00
|
|
|
if (newsp) {
|
|
|
|
uint64_t size = 0x20000UL;
|
|
|
|
env->usd_hi = size << 32;
|
|
|
|
env->usd_lo = (0x1800UL << 48) | newsp;
|
|
|
|
}
|
2020-10-13 22:45:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline void cpu_clone_regs_parent(CPUE2KState *env, unsigned flags)
|
|
|
|
{
|
2020-11-13 15:49:28 +01:00
|
|
|
qemu_log_mask(LOG_UNIMP, "cpu_clone_regs_parent: unimplemented\n");
|
2020-10-13 22:45:25 +02:00
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void cpu_set_tls(CPUE2KState *env, target_ulong newtls)
|
|
|
|
{
|
2020-11-13 15:49:28 +01:00
|
|
|
qemu_log_mask(LOG_UNIMP, "cpu_set_tls: unimplemented\n");
|
2020-10-13 22:45:25 +02:00
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline target_ulong cpu_get_tls(CPUE2KState *env)
|
|
|
|
{
|
|
|
|
// TODO
|
2020-11-13 15:49:28 +01:00
|
|
|
qemu_log_mask(LOG_UNIMP, "cpu_get_tls: unimplemented\n");
|
2020-11-08 19:27:47 +01:00
|
|
|
return 0;
|
2020-10-13 22:45:25 +02:00
|
|
|
}
|
|
|
|
|
2020-11-13 15:49:28 +01:00
|
|
|
static inline abi_ulong get_sp_from_cpustate(CPUE2KState *env)
|
2020-10-13 22:45:25 +02:00
|
|
|
{
|
2020-11-13 15:49:28 +01:00
|
|
|
return env->usd_lo & ((1UL << 48) - 1);
|
2020-10-13 22:45:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* E2K_TARGET_CPU_H */
|