strcpy.S 531 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright 2005-2010 Analog Devices Inc.
  3. *
  4. * Licensed under the Clear BSD license or the GPL-2 (or later)
  5. */
  6. #include <linux/linkage.h>
  7. /* void *strcpy(char *dest, const char *src);
  8. * R0 = address (dest)
  9. * R1 = address (src)
  10. *
  11. * Returns a pointer to the destination string dest
  12. */
  13. #ifdef CONFIG_STRCPY_L1
  14. .section .l1.text
  15. #else
  16. .text
  17. #endif
  18. .align 2
  19. ENTRY(_strcpy)
  20. P0 = R0 ; /* dst*/
  21. P1 = R1 ; /* src*/
  22. 1:
  23. R1 = B [P1++] (Z);
  24. B [P0++] = R1;
  25. CC = R1;
  26. if cc jump 1b (bp);
  27. RTS;
  28. ENDPROC(_strcpy)