/*1* Copyright 2005-2010 Analog Devices Inc.2*3* Licensed under the ADI BSD license or the GPL-2 (or later)4*/56#include <linux/linkage.h>78/* void *strcmp(char *s1, const char *s2);9* R0 = address (s1)10* R1 = address (s2)11*12* Returns an integer less than, equal to, or greater than zero if s113* (or the first n bytes thereof) is found, respectively, to be less14* than, to match, or be greater than s2.15*/1617#ifdef CONFIG_STRCMP_L118.section .l1.text19#else20.text21#endif2223.align 22425ENTRY(_strcmp)26P0 = R0 ; /* s1 */27P1 = R1 ; /* s2 */28291:30R0 = B[P0++] (Z); /* get *s1 */31R1 = B[P1++] (Z); /* get *s2 */32CC = R0 == R1; /* compare a byte */33if ! cc jump 2f; /* not equal, break out */34CC = R0; /* at end of s1? */35if cc jump 1b (bp); /* no, keep going */36jump.s 3f; /* strings are equal */372:38R0 = R0 - R1; /* *s1 - *s2 */393:40RTS;4142ENDPROC(_strcmp)434445