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