2 * Copyright (C) 2004, 2007-2010, 2011-2012 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 /* ARC700 has a relatively long pipeline and branch prediction, so we want
10 to avoid branches that are hard to predict. On the other hand, the
11 presence of the norm instruction makes it easier to operate on whole
14 #include <linux/linkage.h>
22 breq.d r2,r0,.Laligned
27 #ifdef __LITTLE_ENDIAN__
37 brne.d r12,0,.Lfound0_ua
42 #ifdef __LITTLE_ENDIAN__
44 breq r7,0,.Loop ; For speed, we want this branch to be unaligned.
45 b .Lfound_char ; Likewise this one.
48 breq r12,0,.Loop ; For speed, we want this branch to be unaligned.
54 ; /* We require this code address to be unaligned for speed... */
59 ; /* ... so that this code address is aligned, for itself and ... */
70 breq r7,0,.Loop /* ... so that this branch is unaligned. */
71 ; Found searched-for character. r0 has already advanced to next word.
72 #ifdef __LITTLE_ENDIAN__
73 /* We only need the information about the first matching byte
74 (i.e. the least significant matching byte) to be exact,
75 hence there is no problem with carry effects. */
102 #else /* BIG ENDIAN */