1 ! Copyright
(c
) 2000, 2002, 2006 MySQL AB
3 ! This library is free software; you can redistribute it
and/or
4 ! modify it under the terms of the GNU Library General Public
5 ! License as published by the Free Software Foundation; version
2
8 ! This library is distributed in the hope that it will
be useful
,
9 ! but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ! MERCHANTABILITY
or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU
11 ! Library General Public License for more details.
13 ! You should have received
a copy of the GNU Library General Public
14 ! License along with this library; if
not, write to the Free
15 ! Software Foundation
, Inc.
, 51 Franklin Street
, Fifth Floor
, Boston
,
18 .file "strstr-sparc.s"
22 .type strstr,#function
26 !char
*strstr
(register const char
*str
,const char
*search
)
28 ! register char
*i
,*j;
30 ! while
(*str
!= '\0') {
31 ! if
(*str+
+ == *search
) {
32 ! i
=(char
*) str; j
=(char
*) search+
1;
34 ldsb
[%o1
],%o2
! o2
= First char of search
36 ldsb
[%o0
],%o4
! o4
= First char of rest of str
38 be .abort ! Found end null ;
46 ! if
(*i+
+ != *j+
+) goto skipp;
49 add %o1
,1,%o4
! o4
= search+
1
50 ldsb
[%o0
],%o5
! o5
= [current_str+
1]
71 .size strstr,.strstr_end-strstr
72 .ident "Matt Wagner & Monty"