ashldi3.S 563 B

123456789101112131415161718192021222324252627282930313233343536
  1. /* $Id: ashldi3.S,v 1.1 1998/04/06 16:09:28 jj Exp $
  2. * ashldi3.S: Math-emu code creates all kinds of references to
  3. * this little routine on the sparc with gcc.
  4. *
  5. * Copyright (C) 1998 Jakub Jelinek(jj@ultra.linux.cz)
  6. */
  7. #include <asm/cprefix.h>
  8. .globl C_LABEL(__ashldi3)
  9. C_LABEL(__ashldi3):
  10. tst %o2
  11. be 3f
  12. mov 32, %g2
  13. sub %g2, %o2, %g2
  14. tst %g2
  15. bg 1f
  16. srl %o1, %g2, %g3
  17. clr %o5
  18. neg %g2
  19. ba 2f
  20. sll %o1, %g2, %o4
  21. 1:
  22. sll %o1, %o2, %o5
  23. srl %o0, %o2, %g2
  24. or %g2, %g3, %o4
  25. 2:
  26. mov %o4, %o0
  27. mov %o5, %o1
  28. 3:
  29. jmpl %o7 + 8, %g0
  30. nop