Mercurial > libavcodec.hg
changeset 1143:a4facfd78935 libavcodec
clear_blocks_mmi() optimization by BroadQ (and patch by Leon van Stuivenberg <leonvs at iae dot nl>)
author | michaelni |
---|---|
date | Tue, 18 Mar 2003 20:08:57 +0000 |
parents | 592fb56e562f |
children | 21c85c4ab2f0 |
files | ps2/dsputil_mmi.c |
diffstat | 1 files changed, 15 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/ps2/dsputil_mmi.c Tue Mar 18 17:22:23 2003 +0000 +++ b/ps2/dsputil_mmi.c Tue Mar 18 20:08:57 2003 +0000 @@ -17,6 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * MMI optimization by Leon van Stuivenberg <leonvs@iae.nl> + * clear_blocks_mmi() by BroadQ */ #include "../dsputil.h" @@ -28,19 +29,21 @@ static void clear_blocks_mmi(DCTELEM * blocks) { - int i; - for (i = 0; i < 6; i++) { asm volatile( - "sq $0, 0(%0) \n\t" - "sq $0, 16(%0) \n\t" - "sq $0, 32(%0) \n\t" - "sq $0, 48(%0) \n\t" - "sq $0, 64(%0) \n\t" - "sq $0, 80(%0) \n\t" - "sq $0, 96(%0) \n\t" - "sq $0, 112(%0) \n\t" :: "r" (blocks) : "memory" ); - blocks += 64; - } + ".set noreorder \n" + "addiu $9, %0, 768 \n" + "nop \n" + "1: \n" + "sq $0, 0(%0) \n" + "move $8, %0 \n" + "addi %0, %0, 64 \n" + "sq $0, 16($8) \n" + "slt $10, %0, $9 \n" + "sq $0, 32($8) \n" + "bnez $10, 1b \n" + "sq $0, 48($8) \n" + ".set reorder \n" + : "+r" (blocks) :: "$8", "$9", "memory" ); }