root/arch/sparc/lib/ashrdi3.S

/* [previous][next][first][last][top][bottom][index][help] */
   1 /* $Id: ashrdi3.S,v 1.2 1995/11/25 00:58:59 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 
   8 #include <asm/cprefix.h>
   9 
  10                 .globl C_LABEL(__ashrdi3)
  11 C_LABEL(__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:      sll     %o0, %g2, %g3
  24         srl     %o1, %o2, %g2
  25         or      %g2, %g3, %o5
  26 2:      or      %g0, %o4, %o0
  27         or      %g0, %o5, %o1
  28 3:      jmpl    %o7 + 8, %g0
  29         nop

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