2 * Copyright 2005-2010 Analog Devices Inc.
4 * Licensed under the Clear BSD license or the GPL-2 (or later)
7 #include <linux/linkage.h>
9 /* void *strcmp(char *s1, const char *s2);
13 * Returns an integer less than, equal to, or greater than zero if s1
14 * (or the first n bytes thereof) is found, respectively, to be less
15 * than, to match, or be greater than s2.
18 #ifdef CONFIG_STRCMP_L1
31 R0 = B[P0++] (Z); /* get *s1 */
32 R1 = B[P1++] (Z); /* get *s2 */
33 CC = R0 == R1; /* compare a byte */
34 if ! cc jump 2f; /* not equal, break out */
35 CC = R0; /* at end of s1? */
36 if cc jump 1b (bp); /* no, keep going */
37 jump.s 3f; /* strings are equal */
39 R0 = R0 - R1; /* *s1 - *s2 */