outsl_ns.S 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* outsl_ns.S: output array of 4b words to device without 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_ns(unsigned int port, const void *buf, int n)
  16. #
  17. ###############################################################################
  18. .globl __outsl_ns
  19. .type __outsl_ns,@function
  20. __outsl_ns:
  21. andicc.p gr9,#3,gr0,icc0
  22. setlos #4,gr4
  23. bne icc0,#0,__outsl_ns_misaligned
  24. subi gr9,#4,gr9
  25. 0:
  26. ldu.p @(gr9,gr4),gr5
  27. subicc gr10,#1,gr10,icc0
  28. sti.p gr5,@(gr8,#0)
  29. bhi icc0,#2,0b
  30. membar
  31. bralr
  32. __outsl_ns_misaligned:
  33. subi.p gr9,#1,gr9
  34. setlos #1,gr4
  35. 0:
  36. ldubu @(gr9,gr4),gr5
  37. ldubu.p @(gr9,gr4),gr6
  38. slli gr5,#8,gr5
  39. ldubu.p @(gr9,gr4),gr7
  40. or gr5,gr6,gr5
  41. ldubu.p @(gr9,gr4),gr6
  42. slli gr5,#16,gr5
  43. slli.p gr7,#8,gr7
  44. or gr5,gr6,gr5
  45. subicc.p gr10,#1,gr10,icc0
  46. or gr5,gr7,gr5
  47. sti.p gr5,@(gr8,#0)
  48. bhi icc0,#2,0b
  49. membar
  50. bralr
  51. .size __outsl_ns, .-__outsl_ns