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
14 prefetchw [r0] ; Prefetch the write location
18 mov r3, r0 ; don't clobber ret val
21 brls.d.nt r2, 8, .Lsmallchunk
26 lpnz @.Laligndestination
32 ;;; Destination is aligned
46 ;;; Convert len to Dwords, unfold x8
47 lsr.f lp_count, lp_count, 6
51 #ifdef PREALLOC_NOT_AVAIL
52 prefetchw [r3, 64] ;Prefetch the next write location
56 #ifdef CONFIG_ARC_HAS_LL64
85 lsr.f lp_count, r2, 5 ;Last remaining max 124 bytes
88 prefetchw [r3, 32] ;Prefetch the next write location
89 #ifdef CONFIG_ARC_HAS_LL64
106 and.f lp_count, r2, 0x1F ;Last remaining 31 bytes
118 ; adjust bzero args to memset args
120 b.d memset ;tail call so need to tinker with blink