svn commit: r185006 - head/sys/sparc64/sparc64
Marius Strobl
marius at FreeBSD.org
Sun Nov 16 11:28:56 PST 2008
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.
More information about the svn-src-head
mailing list