This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] aarch64: Optimized memset for Kunpeng processor.


Hi Xuelei,

+L(set127):
+       and     tmp1, dstin, 15
+       bic     dst, dstin, 15
+       stp     q0,q0, [dst, 16]
+       str     q0, [dst, 48]
+       stp     q0, q0, [dstend, -64]
+       stp     q0, q0, [dstend, -32]
+       ret

This won't work, when you align like that you need an extra unaligned store at the end.
The easiest solution is not to align and just keep the stp and str using dstin.

+2:     stp     q0, q0, [dst, 32]
+       stp     q0, q0, [dstend, -32]
+       ret

Both of these must use dstend since this is the 1-64 bytes for the tail part.

Wilco

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]