2 * Copyright (C) 2014-15 Synopsys, Inc. (www.synopsys.com)
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
9 #include <linux/linkage.h>
11 #undef PREALLOC_NOT_AVAIL
13 #ifdef PREALLOC_NOT_AVAIL
14 #define PREWRITE(A,B) prefetchw [(A),(B)]
16 #define PREWRITE(A,B) prealloc [(A),(B)]
20 prefetchw [r0] ; Prefetch the write location
24 mov r3, r0 ; don't clobber ret val
27 brls.d.nt r2, 8, .Lsmallchunk
32 lpnz @.Laligndestination
38 ;;; Destination is aligned
52 ;;; Convert len to Dwords, unfold x8
53 lsr.f lp_count, lp_count, 6
56 PREWRITE(r3, 64) ;Prefetch the next write location
67 lsr.f lp_count, r2, 5 ;Last remaining max 124 bytes
70 prefetchw [r3, 32] ;Prefetch the next write location
77 and.f lp_count, r2, 0x1F ;Last remaining 31 bytes
89 ; adjust bzero args to memset args
91 b.d memset ;tail call so need to tinker with blink