1
by brian
clean slate |
1 |
! Copyright (C) 2000, 2002 MySQL AB |
2 |
!
|
|
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 |
|
6 |
! of the License. |
|
7 |
!
|
|
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. |
|
12 |
!
|
|
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., 59 Temple Place - Suite 330, Boston, |
|
16 |
! MA 02111-1307, USA |
|
17 |
||
18 |
.file "strmake-sparc.s" |
|
19 |
.section ".text" |
|
20 |
.align 4 |
|
21 |
.global strmake |
|
22 |
.type strmake,#function |
|
23 |
.proc 0102 |
|
24 |
strmake:
|
|
25 |
orcc %g0,%o2,%g0 |
|
26 |
be,a .end |
|
27 |
nop
|
|
28 |
ldsb [%o1],%o3 |
|
29 |
.loop:
|
|
30 |
stb %o3,[%o0] |
|
31 |
cmp %o3,0 |
|
32 |
be .end ! Jump to end on end of string |
|
33 |
add %o1,1,%o1 |
|
34 |
add %o0,1,%o0 |
|
35 |
subcc %o2,1,%o2 |
|
36 |
bne,a .loop |
|
37 |
ldsb [%o1],%o3 |
|
38 |
.end:
|
|
39 |
retl
|
|
40 |
stb %g0,[%o0] |
|
41 |
.strmake_end:
|
|
42 |
.size strmake,.strmake_end-strmake |
|
43 |
.ident "Matt Wagner & Monty" |