Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F171066394
D28776.id84209.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
840 B
Referenced Files
None
Subscribers
None
D28776.id84209.diff
View Options
Index: lib/libc/powerpc64/string/bcopy.S
===================================================================
--- lib/libc/powerpc64/string/bcopy.S
+++ lib/libc/powerpc64/string/bcopy.S
@@ -34,6 +34,11 @@
#define BLOCK_SIZE (1 << BLOCK_SIZE_BITS)
#define BLOCK_SIZE_MASK (BLOCK_SIZE - 1)
+/* Minimum 8 byte alignment, to avoid cache-inhibited alignment faults.*/
+#ifndef ALIGN_MASK
+#define ALIGN_MASK 0x7
+#endif
+
#define MULTI_PHASE_THRESHOLD 512
#ifndef FN_NAME
@@ -67,8 +72,14 @@
#endif
cmpldi %r5, MULTI_PHASE_THRESHOLD
- bge .Lmulti_phase
-
+ blt .Lavoid_vsx
+ /*check if aligned. if aligned, go to multi_phase*/
+ andi. %r8, %r3, ALIGN_MASK
+ andi. %r7, %r4, ALIGN_MASK
+ cmpd %r8, %r7
+ beq .Lmulti_phase
+
+.Lavoid_vsx:
/* align src */
cmpd %r4, %r3 /* forward or backward copy? */
blt .Lbackward_align
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 9, 12:24 PM (5 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38586413
Default Alt Text
D28776.id84209.diff (840 B)
Attached To
Mode
D28776: powerpc/powerpc64: Enforce natural alignment in bcopy
Attached
Detach File
Event Timeline
Log In to Comment