Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * ashrdi3.S:   The filesystem code creates all kinds of references to
0004  *              this little routine on the sparc with gcc.
0005  *
0006  * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
0007  */
0008 
0009 #include <linux/linkage.h>
0010 #include <asm/export.h>
0011 
0012     .text
0013 ENTRY(__ashrdi3)
0014     tst %o2
0015     be  3f
0016      or %g0, 32, %g2
0017 
0018     sub %g2, %o2, %g2
0019 
0020     tst %g2
0021     bg  1f
0022      sra    %o0, %o2, %o4
0023 
0024     sra %o0, 31, %o4
0025     sub %g0, %g2, %g2
0026     ba  2f
0027      sra    %o0, %g2, %o5
0028 
0029 1:
0030     sll %o0, %g2, %g3
0031     srl %o1, %o2, %g2
0032     or  %g2, %g3, %o5
0033 2:
0034     or  %g0, %o4, %o0
0035     or  %g0, %o5, %o1
0036 3:
0037     jmpl    %o7 + 8, %g0
0038      nop
0039 ENDPROC(__ashrdi3)
0040 EXPORT_SYMBOL(__ashrdi3)