404e0aa
diff -up allegro-4.2.2/include/allegro/platform/al386gcc.h~ allegro-4.2.2/include/allegro/platform/al386gcc.h
404e0aa
--- allegro-4.2.2/include/allegro/platform/al386gcc.h~	2008-01-21 19:18:34.000000000 +0100
404e0aa
+++ allegro-4.2.2/include/allegro/platform/al386gcc.h	2008-01-21 19:18:34.000000000 +0100
404e0aa
@@ -208,14 +208,13 @@ AL_INLINE(fixed, fixsub, (fixed x, fixed
404e0aa
  */
404e0aa
 AL_INLINE(fixed, fixmul, (fixed x, fixed y),
404e0aa
 {
404e0aa
-   fixed edx __attribute__ ((__unused__));
404e0aa
    fixed result;
404e0aa
 
404e0aa
    __PRECALCULATE_CONSTANTS(x / 65536.0 * y)
404e0aa
    {
404e0aa
       __asm__ (
404e0aa
-	 "  movl %2, %%eax ; "
404e0aa
-	 "  imull %3 ; "                  /* do the multiply */
404e0aa
+	 "  movl %1, %%eax ; "
404e0aa
+	 "  imull %2 ; "                  /* do the multiply */
404e0aa
 	 "  shrdl $16, %%edx, %%eax ; "
404e0aa
 
404e0aa
 	 "  sarl $15, %%edx ; "           /* check for overflow */
404e0aa
@@ -223,14 +222,14 @@ AL_INLINE(fixed, fixmul, (fixed x, fixed
404e0aa
 	 "  cmpl $-1, %%edx ; "
404e0aa
 	 "  je 0f ; "
404e0aa
 
404e0aa
-	 "  movl %5, %%eax ; "            /* on overflow, set errno */
404e0aa
-	 "  movl %4, (%%eax) ; "
404e0aa
+	 "  movl %4, %%eax ; "            /* on overflow, set errno */
404e0aa
+	 "  movl %3, (%%eax) ; "
404e0aa
 	 "  movl $0x7FFFFFFF, %%eax ; "   /* and return MAXINT */
404e0aa
-	 "  cmpl $0, %2 ; "
404e0aa
+	 "  cmpl $0, %1 ; "
404e0aa
 	 "  jge 1f ; "
404e0aa
 	 "  negl %%eax ; "
404e0aa
 	 " 1: "
404e0aa
-	 "  cmpl $0, %3 ; "
404e0aa
+	 "  cmpl $0, %2 ; "
404e0aa
 	 "  jge 0f ; "
404e0aa
 	 "  negl %%eax ; "
404e0aa
 
404e0aa
@@ -238,15 +237,14 @@ AL_INLINE(fixed, fixmul, (fixed x, fixed
404e0aa
 
404e0aa
 	 " 0: "                           /* finished */
404e0aa
 
404e0aa
-      : "=&a" (result),                   /* the result has to go in eax */
404e0aa
-	"=&d" (edx)                       /* reliably reserve edx */
404e0aa
+      : "=&a" (result)                    /* the result has to go in eax */
404e0aa
 
404e0aa
       : "mr" (x),                         /* x and y can be regs or mem */
404e0aa
 	"mr" (y),
404e0aa
 	"i" (ERANGE),
404e0aa
 	"m" (allegro_errno)
404e0aa
 
404e0aa
-      : "%cc", "memory"                   /* clobbers flags and errno */
404e0aa
+      : "%cc", "memory", "edx"            /* clobbers flags, errno and edx */
404e0aa
       );
404e0aa
 
404e0aa
       return result;