memcpy_64plus.S 972 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ; Port on Texas Instruments TMS320C6x architecture
  2. ;
  3. ; Copyright (C) 2006, 2009, 2010 Texas Instruments Incorporated
  4. ; Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
  5. ;
  6. ; This program is free software; you can redistribute it and/or modify
  7. ; it under the terms of the GNU General Public License version 2 as
  8. ; published by the Free Software Foundation.
  9. ;
  10. #include <linux/linkage.h>
  11. .text
  12. ENTRY(memcpy)
  13. AND .L1 0x1,A6,A0
  14. || AND .S1 0x2,A6,A1
  15. || AND .L2X 0x4,A6,B0
  16. || MV .D1 A4,A3
  17. || MVC .S2 ILC,B2
  18. [A0] LDB .D2T1 *B4++,A5
  19. [A1] LDB .D2T1 *B4++,A7
  20. [A1] LDB .D2T1 *B4++,A8
  21. [B0] LDNW .D2T1 *B4++,A9
  22. || SHRU .S2X A6,0x3,B1
  23. [!B1] BNOP .S2 B3,1
  24. [A0] STB .D1T1 A5,*A3++
  25. ||[B1] MVC .S2 B1,ILC
  26. [A1] STB .D1T1 A7,*A3++
  27. [A1] STB .D1T1 A8,*A3++
  28. [B0] STNW .D1T1 A9,*A3++ ; return when len < 8
  29. SPLOOP 2
  30. LDNDW .D2T1 *B4++,A9:A8
  31. NOP 3
  32. NOP
  33. SPKERNEL 0,0
  34. || STNDW .D1T1 A9:A8,*A3++
  35. BNOP .S2 B3,4
  36. MVC .S2 B2,ILC
  37. ENDPROC(memcpy)