summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorae112802 <none@none>2005-10-21 15:45:27 -0700
committerae112802 <none@none>2005-10-21 15:45:27 -0700
commite166b3354e65f05676f52924b7bf5e03290d437b (patch)
treedc316780c91fef39a825a67a20e0f86fe5b06956 /usr/src
parent6e61f8d99d8e469d8e64555cf5425fd6e53af073 (diff)
downloadillumos-gate-e166b3354e65f05676f52924b7bf5e03290d437b.tar.gz
6315997 MAXDB crashes during SAP SD runs with Niagara libc_psr
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/lib/libc_psr/sun4v_hwcap1/common/memcpy.s16
1 files changed, 14 insertions, 2 deletions
diff --git a/usr/src/lib/libc_psr/sun4v_hwcap1/common/memcpy.s b/usr/src/lib/libc_psr/sun4v_hwcap1/common/memcpy.s
index c9f81dbe4c..d5f63753ad 100644
--- a/usr/src/lib/libc_psr/sun4v_hwcap1/common/memcpy.s
+++ b/usr/src/lib/libc_psr/sun4v_hwcap1/common/memcpy.s
@@ -232,8 +232,20 @@ forcpy:
cmp %o2, 17 ! for small counts copy bytes
bleu,pt %ncc, .dbytecp
nop
- cmp %o2, 0x80 ! For lengths less than 128 bytes
- bgu,pn %ncc, .blkalgndst ! no block st/quad ld
+
+ cmp %o2, 0x80 ! For lengths less than 128 bytes no
+ bleu,pn %ncc, .no_blkcpy ! copy using ASI_BLK_INIT_ST_QUAD_LDD_P
+
+ /*
+ * Make sure that source and destination buffers are 64 bytes apart.
+ * If they are not, do not use ASI_BLK_INIT_ST_QUAD_LDD_P asi to copy
+ * the data.
+ */
+ subcc %o1, %o0, %o3
+ blu %ncc, .blkalgndst
+ cmp %o3, 0x40 ! if src - dst >= 0x40
+ bgeu,pt %ncc, .blkalgndst ! then use ASI_BLK_INIT_ST_QUAD_LDD_P
+.no_blkcpy:
andcc %o1, 3, %o5 ! is src word aligned
bz,pn %ncc, .aldst
cmp %o5, 2 ! is src half-word aligned