strcpy.S 443 B

12345678910111213141516171819202122232425262728
  1. /* strcpy implementation for SUPERH
  2. *
  3. * Copyright (C) 2009 STMicroelectronics Ltd.
  4. *
  5. * Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
  6. *
  7. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  8. */
  9. /*
  10. char *strcpy(char *dest, const char *src);
  11. */
  12. #include <sysdep.h>
  13. ENTRY(strcpy)
  14. mov r4,r2
  15. 1:
  16. mov.b @r5+,r1
  17. tst r1,r1
  18. mov.b r1,@r2
  19. bf/s 1b
  20. add #1,r2
  21. rts
  22. mov r4,r0
  23. END(strcpy)
  24. libc_hidden_def (strcpy)