mirror of
https://github.com/yawut/SDL.git
synced 2026-06-18 06:29:25 -05:00
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.
This commit is contained in:
parent
944dc01b12
commit
64e340141a
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user