Mixer: Visual C MMX asm code now aligns loops to 16 bytes.
authorRyan C. Gordon <icculus@icculus.org>
Sun, 17 Apr 2005 10:27:00 +0000
changeset 1049b4117292e587
parent 1048 a78acdd4967e
child 1050 8e1815fd9777
Mixer: Visual C MMX asm code now aligns loops to 16 bytes.

This patch came from Stephane Marchesin's codefork, but I don't know who
wrote it originally.
src/audio/SDL_mixer_MMX_VC.c
     1.1 --- a/src/audio/SDL_mixer_MMX_VC.c	Sun Apr 17 10:23:58 2005 +0000
     1.2 +++ b/src/audio/SDL_mixer_MMX_VC.c	Sun Apr 17 10:27:00 2005 +0000
     1.3 @@ -19,7 +19,6 @@
     1.4  {
     1.5  	__asm
     1.6  	{
     1.7 -		align	16
     1.8  
     1.9  		push	edi
    1.10  		push	esi
    1.11 @@ -42,6 +41,7 @@
    1.12  		psllq	mm0, 16			//$16,%%mm0
    1.13  		por		mm0, mm1		//%%mm1,%%mm0			// mm0 = vol|vol|vol|vol
    1.14  
    1.15 +		align	16
    1.16  mixloopS16:
    1.17  		movq	mm1, [esi]		//(%%esi),%%mm1\n" // mm1 = a|b|c|d
    1.18  		movq	mm2, mm1		//%%mm1,%%mm2\n" // mm2 = a|b|c|d
    1.19 @@ -98,7 +98,6 @@
    1.20  {
    1.21  	_asm
    1.22  	{
    1.23 -		align 16
    1.24  
    1.25  		push	edi
    1.26  		push	esi
    1.27 @@ -122,6 +121,7 @@
    1.28  		cmp		ebx, 0		//$0,%%ebx
    1.29  		je		endS8
    1.30  
    1.31 +		align 16
    1.32  mixloopS8:
    1.33  		pxor	mm2, mm2	//%%mm2,%%mm2		// mm2 = 0
    1.34  		movq	mm1, [esi]	//(%%esi),%%mm1	// mm1 = a|b|c|d|e|f|g|h