diff options
author | Chitti Babu Theegala <ctheegal@codeaurora.org> | 2017-01-12 18:37:18 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-01-12 18:37:18 +0000 |
commit | e360a1c8a389772718814d291978390e0b662805 (patch) | |
tree | cd89b3463369f42de2e49ab1cc1f148ade40adcd | |
parent | ca55343859fd1f636cf37fe65461450282558da6 (diff) | |
parent | b7ec7cac7d48f314e5a49d727f97e23c34f9a88c (diff) | |
download | bionic-nougat-mr2-dev.tar.gz |
Fix streaming(memcpy) performance on Cortex-A7android-7.1.2_r9android-7.1.2_r8android-7.1.2_r6android-7.1.2_r5android-7.1.2_r4android-7.1.2_r3android-7.1.2_r2android-7.1.2_r17android-7.1.2_r16android-7.1.2_r15android-7.1.2_r14android-7.1.2_r13android-7.1.2_r12android-7.1.2_r11android-7.1.2_r10android-7.1.2_r1nougat-mr2-dev
am: b7ec7cac7d
Change-Id: I4f832430c4c473d76934511c2cf4ec2fbe4d0bc3
-rw-r--r-- | libc/arch-arm/cortex-a7/bionic/memcpy_base.S | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/libc/arch-arm/cortex-a7/bionic/memcpy_base.S b/libc/arch-arm/cortex-a7/bionic/memcpy_base.S index 1d152bbc1..4ff982b0f 100644 --- a/libc/arch-arm/cortex-a7/bionic/memcpy_base.S +++ b/libc/arch-arm/cortex-a7/bionic/memcpy_base.S @@ -101,16 +101,38 @@ vld1.8 {d0}, [r1]! vst1.8 {d0}, [r0, :64]! -2: // Make sure we have at least 64 bytes to copy. +2: cmp r2, #256 + ble .L_copy_loop + + // Make sure DST is 64 BYTE aligned. + rsb r3, r0, #0 + ands r3, r3, #0x30 + beq .L_copy_loop + + sub r2, r2, r3 + cmp r3, #0x10 + beq .L_copy_16 + + vld1.8 {d0 - d3}, [r1]! + vst1.8 {d0 - d3}, [r0, :128]! + ands r3, r3, #0x10 + beq .L_copy_loop + +.L_copy_16: + vld1.8 {d0, d1}, [r1]! + vst1.8 {d0, d1}, [r0, :128]! + +.L_copy_loop: + // Make sure we have at least 64 bytes to copy. subs r2, r2, #64 blo 2f 1: // The main loop copies 64 bytes at a time. vld1.8 {d0 - d3}, [r1]! - vld1.8 {d4 - d7}, [r1]! + vst1.8 {d0 - d3}, [r0, :128]! pld [r1, #(64*4)] subs r2, r2, #64 - vst1.8 {d0 - d3}, [r0, :128]! + vld1.8 {d4 - d7}, [r1]! vst1.8 {d4 - d7}, [r0, :128]! bhs 1b |