[PATCH][SPARC] missing membar in niagara2_memcpy
Jose E. Marchesi
jose.marchesi@oracle.com
Thu May 15 16:55:00 GMT 2014
Hi.
The following patch prevents stores made before calling memcpy to
overlap with the block stores in niagara2_memcpy.
Tested on an Athena machine (sparc64x) running sparc64-*-linux-gnu.
No new warnings triggered by the patch.
No regressions detected.
PS: virtually the same code lives in the kernel in
linux/arch/sparc/lib/NG2memcpy.S. Probably that file shall be
updated too...
2014-05-15 Jose E. Marchesi <jose.marchesi@oracle.com>
* sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S: Add missing
membar to avoid block loads/stores to overlap previous stores.
diff --git a/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S b/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S
index b43a9e3..a1a9642 100644
--- a/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S
+++ b/sysdeps/sparc/sparc64/multiarch/memcpy-niagara2.S
@@ -211,6 +211,7 @@ ENTRY(__memcpy_niagara2)
*/
VISEntryHalf
+ membar #Sync
alignaddr %o1, %g0, %g0
add %o1, (64 - 1), %o4
More information about the Libc-alpha
mailing list