rpms/transcode/F-11 transcode-1.1.1-textrel.patch, NONE, 1.1 transcode.spec, 1.14, 1.15

David Juran juran at rpmfusion.org
Sat Jul 4 23:55:10 CEST 2009


Author: juran

Update of /cvs/free/rpms/transcode/F-11
In directory se02.es.rpmfusion.net:/tmp/cvs-serv26044

Modified Files:
	transcode.spec 
Added Files:
	transcode-1.1.1-textrel.patch 
Log Message:
- Fix TEXTREL (Bz 658)
- Update URL



transcode-1.1.1-textrel.patch:

--- NEW FILE transcode-1.1.1-textrel.patch ---

# HG changeset patch
# User achurch
# Date 1243924499 -32400
# Node ID c243289ebe50bf95b0d69852f2a5d3c31f666dce
# Parent  852f3e9b61b2c692f9d715be8ff965d18110d1f5
Add --disable-x86-textrels configure option (default enabled) to fix bug #15302.
testsuite/test-acmemcpy confirmed to pass on x86 with both --disable- and
--enable-x86-textrels.

 ===========================================================================
--- a/aclib/memcpy.c	Tue Jun 02 13:42:47 2009 +0900
+++ b/aclib/memcpy.c	Tue Jun 02 15:34:59 2009 +0900
@@ -59,8 +59,15 @@
         # First align destination address to a multiple of 8 bytes      \n\
         mov $8, %%eax           # EAX <- (8-dest) & 7                   \n\
         sub %%edi, %%eax                                                \n\
-        and $7, %%eax           # ... which is the number of bytes to copy\n\
-        lea 0f, %%edx           # Use a computed jump--faster than a loop\n\
+        and $7, %%eax           # ... which is the number of bytes to copy\n"
+#ifdef ACLIB_DISABLE_X86_TEXTRELS  // Because "lea 0f" requires a textrel
+"       xchg %%eax, %%ecx                                               \n\
+        mov %%ecx, %%edx                                                \n\
+        repz movsb                                                      \n\
+        mov %%eax, %%ecx                                                \n\
+        mov %%edx, %%eax                                                \n"
+#else
+"       lea 0f, %%edx           # Use a computed jump--faster than a loop\n\
         sub %%eax, %%edx                                                \n\
         jmp *%%edx              # Execute 0-7 MOVSB's                   \n\
         movsb                                                           \n\
@@ -69,8 +76,9 @@
         movsb                                                           \n\
         movsb                                                           \n\
         movsb                                                           \n\
-        movsb                                                           \n\
-0:      sub %%eax, %%ecx        # Update count                          \n\
+        movsb                                                           \n"
+#endif
+"0:     sub %%eax, %%ecx        # Update count                          \n\
                                                                         \n\
         # Now copy data in blocks                                       \n\
 0:      mov %%ecx, %%edx        # EDX <- ECX >> 6 (cache lines to copy) \n\
@@ -114,8 +122,13 @@
 mmx.memcpy_last:                                                        \n\
         # Copy last <64 bytes, using the computed jump trick            \n\
         mov %%ecx, %%eax        # EAX <- ECX>>2                         \n\
-        shr $2, %%eax                                                   \n\
-        lea 0f, %%edx                                                   \n\
+        shr $2, %%eax                                                   \n"
+#ifdef ACLIB_DISABLE_X86_TEXTRELS
+"       xchg %%eax, %%ecx                                               \n\
+        repz movsd                                                      \n\
+        mov %%eax, %%ecx                                                \n"
+#else
+"       lea 0f, %%edx                                                   \n\
         sub %%eax, %%edx                                                \n\
         jmp *%%edx              # Execute 0-15 MOVSD's                  \n\
         movsd                                                           \n\
@@ -132,15 +145,20 @@
         movsd                                                           \n\
         movsd                                                           \n\
         movsd                                                           \n\
-        movsd                                                           \n\
-0:      and $3, %%ecx           # ECX <- ECX & 3                        \n\
-        lea 0f, %%edx                                                   \n\
+        movsd                                                           \n"
+#endif
+"0:     and $3, %%ecx           # ECX <- ECX & 3                        \n"
+#ifdef ACLIB_DISABLE_X86_TEXTRELS
+"       repz movsb                                                      \n"
+#else
+"       lea 0f, %%edx                                                   \n\
         sub %%ecx, %%edx                                                \n\
         jmp *%%edx              # Execute 0-3 MOVSB's                   \n\
         movsb                                                           \n\
         movsb                                                           \n\
-        movsb                                                           \n\
-0:                                                                      \n\
+        movsb                                                           \n"
+#endif
+"0:                                                                     \n\
         # All done!                                                     \n\
         emms                    # Clean up MMX state                    \n\
         pop %%edi               # Restore destination (return value)    \n\
@@ -180,8 +198,15 @@
         # First align destination address to a multiple of 8 bytes      \n\
         mov $8, %%eax           # EAX <- (8-dest) & 7                   \n\
         sub %%edi, %%eax                                                \n\
-        and $7, %%eax           # ... which is the number of bytes to copy\n\
-        lea 0f, %%edx           # Use a computed jump--faster than a loop\n\
+        and $7, %%eax           # ... which is the number of bytes to copy\n"
+#ifdef ACLIB_DISABLE_X86_TEXTRELS
+"       xchg %%eax, %%ecx                                               \n\
+        mov %%ecx, %%edx                                                \n\
+        repz movsb                                                      \n\
+        mov %%eax, %%ecx                                                \n\
+        mov %%edx, %%eax                                                \n"
+#else
+"       lea 0f, %%edx           # Use a computed jump--faster than a loop\n\
         sub %%eax, %%edx                                                \n\
         jmp *%%edx              # Execute 0-7 MOVSB's                   \n\
         movsb                                                           \n\
@@ -190,8 +215,9 @@
         movsb                                                           \n\
         movsb                                                           \n\
         movsb                                                           \n\
-        movsb                                                           \n\
-0:      sub %%eax, %%ecx        # Update count                          \n\
+        movsb                                                           \n"
+#endif
+"0:     sub %%eax, %%ecx        # Update count                          \n\
                                                                         \n\
         cmp $0x10040, %%ecx     # Is this a large block? (0x10040 is an \n\
                                 # arbitrary value where prefetching and \n\
@@ -266,8 +292,13 @@
 sse.memcpy_last:                                                        \n\
         # Copy last <64 bytes, using the computed jump trick            \n\
         mov %%ecx, %%eax        # EAX <- ECX>>2                         \n\
-        shr $2, %%eax                                                   \n\
-        lea 0f, %%edx                                                   \n\
+        shr $2, %%eax                                                   \n"
+#ifdef ACLIB_DISABLE_X86_TEXTRELS
+"       xchg %%eax, %%ecx                                               \n\
+        repz movsd                                                      \n\
+        mov %%eax, %%ecx                                                \n"
+#else
+"       lea 0f, %%edx                                                   \n\
         sub %%eax, %%edx                                                \n\
         jmp *%%edx              # Execute 0-15 MOVSD's                  \n\
         movsd                                                           \n\
@@ -284,15 +315,20 @@
         movsd                                                           \n\
         movsd                                                           \n\
         movsd                                                           \n\
-        movsd                                                           \n\
-0:      and $3, %%ecx           # ECX <- ECX & 3                        \n\
-        lea sse.memcpy_end, %%edx                                       \n\
+        movsd                                                           \n"
+#endif
+"0:     and $3, %%ecx           # ECX <- ECX & 3                        \n"
+#ifdef ACLIB_DISABLE_X86_TEXTRELS
+"       repz movsb                                                      \n"
+#else
+"       lea sse.memcpy_end, %%edx                                       \n\
         sub %%ecx, %%edx                                                \n\
         jmp *%%edx              # Execute 0-3 MOVSB's                   \n\
         movsb                                                           \n\
         movsb                                                           \n\
-        movsb                                                           \n\
-                                                                        \n\
+        movsb                                                           \n"
+#endif
+"                                                                       \n\
 sse.memcpy_end:                                                         \n\
         # All done!                                                     \n\
         emms                    # Clean up after MMX instructions       \n\
--- a/configure.in	Tue Jun 02 13:42:47 2009 +0900
+++ b/configure.in	Tue Jun 02 15:34:59 2009 +0900
@@ -1356,6 +1356,11 @@
 dnl
 dnl aclib
 dnl
+AC_ARG_ENABLE([x86-textrels],
+    AC_HELP_STRING([--enable-x86-textrels], [enable x86-32 optimizations which use text relocations (yes)]),
+    [if test "no" = "$enableval"; then
+         AC_DEFINE([ACLIB_DISABLE_X86_TEXTRELS], [1], [Disable x86-32 optimizations in aclib that require text relocations])
+     fi])
 ACLIB_LIBS="\$(top_builddir)/aclib/libac.la"
 AC_SUBST(ACLIB_LIBS)
 



Index: transcode.spec
===================================================================
RCS file: /cvs/free/rpms/transcode/F-11/transcode.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- transcode.spec	29 Mar 2009 14:14:59 -0000	1.14
+++ transcode.spec	4 Jul 2009 21:55:10 -0000	1.15
@@ -7,15 +7,16 @@
 
 Name:           transcode
 Version:        1.1.1
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Video stream processing tool
 
 Group:          Applications/Multimedia
 License:        GPLv2+
-URL:            http://www.transcoding.org/
-Source0:        http://fromani.exit1.org/%{name}-%{version}.tar.bz2
+URL:            http://tcforge.berlios.de/
+Source0:        http://prdownload.berlios.de/tcforge/%{name}-%{version}.tar.bz2
 Patch0:         %{name}-pvmbin.patch
 Patch3:         transcode-1.0.4.external_dv.patch
+Patch4:		transcode-1.1.1-textrel.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -67,6 +68,7 @@
 %setup -q
 %patch0 -p1 -b .pvmbin
 %patch3 -p1 -b .external_dv
+%patch4 -p1 -b .textrel
 rm filter/preview/dv_types.h
 rm import/v4l/videodev.h
 rm import/v4l/videodev2.h
@@ -80,6 +82,7 @@
 
 %configure \
         --disable-dependency-tracking                           \
+	--disable-x86-textrels                                  \
         --with-x                                                \
         --enable-libavcodec                                     \
         --enable-libavformat                                    \
@@ -135,6 +138,10 @@
 
 
 %changelog
+* Sat Jul  4 2009 David Juran <david at juran.se> - 1.1.1-6
+- Fix TEXTREL (Bz 658)
+- Update URL
+
 * Sun Mar 29 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 1.1.1-5
 - rebuild for new F11 features
 



More information about the rpmfusion-commits mailing list