copy_page.S 560 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (C) 2004-2006 Atmel Corporation
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #include <linux/linkage.h>
  9. #include <asm/page.h>
  10. /*
  11. * copy_page
  12. *
  13. * r12 to (P1 address)
  14. * r11 from (P1 address)
  15. * r8-r10 scratch
  16. */
  17. .text
  18. .global copy_page
  19. copy_page:
  20. sub r10, r11, -(1 << PAGE_SHIFT)
  21. /* pref r11[0] */
  22. 1: /* pref r11[8] */
  23. ld.d r8, r11++
  24. st.d r12++, r8
  25. cp r11, r10
  26. brlo 1b
  27. mov pc, lr