util/hbitmap: update orig_size on truncate
[qemu/ar7.git] / linux-user / xtensa / target_cpu.h
blobe31efe3ea090dcb9baee7c1147d9271794d4033a
1 /*
2 * Xtensa-specific CPU ABI and functions for linux-user
3 */
4 #ifndef XTENSA_TARGET_CPU_H
5 #define XTENSA_TARGET_CPU_H
7 static inline void cpu_clone_regs(CPUXtensaState *env, target_ulong newsp)
9 if (newsp) {
10 env->regs[1] = newsp;
11 env->sregs[WINDOW_BASE] = 0;
12 env->sregs[WINDOW_START] = 0x1;
14 env->regs[2] = 0;
17 static inline void cpu_set_tls(CPUXtensaState *env, target_ulong newtls)
19 env->uregs[THREADPTR] = newtls;
22 static inline abi_ulong get_sp_from_cpustate(CPUXtensaState *state)
24 return state->regs[1];
26 #endif