diff options
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/cpu.h | 8 | ||||
-rw-r--r-- | target-i386/helper.c | 12 |
2 files changed, 14 insertions, 6 deletions
diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 22169a9..dd57abc 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -333,6 +333,14 @@ #define CPUID_EXT3_IBS (1 << 10) #define CPUID_EXT3_SKINIT (1 << 12) +#define CPUID_VENDOR_INTEL_1 0x756e6547 /* "Genu" */ +#define CPUID_VENDOR_INTEL_2 0x49656e69 /* "ineI" */ +#define CPUID_VENDOR_INTEL_3 0x6c65746e /* "ntel" */ + +#define CPUID_VENDOR_AMD_1 0x68747541 /* "Auth" */ +#define CPUID_VENDOR_AMD_2 0x69746e65 /* "enti" */ +#define CPUID_VENDOR_AMD_3 0x444d4163 /* "cAMD" */ + #define EXCP00_DIVZ 0 #define EXCP01_SSTP 1 #define EXCP02_NMI 2 diff --git a/target-i386/helper.c b/target-i386/helper.c index 594aa96..2dae1e3 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; |