2 * Copyright (C) 2004, 2007-2010, 2011-2014 Synopsys, Inc. All rights reserved.
4 * SPDX-License-Identifier: GPL-2.0+
8 * ARC700 has a relatively long pipeline and branch prediction, so we want
9 * to avoid branches that are hard to predict. On the other hand, the
10 * presence of the norm instruction makes it easier to operate on whole
22 breq.d %r2, %r0, .Laligned
27 #ifdef __LITTLE_ENDIAN__
29 #else /* __BIG_ENDIAN__ */
31 #endif /* _ENDIAN__ */
37 brne.d %r12, 0, .Lfound0_ua
42 #ifdef __LITTLE_ENDIAN__
44 /* For speed, we want this branch to be unaligned. */
46 /* Likewise this one */
48 #else /* __BIG_ENDIAN__ */
50 /* For speed, we want this branch to be unaligned. */
56 #endif /* _ENDIAN__ */
57 /* We require this code address to be unaligned for speed... */
62 /* ... so that this code address is aligned, for itself and ... */
67 brne.d %r12, 0, .Lfound0
75 *... so that this branch is unaligned.
76 * Found searched-for character.
77 * r0 has already advanced to next word.
79 #ifdef __LITTLE_ENDIAN__
81 * We only need the information about the first matching byte
82 * (i.e. the least significant matching byte) to be exact,
83 * hence there is no problem with carry effects.
111 #else /* __BIG_ENDIAN__ */
128 bic_s %r12, %r12, %r2
141 #endif /* _ENDIAN__ */