I include below my diff file for jpeg-mmx to enable compilation under cygwin.
after application of this patch, run ./configure. The only remaining problem is 
the 
ASFLAGS in the generated Makefile should be changed to "-f win32" from "-f elf"
I have not delved into configure to automate this.
[EMAIL PROTECTED]
Peter King


diff -urN jpeg-mmx/jdct.h test/jdct.h
--- jpeg-mmx/jdct.h     2003-08-02 14:31:28.000000000 +1000
+++ test/jdct.h 2005-04-20 09:08:24.187500000 +1000
@@ -100,11 +100,11 @@
 
 /* TODO: This should be conditional on compilation on an x86 platform */
 
-EXTERN(void) jpeg_fdct_ifast_mmx JPP((INT16 * data));
+EXTERN(void) jpeg_fdct_ifast_mmx JPP((INT16 * data))  __asm__ 
("jpeg_fdct_ifast_mmx") ;
 EXTERN(void) jcquant_3dnow( INT16 *psrc, INT16 *pdst, float *piqf );
 EXTERN(void) jcquant_sse( INT16 *psrc, INT16 *pdst, float *piqf );
-EXTERN(void) jcquant_mmx( INT16 *psrc, INT16 *pdst, INT16 *piqf, INT16 *pqf,
-                                                 unsigned int shift);
+EXTERN(void) jcquant_mmx ( INT16 *psrc, INT16 *pdst, INT16 *piqf, INT16 *pqf,
+                                                 unsigned int shift)  __asm__ 
("jcquant_mmx") ;
 
 EXTERN(void) jpeg_idct_islow
     JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr,
diff -urN jpeg-mmx/jdmerge.c test/jdmerge.c
--- jpeg-mmx/jdmerge.c  2005-02-19 03:52:25.000000000 +1100
+++ test/jdmerge.c      2005-04-20 20:31:40.687500000 +1000
@@ -40,22 +40,22 @@
 
 #if defined(HAVE_MMX_INTEL_MNEMONICS) || defined(HAVE_MMX_ATT_MNEMONICS)
 #define __int64 unsigned long long
-  __int64 const1 = 0x59BA0000D24B59BALL; // Cr_r Cr_b Cr_g Cr_r
-  __int64 const2 = 0x00007168E9FA0000LL; // Cb-r Cb_b Cb_g Cb_r
-  __int64 const5 = 0x0000D24B59BA0000LL; // Cr_b Cr_g Cr_r Cr_b
-  __int64 const6 = 0x7168E9FA00007168LL; // Cb_b Cb_g Cb_r Cb_b
+  __int64 const1 __asm__ ("const1") = 0x59BA0000D24B59BALL; // Cr_r Cr_b Cr_g 
Cr_r
+  __int64 const2 __asm__ ("const2") = 0x00007168E9FA0000LL; // Cb-r Cb_b Cb_g 
Cb_r
+  __int64 const5 __asm__ ("const5") = 0x0000D24B59BA0000LL; // Cr_b Cr_g Cr_r 
Cr_b
+  __int64 const6 __asm__ ("const6") = 0x7168E9FA00007168LL; // Cb_b Cb_g Cb_r 
Cb_b
 
   // constants for factors (One_Half/fix(x)) << 2
 
-  __int64 const05 = 0x0001000000000001LL; // Cr_r Cr_b Cr_g Cr_r
-  __int64 const15 = 0x00000001FFFA0000LL; // Cb-r Cb_b Cb_g Cb_r
-  __int64 const45 = 0x0000000000010000LL; // Cr_b Cr_g Cr_r Cr_b
-  __int64 const55 = 0x0001FFFA00000001LL; // Cb_b Cb_g Cb_r Cb_b
+  __int64 const05 __asm__ ("const05") = 0x0001000000000001LL; // Cr_r Cr_b 
Cr_g Cr_r
+  __int64 const15 __asm__ ("const15") = 0x00000001FFFA0000LL; // Cb-r Cb_b 
Cb_g Cb_r
+  __int64 const45 __asm__ ("const45") = 0x0000000000010000LL; // Cr_b Cr_g 
Cr_r Cr_b
+  __int64 const55 __asm__ ("const55") = 0x0001FFFA00000001LL; // Cb_b Cb_g 
Cb_r Cb_b
 
   // added for MMX
-  __int64 const128 = 0x0080008000800080LL;
-  __int64 empty    = 0x0000000000000000LL;
-  __int64 davemask = 0x0000FFFFFFFF0000LL;
+  __int64 const128 __asm__ ("const128") = 0x0080008000800080LL;
+  __int64 empty    __asm__ ("empty") = 0x0000000000000000LL;
+  __int64 davemask __asm__ ("davemask") = 0x0000FFFFFFFF0000LL;
   ////////////////////////////////
 #endif
 
diff -urN jpeg-mmx/jdsample.c test/jdsample.c
--- jpeg-mmx/jdsample.c 2005-02-19 03:43:18.000000000 +1100
+++ test/jdsample.c     2005-04-20 20:46:22.125000000 +1000
@@ -305,12 +305,12 @@
 
 /* I have no clue why it is written in that strange way, but ok, it works */
 union u1 { __int64 q; double align; }
-mul3w={0x0003000300030003LL}, mul9w={0x0009000900090009LL},
-    mul9ws={0x000900090009000cLL},    mul3ws={0x0003000300030004LL},
-      bias7w={0x0007000700070007LL},    bias8w={0x0008000800080008LL},
-       bias1w={0x0001000100010001LL},    bias2w={0x0002000200020002LL},
-         mask1={0xFF00000000000000LL},     mask2={0x00000000000000FFLL},
-           noval = {0}, input0 = {0}, input1 = {0};
+mul3w __asm__ ("mul3w") ={0x0003000300030003LL}, mul9w __asm__ ("mul9w") 
={0x0009000900090009LL},
+    mul9ws __asm__ ("mul9ws") ={0x000900090009000cLL},    mul3ws __asm__ 
("mul3ws") ={0x0003000300030004LL},
+      bias7w __asm__ ("bias7w") ={0x0007000700070007LL},    bias8w __asm__ 
("bias8w") ={0x0008000800080008LL},
+       bias1w __asm__ ("bias1w") ={0x0001000100010001LL},    bias2w __asm__ 
("bias2w") ={0x0002000200020002LL},
+         mask1 __asm__ ("mask1") ={0xFF00000000000000LL},     mask2 __asm__ 
("mask2") ={0x00000000000000FFLL},
+           noval __asm__ ("noval") = {0}, input0 __asm__ ("input0") = {0}, 
input1 __asm__ ("input1") = {0};
 
 /* Silly forward definitions */
 METHODDEF(void)
diff -urN jpeg-mmx/jidctfst.c test/jidctfst.c
--- jpeg-mmx/jidctfst.c 2005-02-19 03:42:40.000000000 +1100
+++ test/jidctfst.c     2005-04-20 20:22:38.984375000 +1000
@@ -397,12 +397,12 @@
 #endif
 #define __int64 long long /* This won't work for Intel compilers - tell Gernot 
to help fixing ! */ 
 #define int16 short /* And this won't either */
-const     __int64 _fix_141      = 0x5a825a825a825a82LL;
-const    __int64 _fix_184n261  = 0xcf04cf04cf04cf04LL;
-const    __int64 _fix_184      = 0x7641764176417641LL;
-const    __int64 _fix_n184     = 0x896f896f896f896fLL;
-const    __int64 _fix_108n184  = 0xcf04cf04cf04cf04LL;
-const    __int64 _const_0x0080 = 0x0080008000800080LL;
+const     __int64 _fix_141 __asm__ ("_fix_141")    = 0x5a825a825a825a82LL;
+const    __int64 _fix_184n261 __asm__ ("_fix_184n261") = 0xcf04cf04cf04cf04LL;
+const    __int64 _fix_184 __asm__ ("_fix_184") = 0x7641764176417641LL;
+const    __int64 _fix_n184 __asm__ ("_fix_n184")       = 0x896f896f896f896fLL;
+const    __int64 _fix_108n184 __asm__ ("_fix_108n184") = 0xcf04cf04cf04cf04LL;
+const    __int64 _const_0x0080 __asm__ ("_const_0x0080")       = 
0x0080008000800080LL;
 
 __inline GLOBAL(void)
 jpeg_idct_ifast_mmx (j_decompress_ptr cinfo, jpeg_component_info * compptr,

Reply via email to