io-readsl.S 542 B

123456789101112131415161718192021222324
  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. .global __raw_readsl
  9. .type __raw_readsl,@function
  10. __raw_readsl:
  11. cp.w r10, 0
  12. reteq r12
  13. /*
  14. * If r11 isn't properly aligned, we might get an exception on
  15. * some implementations. But there's not much we can do about it.
  16. */
  17. 1: ld.w r8, r12[0]
  18. sub r10, 1
  19. st.w r11++, r8
  20. brne 1b
  21. retal r12