root/arch/sparc/lib/ashrdi3.S

/* [previous][next][first][last][top][bottom][index][help] */
   1 /* ashrdi3.S:   The filesystem code creates all kinds of references to
   2  *              this little routine on the sparc with gcc.
   3  *
   4  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
   5  */
   6 
   7 #include <asm/cprefix.h>
   8 
   9                 .globl C_LABEL(__ashrdi3)
  10 C_LABEL(__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:      sll     %o0, %g2, %g3
  23         srl     %o1, %o2, %g2
  24         or      %g2, %g3, %o5
  25 2:      or      %g0, %o4, %o0
  26         or      %g0, %o5, %o1
  27 3:      jmpl    %o7 + 8, %g0
  28         nop

/* [previous][next][first][last][top][bottom][index][help] */