3 * Copyright (C) 2014-15 Synopsys, Inc. (www.synopsys.com)
5 * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
11 #ifdef DONT_USE_PREALLOC
12 #define PREWRITE(A,B) prefetchw [(A),(B)]
14 #define PREWRITE(A,B) prealloc [(A),(B)]
18 prefetchw [r0] ; Prefetch the write location
22 mov r3, r0 ; don't clobber ret val
25 brls.d.nt r2, 8, .Lsmallchunk
30 lpnz @.Laligndestination
36 ;;; Destination is aligned
50 ;;; Convert len to Dwords, unfold x8
51 lsr.f lp_count, lp_count, 6
54 PREWRITE(r3, 64) ;Prefetch the next write location
55 #if defined(__LL64__) || defined(__ARC_LL64__)
84 lsr.f lp_count, r2, 5 ;Last remaining max 124 bytes
87 prefetchw [r3, 32] ;Prefetch the next write location
88 #if defined(__LL64__) || defined(__ARC_LL64__)
105 and.f lp_count, r2, 0x1F ;Last remaining 31 bytes
115 libc_hidden_def(memset)