summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2008-11-16 19:28:55 +0000
committermarius <marius@FreeBSD.org>2008-11-16 19:28:55 +0000
commited798111a5efa5c50eccfacde74756b43d858128 (patch)
tree2fa192ea81750a86a8fa5c6ecc964042d89cd84a /sys/sparc64
parent39fb5ed1d3fd48f48e6c2a161f9058e1cde867a7 (diff)
downloadFreeBSD-src-ed798111a5efa5c50eccfacde74756b43d858128.zip
FreeBSD-src-ed798111a5efa5c50eccfacde74756b43d858128.tar.gz
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.
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/support.S13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/sparc64/sparc64/support.S b/sys/sparc64/sparc64/support.S
index 5013dc6..a3f6501 100644
--- a/sys/sparc64/sparc64/support.S
+++ b/sys/sparc64/sparc64/support.S
@@ -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.
OpenPOWER on IntegriCloud