ref: 148eabe91be12a23afafeb6139fb7f5269d9dd2a
parent: fcd7a13816a7141236e1f66d7dfaa8f44c45d78a
parent: fd44db01f6485776a56389376cbe7d6bc87969a9
author: Ethan Hugg <ethanhugg@gmail.com>
date: Fri Jan 24 03:56:18 EST 2014
Merge pull request #207 from mstorsjo/typofix Fix a typo, "vender" -> "vendor"
--- a/codec/common/cpu.cpp
+++ b/codec/common/cpu.cpp
@@ -44,9 +44,9 @@
-#define CPU_Vender_AMD "AuthenticAMD"
-#define CPU_Vender_INTEL "GenuineIntel"
-#define CPU_Vender_CYRIX "CyrixInstead"
+#define CPU_Vendor_AMD "AuthenticAMD"
+#define CPU_Vendor_INTEL "GenuineIntel"
+#define CPU_Vendor_CYRIX "CyrixInstead"
#if defined(X86_ASM)
@@ -54,7 +54,7 @@
uint32_t uiCPU = 0;
uint32_t uiFeatureA = 0, uiFeatureB = 0, uiFeatureC = 0, uiFeatureD = 0;
int32_t CacheLineSize = 0;
- int8_t chVenderName[16] = { 0 };
+ int8_t chVendorName[16] = { 0 };
uint32_t uiMaxCpuidLevel = 0;
if (!WelsCPUIdVerify()) {
@@ -62,7 +62,7 @@
return 0;
}
- WelsCPUId (0, &uiFeatureA, (uint32_t*)&chVenderName[0], (uint32_t*)&chVenderName[8], (uint32_t*)&chVenderName[4]);
+ WelsCPUId (0, &uiFeatureA, (uint32_t*)&chVendorName[0], (uint32_t*)&chVendorName[8], (uint32_t*)&chVendorName[4]);
uiMaxCpuidLevel = uiFeatureA;
if (uiMaxCpuidLevel == 0) {
/* maximum input value for basic cpuid information */
@@ -92,8 +92,8 @@
/* CMOV instruction checking */
uiCPU |= WELS_CPU_CMOV;
}
- if ((!strcmp ((const str_t*)chVenderName, CPU_Vender_INTEL)) ||
- (!strcmp((const str_t*)chVenderName, CPU_Vender_AMD)) ) { // confirmed_safe_unsafe_usage
+ if ((!strcmp ((const str_t*)chVendorName, CPU_Vendor_INTEL)) ||
+ (!strcmp((const str_t*)chVendorName, CPU_Vendor_AMD)) ) { // confirmed_safe_unsafe_usage
if (uiFeatureD & 0x10000000) {
/* Multi-Threading checking: contains of multiple logic processors */
uiCPU |= WELS_CPU_HTT;
@@ -139,7 +139,7 @@
} else {
*pNumberOfLogicProcessors = 1;
}
- if( !strcmp((const str_t*)chVenderName, CPU_Vender_INTEL) ){
+ if( !strcmp((const str_t*)chVendorName, CPU_Vendor_INTEL) ){
if( uiMaxCpuidLevel >= 4 ){
uiFeatureC = 0;
WelsCPUId(0x4, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
@@ -152,7 +152,7 @@
WelsCPUId (0x80000000, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
- if ((!strcmp ((const str_t*)chVenderName, CPU_Vender_AMD))
+ if ((!strcmp ((const str_t*)chVendorName, CPU_Vendor_AMD))
&& (uiFeatureA >= 0x80000001)) { // confirmed_safe_unsafe_usage
WelsCPUId (0x80000001, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
if (uiFeatureD & 0x00400000) {
@@ -163,7 +163,7 @@
}
}
- if (!strcmp ((const str_t*)chVenderName, CPU_Vender_INTEL)) { // confirmed_safe_unsafe_usage
+ if (!strcmp ((const str_t*)chVendorName, CPU_Vendor_INTEL)) { // confirmed_safe_unsafe_usage
int32_t family, model;
WelsCPUId (1, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
@@ -176,8 +176,8 @@
}
// get cache line size
- if ((!strcmp ((const str_t*)chVenderName, CPU_Vender_INTEL))
- || ! (strcmp ((const str_t*)chVenderName, CPU_Vender_CYRIX))) { // confirmed_safe_unsafe_usage
+ if ((!strcmp ((const str_t*)chVendorName, CPU_Vendor_INTEL))
+ || ! (strcmp ((const str_t*)chVendorName, CPU_Vendor_CYRIX))) { // confirmed_safe_unsafe_usage
WelsCPUId (1, &uiFeatureA, &uiFeatureB, &uiFeatureC, &uiFeatureD);
CacheLineSize = (uiFeatureB & 0xff00) >>