Date: Sun, 16 Nov 2008 19:28:55 +0000 (UTC) From: Marius Strobl <marius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r185006 - head/sys/sparc64/sparc64 Message-ID: <200811161928.mAGJStI1062777@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marius Date: Sun Nov 16 19:28:55 2008 New Revision: 185006 URL: http://svn.freebsd.org/changeset/base/185006 Log: Micro-optimize spitfire_block_{copy,zero}(): - Predict the loop as taken as it's more likely that there's still data to copy and memory to zero respectively. - Don't waste the delay slot. Modified: head/sys/sparc64/sparc64/support.S Modified: head/sys/sparc64/sparc64/support.S ============================================================================== --- head/sys/sparc64/sparc64/support.S Sun Nov 16 19:20:29 2008 (r185005) +++ head/sys/sparc64/sparc64/support.S Sun Nov 16 19:28:55 2008 (r185006) @@ -647,7 +647,7 @@ ENTRY(spitfire_block_copy) stda %f32, [%o1] %asi add %o0, 64, %o0 sub %o2, 64, %o2 - ba %xcc, 2b + ba,pt %xcc, 2b add %o1, 64, %o1 3: membar #Sync @@ -655,10 +655,8 @@ ENTRY(spitfire_block_copy) stda %f16, [%o1] %asi membar #Sync - wr %g0, 0, %fprs - retl - nop + wr %g0, 0, %fprs END(spitfire_block_copy) /* @@ -704,14 +702,12 @@ ENTRY(spitfire_block_zero) stda %f0, [%o0 + 128] %asi stda %f0, [%o0 + 192] %asi sub %o1, 256, %o1 - brnz %o1, 1b + brnz,pt %o1, 1b add %o0, 256, %o0 membar #Sync - wr %g0, 0, %fprs - retl - nop + wr %g0, 0, %fprs END(spitfire_block_zero) .globl fpu_fault_end @@ -806,7 +802,6 @@ ENTRY(bintr) ENTRY(eintr) nop - /* * XXX including sys/gmon.h in genassym.c is not possible due to uintfptr_t * badness.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811161928.mAGJStI1062777>