1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
6 /* ARC700 has a relatively long pipeline and branch prediction, so we want
7 to avoid branches that are hard to predict. On the other hand, the
8 presence of the norm instruction makes it easier to operate on whole
11 #include <linux/linkage.h>
19 breq.d r2,r0,.Laligned
24 #ifdef __LITTLE_ENDIAN__
34 brne.d r12,0,.Lfound0_ua
39 #ifdef __LITTLE_ENDIAN__
41 breq r7,0,.Loop ; For speed, we want this branch to be unaligned.
42 b .Lfound_char ; Likewise this one.
45 breq r12,0,.Loop ; For speed, we want this branch to be unaligned.
51 ; /* We require this code address to be unaligned for speed... */
56 ; /* ... so that this code address is aligned, for itself and ... */
67 breq r7,0,.Loop /* ... so that this branch is unaligned. */
68 ; Found searched-for character. r0 has already advanced to next word.
69 #ifdef __LITTLE_ENDIAN__
70 /* We only need the information about the first matching byte
71 (i.e. the least significant matching byte) to be exact,
72 hence there is no problem with carry effects. */
99 #else /* BIG ENDIAN */