Skip to content

Commit

Permalink
Mixer: Visual C MMX asm code now aligns loops to 16 bytes.
Browse files Browse the repository at this point in the history
This patch came from Stephane Marchesin's codefork, but I don't know who
 wrote it originally.
  • Loading branch information
icculus committed Apr 17, 2005
1 parent 9058056 commit b439b7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/audio/SDL_mixer_MMX_VC.c
Expand Up @@ -19,7 +19,6 @@ void SDL_MixAudio_MMX_S16_VC(char* dst,char* src,unsigned int nSize,int volume)
{
__asm
{
align 16

push edi
push esi
Expand All @@ -42,6 +41,7 @@ void SDL_MixAudio_MMX_S16_VC(char* dst,char* src,unsigned int nSize,int volume)
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
Expand Down Expand Up @@ -98,7 +98,6 @@ void SDL_MixAudio_MMX_S8_VC(char* dst,char* src,unsigned int nSize,int volume)
{
_asm
{
align 16

push edi
push esi
Expand All @@ -122,6 +121,7 @@ void SDL_MixAudio_MMX_S8_VC(char* dst,char* src,unsigned int nSize,int volume)
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
Expand Down

0 comments on commit b439b7a

Please sign in to comment.