Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Mar 2009 15:30:45 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r190066 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb sparc64/sparc64
Message-ID:  <200903191530.n2JFUjlj066724@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Thu Mar 19 15:30:45 2009
New Revision: 190066
URL: http://svn.freebsd.org/changeset/base/190066

Log:
  MFC: r185006
  
  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:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/sparc64/sparc64/support.S

Modified: stable/7/sys/sparc64/sparc64/support.S
==============================================================================
--- stable/7/sys/sparc64/sparc64/support.S	Thu Mar 19 15:21:04 2009	(r190065)
+++ stable/7/sys/sparc64/sparc64/support.S	Thu Mar 19 15:30:45 2009	(r190066)
@@ -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?200903191530.n2JFUjlj066724>