ashrdi3.S 584 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* $Id: ashrdi3.S,v 1.4 1999/11/19 04:11:49 davem Exp $
  2. * ashrdi3.S: The filesystem code creates all kinds of references to
  3. * this little routine on the sparc with gcc.
  4. *
  5. * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  6. */
  7. .text
  8. .align 4
  9. .globl __ashrdi3
  10. __ashrdi3:
  11. tst %o2
  12. be 3f
  13. or %g0, 32, %g2
  14. sub %g2, %o2, %g2
  15. tst %g2
  16. bg 1f
  17. sra %o0, %o2, %o4
  18. sra %o0, 31, %o4
  19. sub %g0, %g2, %g2
  20. ba 2f
  21. sra %o0, %g2, %o5
  22. 1:
  23. sll %o0, %g2, %g3
  24. srl %o1, %o2, %g2
  25. or %g2, %g3, %o5
  26. 2:
  27. or %g0, %o4, %o0
  28. or %g0, %o5, %o1
  29. 3:
  30. jmpl %o7 + 8, %g0
  31. nop