diff options
| author | Max Filippov | 2017-01-25 19:54:11 +0100 |
|---|---|---|
| committer | Max Filippov | 2018-03-16 17:40:34 +0100 |
| commit | ba7651fba54199e5dedbbd08157687291b9dbae3 (patch) | |
| tree | f03b970e3cfdfde9040ff14c59dc0bf3acfb6fe3 /linux-user/xtensa/target_cpu.h | |
| parent | linux-user: drop unused target_msync function (diff) | |
| download | qemu-ba7651fba54199e5dedbbd08157687291b9dbae3.tar.gz qemu-ba7651fba54199e5dedbbd08157687291b9dbae3.tar.xz qemu-ba7651fba54199e5dedbbd08157687291b9dbae3.zip | |
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>
Diffstat (limited to 'linux-user/xtensa/target_cpu.h')
| -rw-r--r-- | linux-user/xtensa/target_cpu.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/linux-user/xtensa/target_cpu.h b/linux-user/xtensa/target_cpu.h new file mode 100644 index 0000000000..747d828614 --- /dev/null +++ b/linux-user/xtensa/target_cpu.h @@ -0,0 +1,22 @@ +/* + * 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 |
