qemu/linux-user/xtensa/target_cpu.h
Max Filippov ba7651fba5 target/xtensa: add linux-user support
Import list of syscalls from the kernel source. Conditionalize code/data
that is only used with softmmu. Implement exception handlers. Implement
signal hander (only the core registers for now, no coprocessors or TIE).

Cc: Riku Voipio <riku.voipio@iki.fi>
Cc: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2018-03-16 09:40:34 -07:00

23 lines
473 B
C

/*
* Xtensa-specific CPU ABI and functions for linux-user
*/
#ifndef XTENSA_TARGET_CPU_H
#define XTENSA_TARGET_CPU_H
static inline void cpu_clone_regs(CPUXtensaState *env, target_ulong newsp)
{
if (newsp) {
env->regs[1] = newsp;
env->sregs[WINDOW_BASE] = 0;
env->sregs[WINDOW_START] = 0x1;
}
env->regs[2] = 0;
}
static inline void cpu_set_tls(CPUXtensaState *env, target_ulong newtls)
{
env->uregs[THREADPTR] = newtls;
}
#endif