--- src/hermes/mmxp2_32.asm +++ src/hermes/mmxp2_32.asm @@ -27,12 +27,6 @@ GLOBAL _ConvertMMXpII32_16BGR565 ALIGN 8 ;; Constants for conversion routines - -mmx32_rgb888_mask dd 00ffffffh,00ffffffh - -mmx32_rgb565_b dd 000000f8h, 000000f8h -mmx32_rgb565_g dd 0000fc00h, 0000fc00h -mmx32_rgb565_r dd 00f80000h, 00f80000h mmx32_rgb555_rb dd 00f800f8h,00f800f8h mmx32_rgb555_g dd 0000f800h,0000f800h @@ -53,7 +40,10 @@ SECTION .text _ConvertMMXpII32_24RGB888: ; set up mm6 as the mask, mm7 as zero - movq mm6, qword [mmx32_rgb888_mask] + push dword 00ffffffh + push dword 00ffffffh + movq mm6, qword [esp] + add esp, byte 8 pxor mm7, mm7 mov edx, ecx ; save ecx @@ -115,9 +115,16 @@ _ConvertMMXpII32_24RGB888: _ConvertMMXpII32_16RGB565: ; set up masks - movq mm5, [mmx32_rgb565_b] - movq mm6, [mmx32_rgb565_g] - movq mm7, [mmx32_rgb565_r] + push dword 000000f8h + push dword 000000f8h + movq mm5, [esp] + push dword 0000fc00h + push dword 0000fc00h + movq mm6, [esp] + push dword 00f80000h + push dword 00f80000h + movq mm7, [esp] + add esp, byte 8*3 mov edx, ecx shr ecx, 2 @@ -181,9 +178,16 @@ _ConvertMMXpII32_16RGB565: _ConvertMMXpII32_16BGR565: - movq mm5, [mmx32_rgb565_r] - movq mm6, [mmx32_rgb565_g] - movq mm7, [mmx32_rgb565_b] + push dword 00f80000h + push dword 00f80000h + movq mm5, [esp] + push dword 0000fc00h + push dword 0000fc00h + movq mm6, [esp] + push dword 000000f8h + push dword 000000f8h + movq mm7, [esp] + add esp, byte 8*3 mov edx, ecx shr ecx, 2