outsl_sw.S 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* outsl_ns.S: output array of 4b words to device with byte swapping
  2. *
  3. * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved.
  4. * Written by David Howells (dhowells@redhat.com)
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License
  8. * as published by the Free Software Foundation; either version
  9. * 2 of the License, or (at your option) any later version.
  10. */
  11. .text
  12. .p2align 4
  13. ###############################################################################
  14. #
  15. # void __outsl_sw(unsigned int port, const void *buf, int n)
  16. #
  17. ###############################################################################
  18. .globl __outsl_sw
  19. .type __outsl_sw,@function
  20. __outsl_sw:
  21. subi.p gr9,#1,gr9
  22. setlos #1,gr4
  23. 0:
  24. ldubu @(gr9,gr4),gr5
  25. ldubu @(gr9,gr4),gr6
  26. slli gr6,#8,gr6
  27. ldubu.p @(gr9,gr4),gr7
  28. or gr5,gr6,gr5
  29. ldubu.p @(gr9,gr4),gr6
  30. slli gr7,#16,gr7
  31. slli.p gr6,#24,gr6
  32. or gr5,gr7,gr5
  33. subicc.p gr10,#1,gr10,icc0
  34. or gr5,gr6,gr5
  35. sti.p gr5,@(gr8,#0)
  36. bhi icc0,#2,0b
  37. membar
  38. bralr
  39. .size __outsl_sw, .-__outsl_sw