summaryrefslogtreecommitdiffstats
path: root/libc/arch-arm/bionic/memcpy.S
diff options
context:
space:
mode:
Diffstat (limited to 'libc/arch-arm/bionic/memcpy.S')
-rw-r--r--libc/arch-arm/bionic/memcpy.S21
1 files changed, 12 insertions, 9 deletions
diff --git a/libc/arch-arm/bionic/memcpy.S b/libc/arch-arm/bionic/memcpy.S
index f6e4a7d..fcb58cd 100644
--- a/libc/arch-arm/bionic/memcpy.S
+++ b/libc/arch-arm/bionic/memcpy.S
@@ -25,6 +25,9 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+
+#include <machine/cpu-features.h>
+
.text
.global memcpy
@@ -52,9 +55,9 @@ memcpy:
// preload the destination because we'll align it to a cache line
// with small writes. Also start the source "pump".
- pld [r0, #0]
- pld [r1, #0]
- pld [r1, #32]
+ PLD (r0, #0)
+ PLD (r1, #0)
+ PLD (r1, #32)
/* it simplifies things to take care of len<4 early */
cmp r2, #4
@@ -141,8 +144,8 @@ cached_aligned32:
bic r12, r1, #0x1F
add r12, r12, #64
-1: ldmia r1!, { r4-r11 }
- pld [r12, #64]
+1: ldmia r1!, { r4-r11 }
+ PLD (r12, #64)
subs r2, r2, #32
// NOTE: if r12 is more than 64 ahead of r1, the following ldrhi
@@ -263,8 +266,8 @@ loop16:
ldr r12, [r1], #4
1: mov r4, r12
ldmia r1!, { r5,r6,r7, r8,r9,r10,r11}
- pld [r1, #64]
- subs r2, r2, #32
+ PLD (r1, #64)
+ subs r2, r2, #32
ldrhs r12, [r1], #4
orr r3, r3, r4, lsl #16
mov r4, r4, lsr #16
@@ -290,7 +293,7 @@ loop8:
ldr r12, [r1], #4
1: mov r4, r12
ldmia r1!, { r5,r6,r7, r8,r9,r10,r11}
- pld [r1, #64]
+ PLD (r1, #64)
subs r2, r2, #32
ldrhs r12, [r1], #4
orr r3, r3, r4, lsl #24
@@ -317,7 +320,7 @@ loop24:
ldr r12, [r1], #4
1: mov r4, r12
ldmia r1!, { r5,r6,r7, r8,r9,r10,r11}
- pld [r1, #64]
+ PLD (r1, #64)
subs r2, r2, #32
ldrhs r12, [r1], #4
orr r3, r3, r4, lsl #8