You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.1 KiB

26 years ago
26 years ago
26 years ago
26 years ago
26 years ago
  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. .file "strmake-sparc.s"
  18. .section ".text"
  19. .align 4
  20. .global strmake
  21. .type strmake,#function
  22. .proc 0102
  23. strmake:
  24. orcc %g0,%o2,%g0
  25. be,a .end
  26. nop
  27. ldsb [%o1],%o3
  28. .loop:
  29. stb %o3,[%o0]
  30. cmp %o3,0
  31. be .end ! Jump to end on end of string
  32. add %o1,1,%o1
  33. add %o0,1,%o0
  34. subcc %o2,1,%o2
  35. bne,a .loop
  36. ldsb [%o1],%o3
  37. .end:
  38. retl
  39. stb %g0,[%o0]
  40. .strmake_end:
  41. .size strmake,.strmake_end-strmake
  42. .ident "Matt Wagner & Monty"