From: Loren Merritt Date: Fri, 4 Apr 2008 07:07:40 +0000 (-0600) Subject: sfence after nontemporal stores X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=afbcfdc2d2b74f318eb1cb1db7a6a711d4d115e5;p=libx264 sfence after nontemporal stores --- diff --git a/common/x86/mc-a2.asm b/common/x86/mc-a2.asm index cb853a09..3b04b70c 100644 --- a/common/x86/mc-a2.asm +++ b/common/x86/mc-a2.asm @@ -314,6 +314,10 @@ HPEL_C sse2 HPEL_C ssse3 %endif +cglobal x264_sfence + sfence + ret + ;----------------------------------------------------------------------------- @@ -381,6 +385,7 @@ cglobal x264_plane_copy_mmxext, 6,7 add r0, r1 dec r5d jg .loopy + sfence emms RET diff --git a/common/x86/mc-c.c b/common/x86/mc-c.c index 5f999376..7401555a 100644 --- a/common/x86/mc-c.c +++ b/common/x86/mc-c.c @@ -167,6 +167,7 @@ GET_REF(sse2) void x264_hpel_filter_v_##cpuv( uint8_t *dst, uint8_t *src, int16_t *buf, int stride, int width);\ void x264_hpel_filter_c_##cpuc( uint8_t *dst, int16_t *buf, int width );\ void x264_hpel_filter_h_##cpuh( uint8_t *dst, uint8_t *src, int width );\ +void x264_sfence( void );\ void x264_hpel_filter_##cpu( uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, uint8_t *src,\ int stride, int width, int height )\ {\ @@ -187,6 +188,7 @@ void x264_hpel_filter_##cpu( uint8_t *dsth, uint8_t *dstv, uint8_t *dstc, uint8_ dstc += stride;\ src += stride;\ }\ + x264_sfence();\ x264_free(buf);\ }