fix compilation
This commit is contained in:
parent
66bc36473c
commit
778a2703b2
16
fb/fbmmx.c
16
fb/fbmmx.c
|
@ -2300,13 +2300,13 @@ enum CPUFeatures {
|
||||||
CMOV = 0x10
|
CMOV = 0x10
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint detectCPUFeatures(void) {
|
static unsigned int detectCPUFeatures(void) {
|
||||||
uint result;
|
unsigned int result;
|
||||||
char vendor[13];
|
char vendor[13];
|
||||||
vendor[0] = 0;
|
vendor[0] = 0;
|
||||||
vendor[12] = 0;
|
vendor[12] = 0;
|
||||||
/* see p. 118 of amd64 instruction set manual Vol3 */
|
/* see p. 118 of amd64 instruction set manual Vol3 */
|
||||||
asm ("push %%ebx\n"
|
__asm__ ("push %%ebx\n"
|
||||||
"pushf\n"
|
"pushf\n"
|
||||||
"pop %%eax\n"
|
"pop %%eax\n"
|
||||||
"mov %%eax, %%ebx\n"
|
"mov %%eax, %%ebx\n"
|
||||||
|
@ -2337,9 +2337,9 @@ static uint detectCPUFeatures(void) {
|
||||||
: "%eax", "%ebx", "%ecx", "%edx"
|
: "%eax", "%ebx", "%ecx", "%edx"
|
||||||
);
|
);
|
||||||
|
|
||||||
uint features = 0;
|
unsigned int features = 0;
|
||||||
if (result) {
|
if (result) {
|
||||||
// result now contains the standard feature bits
|
/* result now contains the standard feature bits */
|
||||||
if (result & (1 << 15))
|
if (result & (1 << 15))
|
||||||
features |= CMOV;
|
features |= CMOV;
|
||||||
if (result & (1 << 23))
|
if (result & (1 << 23))
|
||||||
|
@ -2351,8 +2351,8 @@ static uint detectCPUFeatures(void) {
|
||||||
if ((result & MMX) && !(result & SSE) && (strcmp(vendor, "AuthenticAMD") == 0)) {
|
if ((result & MMX) && !(result & SSE) && (strcmp(vendor, "AuthenticAMD") == 0)) {
|
||||||
/* check for AMD MMX extensions */
|
/* check for AMD MMX extensions */
|
||||||
|
|
||||||
uint result;
|
unsigned int result;
|
||||||
asm("mov $0x80000000, %%eax\n"
|
__asm__("mov $0x80000000, %%eax\n"
|
||||||
"cpuid\n"
|
"cpuid\n"
|
||||||
"xor %%edx, %%edx\n"
|
"xor %%edx, %%edx\n"
|
||||||
"cmp $0x1, %%eax\n"
|
"cmp $0x1, %%eax\n"
|
||||||
|
@ -2380,7 +2380,7 @@ fbHaveMMX (void)
|
||||||
|
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
{
|
{
|
||||||
uint features = detectCPUFeatures();
|
unsigned int features = detectCPUFeatures();
|
||||||
mmx_present = (features & (MMX|MMX_Extensions)) == (MMX|MMX_Extensions);
|
mmx_present = (features & (MMX|MMX_Extensions)) == (MMX|MMX_Extensions);
|
||||||
initialized = TRUE;
|
initialized = TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue