[Flac-dev] Enable the 3dnow function?

Miroslav Lichvar lichvarm at phoenix.inf.upol.cz
Wed Dec 25 18:14:02 PST 2002


On Mon, Dec 23, 2002 at 10:20:38PM -0800, Josh Coalson wrote:
> --- Josh Coalson <xflac at yahoo.com> wrote:
> > 
> > OK, I'll make it the default in 1.0.5
> 
> now the default.

I did an extra check and I found stack handling in the function isn't
100% clean, I can imagine possible segfault. Please apply attached
patch. Thanks.

-- 
Miroslav Lichvar
-------------- next part --------------
--- src/libFLAC/ia32/lpc_asm.nasm.orig	2002-01-26 19:05:12.000000000 +0100
+++ src/libFLAC/ia32/lpc_asm.nasm	2002-12-26 02:16:12.000000000 +0100
@@ -619,6 +619,8 @@
 	mov	esi, [ebp + 20]
 	mov	edi, [ebp + 24]
 	mov	edx, [ebp + 28]
+	inc	edx
+	and	edx, byte -2
 	mov	eax, edx
 	neg	eax
 	and	esp, byte -8
@@ -639,7 +641,7 @@
 	cmp	esi, ecx
 	mov	eax, esi
 	ja	short .loop2_pre
-	align	16		;8 nops
+	align	16		;4 nops
 .loop1_i:
 	movd	mm0, [eax]
 	movd	mm2, [eax + 4]
@@ -706,6 +708,7 @@
 	jnz	short .loop2_i
 
 	mov	edi, [ebp + 32]
+	mov	edx, [ebp + 28]
 .loop3:
 	dec	edx
 	mov	eax, [esp + 4 * edx]


More information about the Flac-dev mailing list