diff options
author | Måns Rullgård <mans@mansr.com> | 2008-11-20 09:21:52 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2008-11-20 09:21:52 +0000 |
commit | c260b59603ee4bef42e0f2c4e1c5ec9b76f5e99b (patch) | |
tree | 1f924af8a049a028c5c0439900a155c0ba376b8d /libavcodec | |
parent | 1a9e9a2fbd9c6e31d6bb391ddbaa181961f000fd (diff) | |
download | ffmpeg-c260b59603ee4bef42e0f2c4e1c5ec9b76f5e99b.tar.gz |
SH4: fix memzero_align8()
Originally committed as revision 15888 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/sh4/dsputil_sh4.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libavcodec/sh4/dsputil_sh4.c b/libavcodec/sh4/dsputil_sh4.c index a51f400ed4..c8d0eae931 100644 --- a/libavcodec/sh4/dsputil_sh4.c +++ b/libavcodec/sh4/dsputil_sh4.c @@ -22,13 +22,15 @@ #include "libavcodec/avcodec.h" #include "libavcodec/dsputil.h" +#include "sh4.h" static void memzero_align8(void *dst,size_t size) { - __asm__( -#if defined(__SH4__) - " fschg\n" //single float mode -#endif + int fpscr; + fp_single_enter(fpscr); + dst = (char *)dst + size; + size /= 32; + __asm__ volatile ( " fldi0 fr0\n" " fldi0 fr1\n" " fschg\n" // double @@ -39,10 +41,9 @@ static void memzero_align8(void *dst,size_t size) " fmov dr0,@-%0\n" " bf.s 1b\n" " fmov dr0,@-%0\n" -#if defined(__SH4_SINGLE__) || defined(__SH4_SINGLE_ONLY__) " fschg" //back to single -#endif - : : "r"((char*)dst+size),"r"(size/32): "memory" ); + : "+r"(dst),"+r"(size) :: "memory" ); + fp_single_leave(fpscr); } static void clear_blocks_sh4(DCTELEM *blocks) |