summaryrefslogtreecommitdiff
path: root/bsd-user/elfload.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-06-09 19:51:23 +0200
committerAndreas Färber <afaerber@suse.de>2013-07-09 21:33:01 +0200
commitdca1173c20e7e7366a9c36f88ae4234e5387ed28 (patch)
tree2f8220d645b5c9e2dbbded7d77f41c7e398be108 /bsd-user/elfload.c
parenta2247f8ec919c51c5749c2e3659841f1a733cce3 (diff)
downloadqemu-dca1173c20e7e7366a9c36f88ae4234e5387ed28.tar.gz
bsd-user: Change thread_env to CPUState
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'bsd-user/elfload.c')
-rw-r--r--bsd-user/elfload.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c
index 5e20510309..93fd9e4259 100644
--- a/bsd-user/elfload.c
+++ b/bsd-user/elfload.c
@@ -98,7 +98,7 @@ enum {
static const char *get_elf_platform(void)
{
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)
family = 6;
if (family >= 3)
@@ -110,7 +110,9 @@ static const char *get_elf_platform(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