Lines Matching refs:s2
29 /* strcmp(s1, s2)
31 * Compare strings: s1>s2: >0 s1==s2: 0 s1<s2: <0
37 * strcmp(s1, s2)
39 * register const char *s2;
42 * if(s1 == s2)
44 * while(*s1 == *s2++)
47 * return(*s1 - s2[-1]);
56 ! align s2, this also happens and then the compare begins. Otherwise,
63 subcc %o0, %o1, %o2 ! s1 == s2 ?
74 ldub [%o1], %g1 ! s2[]
75 subcc %o0, %g1, %o0 ! s1[] != s2[] ?
81 inc %o1 ! s1++, s2++
84 andcc %o1, 7, %o3 ! s2 dword aligned ?
92 ldx [%o1], %o0 ! new lower dword in s2
95 sllx %o0, %g5, %g1 ! partial unaligned word from s2
104 bz,a,pt %xcc, .doload ! no null byte in previous word from s2
105 ldx [%o1+8], %o0 ! next aligned word in s2
107 srlx %o0, %g4, %o3 ! bytes from aligned word from s2
108 or %g1, %o3, %g1 ! merge to get unaligned word from s2
110 cmp %o3, %g1 ! *s1 != *s2 ?
112 add %o1, 8, %o1 ! s1+=8, s2+=8
117 sllx %o0, %g5, %g1 ! partial unaligned word from s2
130 ldx [%o1], %g1 ! load word from s2
152 srlx %g1, %o4, %o2 ! first byte of mismatching word in s2
155 subcc %o1, %o2, %o0 ! *s1-*s2
162 srlx %g1, %o4, %o2 ! first byte of mismatching word in s2