mirror of https://github.com/xqemu/xqemu.git
bsd-user: Change thread_env to CPUState
Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
a2247f8ec9
commit
dca1173c20
|
@ -98,7 +98,7 @@ enum {
|
||||||
static const char *get_elf_platform(void)
|
static const char *get_elf_platform(void)
|
||||||
{
|
{
|
||||||
static char elf_platform[] = "i386";
|
static char elf_platform[] = "i386";
|
||||||
int family = (thread_env->cpuid_version >> 8) & 0xff;
|
int family = object_property_get_int(OBJECT(thread_cpu), "family", NULL);
|
||||||
if (family > 6)
|
if (family > 6)
|
||||||
family = 6;
|
family = 6;
|
||||||
if (family >= 3)
|
if (family >= 3)
|
||||||
|
@ -110,7 +110,9 @@ static const char *get_elf_platform(void)
|
||||||
|
|
||||||
static uint32_t get_elf_hwcap(void)
|
static uint32_t get_elf_hwcap(void)
|
||||||
{
|
{
|
||||||
return thread_env->features[FEAT_1_EDX];
|
X86CPU *cpu = X86_CPU(thread_cpu);
|
||||||
|
|
||||||
|
return cpu->env.features[FEAT_1_EDX];
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TARGET_X86_64
|
#ifdef TARGET_X86_64
|
||||||
|
|
|
@ -92,7 +92,7 @@ void fork_start(void)
|
||||||
void fork_end(int child)
|
void fork_end(int child)
|
||||||
{
|
{
|
||||||
if (child) {
|
if (child) {
|
||||||
gdbserver_fork(thread_env);
|
gdbserver_fork((CPUArchState *)thread_cpu->env_ptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -713,7 +713,7 @@ static void usage(void)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
THREAD CPUArchState *thread_env;
|
THREAD CPUState *thread_cpu;
|
||||||
|
|
||||||
/* Assumes contents are already zeroed. */
|
/* Assumes contents are already zeroed. */
|
||||||
void init_task_state(TaskState *ts)
|
void init_task_state(TaskState *ts)
|
||||||
|
@ -915,7 +915,7 @@ int main(int argc, char **argv)
|
||||||
#if defined(TARGET_SPARC) || defined(TARGET_PPC)
|
#if defined(TARGET_SPARC) || defined(TARGET_PPC)
|
||||||
cpu_reset(ENV_GET_CPU(env));
|
cpu_reset(ENV_GET_CPU(env));
|
||||||
#endif
|
#endif
|
||||||
thread_env = env;
|
thread_cpu = ENV_GET_CPU(env);
|
||||||
|
|
||||||
if (getenv("QEMU_STRACE")) {
|
if (getenv("QEMU_STRACE")) {
|
||||||
do_strace = 1;
|
do_strace = 1;
|
||||||
|
|
|
@ -139,7 +139,7 @@ abi_long do_openbsd_syscall(void *cpu_env, int num, abi_long arg1,
|
||||||
abi_long arg2, abi_long arg3, abi_long arg4,
|
abi_long arg2, abi_long arg3, abi_long arg4,
|
||||||
abi_long arg5, abi_long arg6);
|
abi_long arg5, abi_long arg6);
|
||||||
void gemu_log(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
|
void gemu_log(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
|
||||||
extern THREAD CPUArchState *thread_env;
|
extern THREAD CPUState *thread_cpu;
|
||||||
void cpu_loop(CPUArchState *env);
|
void cpu_loop(CPUArchState *env);
|
||||||
char *target_strerror(int err);
|
char *target_strerror(int err);
|
||||||
int get_osversion(void);
|
int get_osversion(void);
|
||||||
|
|
Loading…
Reference in New Issue