summaryrefslogtreecommitdiff
path: root/target-i386/helper.c
diff options
context:
space:
mode:
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-25 18:08:05 +0000
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-25 18:08:05 +0000
commit8bb77e77a6e5a26348a13df882a96073a8a6ae9a (patch)
tree04d9556b102aae68226c1cab9f83387465f325e5 /target-i386/helper.c
parente1c91d43d101252133b74cf714bb73a4c57b1040 (diff)
downloadqemu-8bb77e77a6e5a26348a13df882a96073a8a6ae9a.tar.gz
qemu-8bb77e77a6e5a26348a13df882a96073a8a6ae9a.tar.bz2
qemu-8bb77e77a6e5a26348a13df882a96073a8a6ae9a.zip
Clean up vendor identification (Alexander Graf).
Right now CPU vendor identification contains a lot of magic numbers. The patch cleans them up to defines, so we can identify the CPU later on without copying magic numbers. Signed-off-by: Alexander Graf <agraf@suse.de> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5316 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/helper.c')
-rw-r--r--target-i386/helper.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c
index 594aa9637a..2dae1e3dfe 100644
--- a/target-i386/helper.c
+++ b/target-i386/helper.c
@@ -146,9 +146,9 @@ static x86_def_t x86_defs[] = {
{
.name = "qemu64",
.level = 2,
- .vendor1 = 0x68747541, /* "Auth" */
- .vendor2 = 0x69746e65, /* "enti" */
- .vendor3 = 0x444d4163, /* "cAMD" */
+ .vendor1 = CPUID_VENDOR_AMD_1,
+ .vendor2 = CPUID_VENDOR_AMD_2,
+ .vendor3 = CPUID_VENDOR_AMD_3,
.family = 6,
.model = 2,
.stepping = 3,
@@ -347,9 +347,9 @@ static int cpu_x86_register (CPUX86State *env, const char *cpu_model)
env->cpuid_vendor2 = def->vendor2;
env->cpuid_vendor3 = def->vendor3;
} else {
- env->cpuid_vendor1 = 0x756e6547; /* "Genu" */
- env->cpuid_vendor2 = 0x49656e69; /* "ineI" */
- env->cpuid_vendor3 = 0x6c65746e; /* "ntel" */
+ env->cpuid_vendor1 = CPUID_VENDOR_INTEL_1;
+ env->cpuid_vendor2 = CPUID_VENDOR_INTEL_2;
+ env->cpuid_vendor3 = CPUID_VENDOR_INTEL_3;
}
env->cpuid_level = def->level;
env->cpuid_version = (def->family << 8) | (def->model << 4) | def->stepping;