ashrdi3.S 644 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * ashrdi3.S: The filesystem code creates all kinds of references to
  4. * this little routine on the sparc with gcc.
  5. *
  6. * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
  7. */
  8. #include <linux/linkage.h>
  9. #include <asm/export.h>
  10. .text
  11. ENTRY(__ashrdi3)
  12. tst %o2
  13. be 3f
  14. or %g0, 32, %g2
  15. sub %g2, %o2, %g2
  16. tst %g2
  17. bg 1f
  18. sra %o0, %o2, %o4
  19. sra %o0, 31, %o4
  20. sub %g0, %g2, %g2
  21. ba 2f
  22. sra %o0, %g2, %o5
  23. 1:
  24. sll %o0, %g2, %g3
  25. srl %o1, %o2, %g2
  26. or %g2, %g3, %o5
  27. 2:
  28. or %g0, %o4, %o0
  29. or %g0, %o5, %o1
  30. 3:
  31. jmpl %o7 + 8, %g0
  32. nop
  33. ENDPROC(__ashrdi3)
  34. EXPORT_SYMBOL(__ashrdi3)