Home | History | Annotate | Line # | Download | only in v8
      1  1.1   pk /*
      2  1.1   pk  * GCC generated output for sparc v8 mul/div/rem operations.
      3  1.1   pk  * Included in the sparc_v8.so shared library for use on sparc v8
      4  1.1   pk  * machines instead of the libc.so versions.
      5  1.1   pk  */
      6  1.1   pk 	.file	"sparc_v8.S"
      7  1.1   pk .section	".text"
      8  1.1   pk 
      9  1.3  uwe 
     10  1.3  uwe /*
     11  1.3  uwe  * unsigned .umul(unsigned a, unsigned b)
     12  1.3  uwe  *
     13  1.3  uwe  *     This function computes a * b with unsigned integer
     14  1.3  uwe  *     multiplication.  When .umul returns, the caller's register %o0
     15  1.3  uwe  *     contains the least significant 32 bits of the 64-bit result;
     16  1.3  uwe  *     register %o1 holds the most significant 32 bits of the result.
     17  1.3  uwe  *     Upon return, the integer condition codes and registers %o2
     18  1.3  uwe  *     through %o5 have unspecified values.
     19  1.3  uwe  */
     20  1.1   pk 	.align 4
     21  1.1   pk 	.global .umul
     22  1.1   pk 	.type	 .umul,@function
     23  1.1   pk .umul:
     24  1.3  uwe 	umul	%o0, %o1, %o0
     25  1.1   pk 	retl
     26  1.3  uwe 	 rd	%y, %o1
     27  1.1   pk .LLfe1:
     28  1.1   pk 	.size	 .umul,.LLfe1-.umul
     29  1.1   pk 
     30  1.3  uwe 
     31  1.3  uwe /*
     32  1.3  uwe  * int .mul(int a, int b)
     33  1.3  uwe  *
     34  1.3  uwe  *     This function computes a * b with signed integer
     35  1.3  uwe  *     multiplication.  When .mul returns, the caller's register %o0
     36  1.3  uwe  *     contains the least significant 32 bits of the 64-bit result;
     37  1.3  uwe  *     register %o1 holds the most significant 32 bits of the result.
     38  1.3  uwe  *     Upon return, the integer condition codes and registers %o2
     39  1.3  uwe  *     through %o5 have unspecified values.
     40  1.3  uwe  */
     41  1.1   pk 	.align 4
     42  1.1   pk 	.global .mul
     43  1.1   pk 	.type	 .mul,@function
     44  1.1   pk .mul:
     45  1.3  uwe 	smul	%o0, %o1, %o0
     46  1.1   pk 	retl
     47  1.3  uwe 	 rd	%y, %o1
     48  1.1   pk .LLfe2:
     49  1.1   pk 	.size	 .mul,.LLfe2-.mul
     50  1.1   pk 
     51  1.1   pk /*--- .udiv ---*/
     52  1.1   pk 	.align 4
     53  1.1   pk 	.global .udiv
     54  1.1   pk 	.type	 .udiv,@function
     55  1.1   pk .udiv:
     56  1.1   pk 	wr	%g0, 0, %y
     57  1.1   pk 	nop; nop; nop
     58  1.1   pk 	retl
     59  1.1   pk 	 udiv	%o0, %o1, %o0
     60  1.1   pk .LLfe3:
     61  1.1   pk 	.size	 .udiv,.LLfe3-.udiv
     62  1.1   pk 
     63  1.1   pk /*--- .div ---*/
     64  1.1   pk 	.align 4
     65  1.1   pk 	.global .div
     66  1.1   pk 	.type	 .div,@function
     67  1.1   pk .div:
     68  1.1   pk 	sra	%o0, 31, %g2
     69  1.1   pk 	wr	%g2, 0, %y
     70  1.1   pk 	nop; nop; nop
     71  1.1   pk 	retl
     72  1.1   pk 	 sdiv	%o0, %o1, %o0
     73  1.1   pk .LLfe4:
     74  1.1   pk 	.size	 .div,.LLfe4-.div
     75  1.1   pk 
     76  1.1   pk /*--- .urem ---*/
     77  1.1   pk 	.align 4
     78  1.1   pk 	.global .urem
     79  1.1   pk 	.type	 .urem,@function
     80  1.1   pk .urem:
     81  1.1   pk 	wr	%g0, %g0, %y
     82  1.1   pk 	nop; nop; nop
     83  1.1   pk 	udiv	%o0, %o1, %g2
     84  1.1   pk 	smul	%g2, %o1, %g2
     85  1.1   pk 	retl
     86  1.1   pk 	 sub	%o0, %g2, %o0
     87  1.1   pk .LLfe5:
     88  1.1   pk 	.size	 .urem,.LLfe5-.urem
     89  1.1   pk 
     90  1.1   pk /*--- .rem ---*/
     91  1.1   pk 	.align 4
     92  1.1   pk 	.global .rem
     93  1.1   pk 	.type	 .rem,@function
     94  1.1   pk .rem:
     95  1.1   pk 	sra	%o0, 31, %g3
     96  1.1   pk 	wr	%g3, 0, %y
     97  1.1   pk 	nop; nop; nop
     98  1.1   pk 	sdiv	%o0, %o1, %g2
     99  1.1   pk 	smul	%g2, %o1, %g2
    100  1.1   pk 	retl
    101  1.1   pk 	 sub	%o0, %g2, %o0
    102  1.1   pk .LLfe6:
    103  1.1   pk 	.size	 .rem,.LLfe6-.rem
    104  1.1   pk 	!.ident	"GCC: (GNU) 2.95.3 20010315 (release) (NetBSD nb3)"
    105