[MPlayer-dev-eng] [PATCH] libvo/aclib_template.c small_memcpy wrong??
Guillaume POIRIER
poirierg at gmail.com
Mon Feb 20 13:30:05 CET 2006
Hi,
On 12/4/05, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> Hi,
> here is an untested patch for $SUBJECT, which I think is broken. What is
> that dummy variable supposed to be? It is never initialized. Also
> without cld the copy might go off in the wrong direction and cause a
> segfault.
What's up this patch Reimar? Did you commit it already? Does it still apply?
Guillaume
--
Just because code is syntactically "valid" GNU C doesn't mean gcc can
always compile it.
Steven Bosscher - 2005-01-01
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11203#c14
-------------- next part --------------
Index: libvo/aclib_template.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/aclib_template.c,v
retrieving revision 1.12
diff -u -r1.12 aclib_template.c
--- libvo/aclib_template.c 4 Jun 2005 21:11:39 -0000 1.12
+++ libvo/aclib_template.c 4 Dec 2005 22:00:00 -0000
@@ -83,10 +83,10 @@
/* for small memory blocks (<256 bytes) this version is faster */
#define small_memcpy(to,from,n)\
{\
-register unsigned long int dummy;\
__asm__ __volatile__(\
+ "cld\n\t"\
"rep; movsb"\
- :"=&D"(to), "=&S"(from), "=&c"(dummy)\
+ :"=&D"(to), "=&S"(from), "=&c"(n)\
/* It's most portable way to notify compiler */\
/* that edi, esi and ecx are clobbered in asm block. */\
/* Thanks to A'rpi for hint!!! */\
More information about the MPlayer-dev-eng
mailing list