From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fpH3H-0005qc-BG for qemu-devel@nongnu.org; Mon, 13 Aug 2018 13:54:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fpH38-0007DH-J6 for qemu-devel@nongnu.org; Mon, 13 Aug 2018 13:54:47 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:55839 helo=mail.rt-rk.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fpH38-0007AI-4a for qemu-devel@nongnu.org; Mon, 13 Aug 2018 13:54:38 -0400 From: Aleksandar Markovic Date: Mon, 13 Aug 2018 19:53:39 +0200 Message-Id: <1534182832-554-75-git-send-email-aleksandar.markovic@rt-rk.com> In-Reply-To: <1534182832-554-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1534182832-554-1-git-send-email-aleksandar.markovic@rt-rk.com> Subject: [Qemu-devel] [PATCH v8 74/87] linux-user: Add target_cpu.h header for nanoMIPS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, laurent@vivier.eu, riku.voipio@iki.fi, philippe.mathieu.daude@gmail.com, aurelien@aurel32.net, richard.henderson@linaro.org, amarkovic@wavecomp.com, smarkovic@wavecomp.com, pjovanovic@wavecomp.com, pburton@wavecomp.com From: Dimitrije Nikolic Add target_cpu.h header for nanoMIPS. Signed-off-by: Aleksandar Rikalo Signed-off-by: Aleksandar Markovic Signed-off-by: Stefan Markovic --- linux-user/nanomips/target_cpu.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 linux-user/nanomips/target_cpu.h diff --git a/linux-user/nanomips/target_cpu.h b/linux-user/nanomips/target_cpu.h new file mode 100644 index 0000000..bbb51de --- /dev/null +++ b/linux-user/nanomips/target_cpu.h @@ -0,0 +1,21 @@ +#ifndef NANOMIPS_TARGET_CPU_H +#define NANOMIPS_TARGET_CPU_H + +static inline void cpu_clone_regs(CPUMIPSState *env, target_ulong newsp) +{ + if (newsp) { + env->active_tc.gpr[29] = newsp; + } + env->active_tc.gpr[4] = 0; +} + +static inline void cpu_set_tls(CPUMIPSState *env, target_ulong newtls) +{ + env->active_tc.CP0_UserLocal = newtls; +} + +static inline abi_ulong get_sp_from_cpustate(CPUMIPSState *state) +{ + return state->active_tc.gpr[29]; +} +#endif -- 2.7.4