diff src/audio/SDL_mixer_MMX_VC.c @ 1049:b4117292e587

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.
author Ryan C. Gordon <icculus@icculus.org>
date Sun, 17 Apr 2005 10:27:00 +0000
parents 72ef7ce609ef
children ef03e8789d59
line wrap: on
line diff
--- 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