> On Thu, 12 May 2005 [EMAIL PROTECTED] wrote:
> 
> > 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 
> 
>       Thanks for reposting as an attachement - the lines weren't wrapped this
>       time.
> 
>       But, alas, whatever editor was used ended up converting tabs to spaces
>       and a couple of the patches failed to apply due to whitespace not
>       matching. 
> 
>       Rather than ask for a repost I manually went thru and merged the lines.
> 
>       Although tabs are best avoided they do sometimes sneak into the code -
>       something to watch out for.
> 
>       Give Sourceforge a few hours and you should be able to see if all the
>       changes have made it in correctly.
> 
>       Cheers,
>       Steven Schultz
> 
I have been away for a couple of days but the patch for cygwin compiles still 
doesn't 
appear in the cvs repository. I have updated my working copy, made my changes 
again 
with care not to introduce changes in white space on any none edited lines and 
prepared a new patch file which I hope will work ok.


Attachments:
  C:\progs\cygwin\home\pjk\cvs20050515\diff.txt
------- End of forwarded message [EMAIL PROTECTED]
Peter King


diff -urN jpeg-mmx/jdct.h jpeg-mmx.new/jdct.h
--- jpeg-mmx/jdct.h     2005-05-16 16:25:56.593750000 +1000
+++ jpeg-mmx.new/jdct.h 2005-05-16 16:27:56.515625000 +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);
+                                                 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 jpeg-mmx.new/jdmerge.c
--- jpeg-mmx/jdmerge.c  2005-05-16 16:25:58.828125000 +1000
+++ jpeg-mmx.new/jdmerge.c      2005-05-16 16:32:27.812500000 +1000
@@ -40,22 +40,22 @@
 
 #if defined(HAVE_MMX_INTEL_MNEMONICS) || defined(HAVE_MMX_ATT_MNEMONICS)
 #define __int64 unsigned long long
-  __int64 const1 = 0x59BA0000D24B59BAULL;       // Cr_r Cr_b Cr_g Cr_r
-  __int64 const2 = 0x00007168E9FA0000ULL;      // Cb-r Cb_b Cb_g Cb_r
-  __int64 const5 = 0x0000D24B59BA0000ULL;      // Cr_b Cr_g Cr_r Cr_b
-  __int64 const6 = 0x7168E9FA00007168ULL;      // Cb_b Cb_g Cb_r Cb_b
+  __int64 const1 __asm__ ("const1") = 0x59BA0000D24B59BAULL;       // Cr_r 
Cr_b Cr_g Cr_r
+  __int64 const2  __asm__ ("const2") = 0x00007168E9FA0000ULL;  // Cb-r Cb_b 
Cb_g Cb_r
+  __int64 const5  __asm__ ("const5") = 0x0000D24B59BA0000ULL;  // Cr_b Cr_g 
Cr_r Cr_b
+  __int64 const6  __asm__ ("const6") = 0x7168E9FA00007168ULL;  // Cb_b Cb_g 
Cb_r Cb_b
 
   // constants for factors (One_Half/fix(x)) << 2
 
-  __int64 const05 = 0x0001000000000001ULL;     // Cr_r Cr_b Cr_g Cr_r
-  __int64 const15 = 0x00000001FFFA0000ULL;     // Cb-r Cb_b Cb_g Cb_r
-  __int64 const45 = 0x0000000000010000ULL;     // Cr_b Cr_g Cr_r Cr_b
-  __int64 const55 = 0x0001FFFA00000001ULL;     // Cb_b Cb_g Cb_r Cb_b
+  __int64 const05  __asm__ ("const05") = 0x0001000000000001ULL;        // Cr_r 
Cr_b Cr_g Cr_r
+  __int64 const15  __asm__ ("const15") = 0x00000001FFFA0000ULL;        // Cb-r 
Cb_b Cb_g Cb_r
+  __int64 const45  __asm__ ("const45") = 0x0000000000010000ULL;        // Cr_b 
Cr_g Cr_r Cr_b
+  __int64 const55  __asm__ ("const55") = 0x0001FFFA00000001ULL;        // Cb_b 
Cb_g Cb_r Cb_b
 
   // added for MMX
-  __int64 const128 = 0x0080008000800080ULL;
-  __int64 empty = 0x0000000000000000ULL;
-  __int64 davemask = 0x0000FFFFFFFF0000ULL;
+  __int64 const128  __asm__ ("const128") = 0x0080008000800080ULL;
+  __int64 empty  __asm__ ("empty") = 0x0000000000000000ULL;
+  __int64 davemask  __asm__ ("davemask") = 0x0000FFFFFFFF0000ULL;
   ////////////////////////////////
 #endif
 
diff -urN jpeg-mmx/jdsample.c jpeg-mmx.new/jdsample.c
--- jpeg-mmx/jdsample.c 2005-05-16 16:26:00.234375000 +1000
+++ jpeg-mmx.new/jdsample.c     2005-05-16 16:38:44.515625000 +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 jpeg-mmx.new/jidctfst.c
--- jpeg-mmx/jidctfst.c 2005-05-16 16:26:03.390625000 +1000
+++ jpeg-mmx.new/jidctfst.c     2005-05-16 16:45:28.312500000 +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