Compilation failed on current HEAD

Peter Zijlstra a.p.zijlstra at chello.nl
Tue Jul 12 14:23:46 PDT 2005


Hi,

I tried to build current HEAD; I needed the following patch to make it
work.

Kind regards,

Peter Zijlstra


Index: programs/Xserver/fb/fbmmx.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/fb/fbmmx.c,v
retrieving revision 1.11
diff -u -r1.11 fbmmx.c
--- programs/Xserver/fb/fbmmx.c 12 Jul 2005 10:02:10 -0000      1.11
+++ programs/Xserver/fb/fbmmx.c 12 Jul 2005 21:22:03 -0000
@@ -2300,13 +2300,15 @@
     CMOV = 0x10
 };

+typedef unsigned int uint;
+
 static uint detectCPUFeatures(void) {
     uint result;
     char vendor[13];
     vendor[0] = 0;
     vendor[12] = 0;
     /* see p. 118 of amd64 instruction set manual Vol3 */
-    asm ("push %%ebx\n"
+    __asm__ ("push %%ebx\n"
          "pushf\n"
          "pop %%eax\n"
          "mov %%eax, %%ebx\n"
@@ -2334,12 +2336,12 @@
           "=m" (vendor[4]),
           "=m" (vendor[8])
         :
-        : "%eax", "%ebx", "%ecx", "%edx"
+        : "%eax", "%ecx", "%edx"
         );

     uint features = 0;
     if (result) {
-        // result now contains the standard feature bits
+        /* result now contains the standard feature bits */
         if (result & (1 << 15))
             features |= CMOV;
         if (result & (1 << 23))
@@ -2352,7 +2354,7 @@
             /* check for AMD MMX extensions */

             uint result;
-            asm("mov $0x80000000, %%eax\n"
+            __asm__ ("mov $0x80000000, %%eax\n"
                 "cpuid\n"
                 "xor %%edx, %%edx\n"
                 "cmp $0x1, %%eax\n"
@@ -2363,7 +2365,7 @@
                 "mov %%edx, %0\n"
                 : "=r" (result)
                 :
-                : "%eax", "%ebx", "%ecx", "%edx"
+                : "%eax", "%ecx", "%edx"
                 );
             if (result & (1<<22))
                 features |= MMX_Extensions;





More information about the xorg mailing list