summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-07-28 03:46:41 +0000
committerMike Frysinger <vapier@gentoo.org>2005-07-28 03:46:41 +0000
commite8f964f7c8ef2edd28c0529f6b129618e3608865 (patch)
treec37961311749b2c64b3d52c60c47c79f77ace6a4 /media-libs/jpeg-mmx/files
parent2.10 stable x86 (diff)
downloadhistorical-e8f964f7c8ef2edd28c0529f6b129618e3608865.tar.gz
historical-e8f964f7c8ef2edd28c0529f6b129618e3608865.tar.bz2
historical-e8f964f7c8ef2edd28c0529f6b129618e3608865.zip
Version 1.1.2 was a typo and broken so clean up and add latest version #55353.
Package-Manager: portage-2.0.51.22-r2
Diffstat (limited to 'media-libs/jpeg-mmx/files')
-rw-r--r--media-libs/jpeg-mmx/files/1.1.2-gcc34.patch255
-rw-r--r--media-libs/jpeg-mmx/files/digest-jpeg-mmx-0.1.61
-rw-r--r--media-libs/jpeg-mmx/files/digest-jpeg-mmx-1.1.2-r11
-rw-r--r--media-libs/jpeg-mmx/files/jpeg-mmx-0.1.6-PIC.patch48
-rw-r--r--media-libs/jpeg-mmx/files/jpeg-mmx-0.1.6-makefile.patch10
5 files changed, 59 insertions, 256 deletions
diff --git a/media-libs/jpeg-mmx/files/1.1.2-gcc34.patch b/media-libs/jpeg-mmx/files/1.1.2-gcc34.patch
deleted file mode 100644
index 48b30306e075..000000000000
--- a/media-libs/jpeg-mmx/files/1.1.2-gcc34.patch
+++ /dev/null
@@ -1,255 +0,0 @@
-diff -ur jpeg-mmx/jdapimin.c jpeg-mmx-gcc34/jdapimin.c
---- jpeg-mmx/jdapimin.c 2000-09-19 12:04:22.000000000 -0400
-+++ jpeg-mmx-gcc34/jdapimin.c 2004-05-16 23:18:44.629857496 -0400
-@@ -412,7 +412,9 @@
- }
-
-
-+#ifdef HAVE_MMX_INTEL_MNEMONICS
- static int mmx_supported = 0;
-+#endif
- int mmxsupport()
- {
-
-@@ -460,7 +462,9 @@
- #endif
-
- #if defined(HAVE_MMX_ATT_MNEMONICS)
-+ register unsigned int mmx_supported __asm__ ("eax") = 0; //we set this to be a register, eax, so we can get to it once we exit the ASM
- __asm__ (
-+ "movl %%ebx,%%edi \n\t" //Make sure we don't clobber ebx through this whole deal
- "pushfl \n\t" //Save Eflag to stack
- "popl %%eax \n\t" //Get Eflag from stack into eax
- "movl %%eax,%%ecx \n\t" //Make another copy of Eflag in ecx
-@@ -479,29 +483,28 @@
-
- "cpuid \n\t" //CPUID instruction (two bytes opcode)
-
-- "cmpl $1,%%eax \n\t" //make sure eax return non-zero value
-+ "cmpl $0,%%eax \n\t" //make sure eax return non-zero value
- "jl NOT_SUPPORTED \n\t" //If eax is zero, mmx not supported
-
-- "xorl %%eax,%%eax \n\t" //set eax to zero
-- "incl %%eax \n\t" //Now increment eax to 1. This instruction is
-- //faster than the instruction "mov eax, 1"
-+ "movl $1,%%eax \n\t" //set eax to 1
-+
- "cpuid \n\t"
-
- "andl $0x00800000,%%edx \n\t" //mask out all bits but mmx bit(24)
- "cmpl $0,%%edx \n\t" // 0 = mmx not supported
- "jz NOT_SUPPORTED \n\t" // non-zero = Yes, mmx IS supported
-
-- "movl $1, mmx_supported \n\t"
-+ "movl $1, %[ret_flag] \n\t"
-
- "NOT_SUPPORTED: \n\t"
-- "movl $mmx_supported, %%eax" //move return value to eax
-+ "movl %%edi,%%ebx \n\t" //Make sure we don't clobber ebx through this whole deal
-
-
-- : "=m" (mmx_supported) // FIXASM: output regs/vars go here, e.g.: "=m" (memory_var)
-+ : [ret_flag] "=r" (mmx_supported) // "r" => (register_var) NB: this is actually the eax register... so we don't clobber it below
-
- : // FIXASM: input regs, e.g.: "c" (count), "S" (src), "D" (dest)
-
-- : "eax", "ebx", "ecx", "edx", "cc", "memory");
-+ : "ecx", "edx", "cc", "memory");
- #endif
-
- return mmx_supported;
-diff -ur jpeg-mmx/jdcolor.c jpeg-mmx-gcc34/jdcolor.c
---- jpeg-mmx/jdcolor.c 2000-09-19 12:04:41.000000000 -0400
-+++ jpeg-mmx-gcc34/jdcolor.c 2004-05-16 23:20:21.381149064 -0400
-@@ -123,9 +123,9 @@
- #if defined(__GNUC__)
- #define int64 unsigned long long
- #endif
--static const int64 te0 = 0x0200020002000200; // -128 << 2
--static const int64 te1 = 0xe9fa7168e9fa7168; // for cb
--static const int64 te2 = 0x59bad24d59bad24d; // for cr
-+const int64 te0 = 0x0200020002000200; // -128 << 2
-+const int64 te1 = 0xe9fa7168e9fa7168; // for cb
-+const int64 te2 = 0x59bad24d59bad24d; // for cr
- //static const int64 te2 = 0x59ba524b59ba524b; // for cr
- /* How to calculate the constants (see constants from above for YCbCr->RGB):
- trunc(-0.34414*16384) << 16 + trunc(1.772 * 16348) || mind that negative numbers are in 2-complement form (2^32+x+1) */
-@@ -160,10 +160,10 @@
- #if defined(HAVE_MMX_ATT_MNEMONICS)
- __asm__(
- "mov %1, %%eax\n"
-- "mov %2, %%ebx\n"
-+ "mov %2, %%edx\n"
- "mov %3, %%ecx\n"
- "movd (%%eax),%%mm0\n" // mm0: 0 0 0 0 y3 y2 y1 y0 - 8 bit
-- "movd (%%ebx),%%mm1\n" // mm1: 0 0 0 0 cb3 cb2 cb1 cb0
-+ "movd (%%edx),%%mm1\n" // mm1: 0 0 0 0 cb3 cb2 cb1 cb0
- "movd (%%ecx),%%mm2\n" // mm2: 0 0 0 0 cr3 cr2 cr1 cr0
- "pxor %%mm7,%%mm7\n" // mm7 = 0
- "punpcklbw %%mm7,%%mm0\n" // mm0: y3 y2 y1 y0 - expand to 16 bit
-@@ -247,7 +247,7 @@
-
- :"=m"(outptr[0])
- :"m"(inptr0),"m"(inptr1),"m"(inptr2) //y cb cr
-- :"eax", "ebx", "ecx", "st");
-+ :"eax", "edx", "ecx", "st");
- #endif
-
- outptr+=12;
-diff -ur jpeg-mmx/jdmerge.c jpeg-mmx-gcc34/jdmerge.c
---- jpeg-mmx/jdmerge.c 2000-09-19 12:04:25.000000000 -0400
-+++ jpeg-mmx-gcc34/jdmerge.c 2004-05-16 23:18:44.635856584 -0400
-@@ -816,6 +816,7 @@
- fprintf(stderr, "Using accelerated MMX code for merge !\n");
-
- __asm__ (
-+ "pushl %%ebx \n\t"
- "movl %0, %%esi \n\t"
-
- "movl %1, %%eax \n\t"
-@@ -1173,12 +1174,13 @@
- "jnz do_next16 \n\t"
-
- "emms \n\t"
-+ "popl %%ebx \n\t"
-
- : //"=m"(&cols_asm)
-
- : "m"(inptr00), "m"(inptr01), "m"(inptr2), "m"(inptr1), "m"(outptr1),
- "m"(outptr0),"m"(cols_asm) /* was (&cols_asm) */
-- : "eax", "ebx", "ecx", "edx", "edi", "esi", "st", "cc", "memory"
-+ : "eax", "ecx", "edx", "edi", "esi", "st", "cc", "memory"
- );
- #if 0
- "movl $inptr00, %%esi \n\t"
-diff -ur jpeg-mmx/jdsample.c jpeg-mmx-gcc34/jdsample.c
---- jpeg-mmx/jdsample.c 2000-09-19 12:04:26.000000000 -0400
-+++ jpeg-mmx-gcc34/jdsample.c 2004-05-16 23:18:44.638856128 -0400
-@@ -713,7 +713,7 @@
- // %0 %1 %2 %3 %4
- : "m"(hsize), "m"(inptr), "m"(outptr)
-
-- : "eax", "ebx", "ecx", "edx", "esi", "edi", "memory", "cc", "st"
-+ : "eax", "ecx", "edx", "esi", "edi", "memory", "cc", "st"
- );
- #endif
- }
-@@ -1732,7 +1732,7 @@
- : "m"(dsamp), "m"(inptr0), "m"(inptr1), "m"(outptr), "m"(save_val), "m"(inptr2),
- "m"(outptr2) /* %6 */
-
-- : "eax", "ebx", "ecx", "edx", "esi", "edi", "memory", "cc", "st"
-+ : "eax", "ecx", "edx", "esi", "edi", "memory", "cc", "st"
- );
- #endif
- inrow++;
-diff -ur jpeg-mmx/jidctfst.c jpeg-mmx-gcc34/jidctfst.c
---- jpeg-mmx/jidctfst.c 2000-09-19 12:04:40.000000000 -0400
-+++ jpeg-mmx-gcc34/jidctfst.c 2004-05-16 23:18:44.642855520 -0400
-@@ -1445,6 +1445,7 @@
-
- __asm__ (
-
-+ "pushl %%ebx \n\t"
- "movl %0, %%edi \n\t"
- "movl %1, %%ebx \n\t"
- "movl %2, %%esi \n\t"
-@@ -2467,12 +2468,13 @@
- "movq %%mm3,(%%ebx) \n\t"
-
- "emms \n\t"
-+ "popl %%ebx \n\t"
-
- : // no output regs
- // %0 %1 %2 %3 %4
- : "m"(quantptr), "m"(inptr), "m"(wsptr), "m"(outptr), "m"(output_col)
-
-- : "eax", "ebx", "ecx", "edx", "esi", "edi", "memory", "cc", "st"
-+ : "eax", "ecx", "edx", "esi", "edi", "memory", "cc", "st"
- );
-
- #endif
-diff -ur jpeg-mmx/jidctint.c jpeg-mmx-gcc34/jidctint.c
---- jpeg-mmx/jidctint.c 2000-09-19 12:04:20.000000000 -0400
-+++ jpeg-mmx-gcc34/jidctint.c 2004-05-16 23:20:03.636846608 -0400
-@@ -173,32 +173,32 @@
- * Perform dequantization and inverse DCT on one block of coefficients.
- */
- #define __int64 unsigned long long
-- static __int64 fix_029_n089n196 = 0x098ea46e098ea46e;
-- static __int64 fix_n196_n089 = 0xc13be333c13be333;
-- static __int64 fix_205_n256n039 = 0x41b3a18141b3a181;
-- static __int64 fix_n039_n256 = 0xf384adfdf384adfd;
-- static __int64 fix_307n256_n196 = 0x1051c13b1051c13b;
-- static __int64 fix_n256_n196 = 0xadfdc13badfdc13b;
-- static __int64 fix_150_n089n039 = 0x300bd6b7300bd6b7;
-- static __int64 fix_n039_n089 = 0xf384e333f384e333;
-- static __int64 fix_117_117 = 0x25a125a125a125a1;
-- static __int64 fix_054_054p076 = 0x115129cf115129cf;
-- static __int64 fix_054n184_054 = 0xd6301151d6301151;
--
-- static __int64 fix_054n184 = 0xd630d630d630d630;
-- static __int64 fix_054 = 0x1151115111511151;
-- static __int64 fix_054p076 = 0x29cf29cf29cf29cf;
-- static __int64 fix_n196p307n256 = 0xd18cd18cd18cd18c;
-- static __int64 fix_n089n039p150 = 0x06c206c206c206c2;
-- static __int64 fix_n256 = 0xadfdadfdadfdadfd;
-- static __int64 fix_n039 = 0xf384f384f384f384;
-- static __int64 fix_n256n039p205 = 0xe334e334e334e334;
-- static __int64 fix_n196 = 0xc13bc13bc13bc13b;
-- static __int64 fix_n089 = 0xe333e333e333e333;
-- static __int64 fixn089n196p029 = 0xadfcadfcadfcadfc;
-+ __int64 fix_029_n089n196 = 0x098ea46e098ea46e;
-+ __int64 fix_n196_n089 = 0xc13be333c13be333;
-+ __int64 fix_205_n256n039 = 0x41b3a18141b3a181;
-+ __int64 fix_n039_n256 = 0xf384adfdf384adfd;
-+ __int64 fix_307n256_n196 = 0x1051c13b1051c13b;
-+ __int64 fix_n256_n196 = 0xadfdc13badfdc13b;
-+ __int64 fix_150_n089n039 = 0x300bd6b7300bd6b7;
-+ __int64 fix_n039_n089 = 0xf384e333f384e333;
-+ __int64 fix_117_117 = 0x25a125a125a125a1;
-+ __int64 fix_054_054p076 = 0x115129cf115129cf;
-+ __int64 fix_054n184_054 = 0xd6301151d6301151;
-+
-+ __int64 fix_054n184 = 0xd630d630d630d630;
-+ __int64 fix_054 = 0x1151115111511151;
-+ __int64 fix_054p076 = 0x29cf29cf29cf29cf;
-+ __int64 fix_n196p307n256 = 0xd18cd18cd18cd18c;
-+ __int64 fix_n089n039p150 = 0x06c206c206c206c2;
-+ __int64 fix_n256 = 0xadfdadfdadfdadfd;
-+ __int64 fix_n039 = 0xf384f384f384f384;
-+ __int64 fix_n256n039p205 = 0xe334e334e334e334;
-+ __int64 fix_n196 = 0xc13bc13bc13bc13b;
-+ __int64 fix_n089 = 0xe333e333e333e333;
-+ __int64 fixn089n196p029 = 0xadfcadfcadfcadfc;
-
-- static __int64 const_0x2xx8 = 0x0000010000000100;
-- static __int64 const_0x0808 = 0x0808080808080808;
-+ __int64 const_0x2xx8 = 0x0000010000000100;
-+ __int64 const_0x0808 = 0x0808080808080808;
-
- __inline void domidct8x8llmW(short *inptr, short *quantptr, int *wsptr,
- JSAMPARRAY outptr, int output_col);
-@@ -1535,6 +1535,7 @@
- #if defined(HAVE_MMX_ATT_MNEMONICS)
- __asm__ (
-
-+ "pushl %%ebx \n\t"
- "movl %0, %%edi \n\t"
- "movl %1, %%ebx \n\t"
- "movl %2, %%esi \n\t"
-@@ -2837,11 +2838,13 @@
-
- "emms \n\t"
-
-+ "popl %%ebx \n\t"
-+
- :
- // %0 %1 %2 %3 %4
- : "m"(quantptr), "m"(inptr), "m"(wsptr), "m"(outptr), "g"(output_col)
-
-- : "eax", "ebx", "ecx", "edx", "edi", "esi", "cc", "memory", "st"
-+ : "eax", "ecx", "edx", "edi", "esi", "cc", "memory", "st"
- );
- #endif /* ATT style assembler */
- }
diff --git a/media-libs/jpeg-mmx/files/digest-jpeg-mmx-0.1.6 b/media-libs/jpeg-mmx/files/digest-jpeg-mmx-0.1.6
new file mode 100644
index 000000000000..d8b6cf2f216b
--- /dev/null
+++ b/media-libs/jpeg-mmx/files/digest-jpeg-mmx-0.1.6
@@ -0,0 +1 @@
+MD5 9156c429bd8c4dea65c877c50ed89e15 jpeg-mmx-0.1.6.tar.gz 597439
diff --git a/media-libs/jpeg-mmx/files/digest-jpeg-mmx-1.1.2-r1 b/media-libs/jpeg-mmx/files/digest-jpeg-mmx-1.1.2-r1
deleted file mode 100644
index b40a05be6a0c..000000000000
--- a/media-libs/jpeg-mmx/files/digest-jpeg-mmx-1.1.2-r1
+++ /dev/null
@@ -1 +0,0 @@
-MD5 63d871b28cb1524b4cf088155688778d jpeg-mmx-1.1.2.tar.gz 568880
diff --git a/media-libs/jpeg-mmx/files/jpeg-mmx-0.1.6-PIC.patch b/media-libs/jpeg-mmx/files/jpeg-mmx-0.1.6-PIC.patch
new file mode 100644
index 000000000000..012dcad53254
--- /dev/null
+++ b/media-libs/jpeg-mmx/files/jpeg-mmx-0.1.6-PIC.patch
@@ -0,0 +1,48 @@
+Fix compiling as PIC.
+
+--- jidctint.c
++++ jidctint.c
+@@ -2838,6 +2838,8 @@
+
+ "emms \n\t"
+
++ "popl %%ebx \n\t"
++
+ :
+ // %0 %1 %2 %3 %4
+ : "m"(quantptr), "m"(inptr), "m"(wsptr), "m"(outptr), "g"(output_col),
+@@ -2857,7 +2859,7 @@
+ "m"(fix_n196p307n256), "m"(fix_054p076), "m"(fix_054), "m"(fix_054n184),
+ // %28
+ "m"(const_0x0808)
+- : "eax", "ebx", "ecx", "edx", "edi", "esi", "cc", "memory", "st"
++ : "eax", "ecx", "edx", "edi", "esi", "cc", "memory", "st"
+ );
+ #endif /* ATT style assembler */
+ }
+--- jdcolor.c
++++ jdcolor.c
+@@ -262,12 +262,11 @@
+ #endif
+ #if defined(HAVE_MMX_ATT_MNEMONICS)
+ __asm__(
+- "pushl %%ebx\n"
+ "mov %1, %%eax\n"
+- "mov %2, %%ebx\n"
++ "mov %2, %%edx\n"
+ "mov %3, %%ecx\n"
+ "movd (%%eax),%%mm0\n" // mm0: 0 0 0 0 y3 y2 y1 y0 - 8 bit
+- "movd (%%ebx),%%mm1\n" // mm1: 0 0 0 0 cb3 cb2 cb1 cb0
++ "movd (%%edx),%%mm1\n" // mm1: 0 0 0 0 cb3 cb2 cb1 cb0
+ "movd (%%ecx),%%mm2\n" // mm2: 0 0 0 0 cr3 cr2 cr1 cr0
+ "pxor %%mm7,%%mm7\n" // mm7 = 0
+ "punpcklbw %%mm7,%%mm0\n" // mm0: y3 y2 y1 y0 - expand to 16 bit
+@@ -352,7 +351,7 @@
+ :"=m"(outptr[0])
+ :"m"(inptr0),"m"(inptr1),"m"(inptr2), //y cb cr
+ "m"(te0),"m"(te1),"m"(te2)
+- :"eax", "ebx", "ecx", "st");
++ :"eax", "edx", "ecx", "st");
+ #endif
+
+ outptr+=12;
diff --git a/media-libs/jpeg-mmx/files/jpeg-mmx-0.1.6-makefile.patch b/media-libs/jpeg-mmx/files/jpeg-mmx-0.1.6-makefile.patch
new file mode 100644
index 000000000000..45d5cb9c959d
--- /dev/null
+++ b/media-libs/jpeg-mmx/files/jpeg-mmx-0.1.6-makefile.patch
@@ -0,0 +1,10 @@
+--- makefile.cfg
++++ makefile.cfg
+@@ -250,6 +250,7 @@
+
+
+ %.o: %.s ; $(AS) $(ASFLAGS) -o $@ $<
++%.lo: %.s ; $(AS) $(ASFLAGS) -o $@ $< ; cp $@ $(patsubst %.lo, %.o, $@)
+
+ # Mistake catcher:
+