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 1049 b4117292e587
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
--- a/src/audio/SDL_mixer_MMX_VC.c	Sun Apr 17 10:23:58 2005 +0000
+++ b/src/audio/SDL_mixer_MMX_VC.c	Sun Apr 17 10:27:00 2005 +0000
@@ -19,7 +19,6 @@
 {
 	__asm
 	{
-		align	16
 
 		push	edi
 		push	esi
@@ -42,6 +41,7 @@
 		psllq	mm0, 16			//$16,%%mm0
 		por		mm0, mm1		//%%mm1,%%mm0			// mm0 = vol|vol|vol|vol
 
+		align	16
 mixloopS16:
 		movq	mm1, [esi]		//(%%esi),%%mm1\n" // mm1 = a|b|c|d
 		movq	mm2, mm1		//%%mm1,%%mm2\n" // mm2 = a|b|c|d
@@ -98,7 +98,6 @@
 {
 	_asm
 	{
-		align 16
 
 		push	edi
 		push	esi
@@ -122,6 +121,7 @@
 		cmp		ebx, 0		//$0,%%ebx
 		je		endS8
 
+		align 16
 mixloopS8:
 		pxor	mm2, mm2	//%%mm2,%%mm2		// mm2 = 0
 		movq	mm1, [esi]	//(%%esi),%%mm1	// mm1 = a|b|c|d|e|f|g|h