Files
Yaya48 cf256aa081 Import QEMU upstream snapshot d2e570c
Upstream: https://gitlab.com/qemu-project/qemu.git

Upstream-Commit: d2e570cc0f97b936902a5b1b86b73c0f5998b475
2026-08-31 02:15:30 +02:00

35 lines
803 B
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* LoongArch specific CPU ABI and functions for linux-user
*
* Copyright (c) 2021 Loongson Technology Corporation Limited
*/
#ifndef LOONGARCH_TARGET_CPU_H
#define LOONGARCH_TARGET_CPU_H
static inline void cpu_clone_regs_child(CPULoongArchState *env,
target_ulong newsp, unsigned flags)
{
if (newsp) {
env->gpr[3] = newsp;
}
env->gpr[4] = 0;
}
static inline void cpu_clone_regs_parent(CPULoongArchState *env,
unsigned flags)
{
}
static inline void cpu_set_tls(CPULoongArchState *env, target_ulong newtls)
{
env->gpr[2] = newtls;
}
static inline abi_ulong get_sp_from_cpustate(CPULoongArchState *state)
{
return state->gpr[3];
}
#endif