Home | History | Annotate | Line # | Download | only in ultrasparct1
      1      1.1  mrg dnl  SPARC v9 mpn_submul_1 for T1/T2.
      2      1.1  mrg 
      3      1.1  mrg dnl  Copyright 2010 Free Software Foundation, Inc.
      4      1.1  mrg 
      5      1.1  mrg dnl  This file is part of the GNU MP Library.
      6  1.1.1.2  mrg dnl
      7      1.1  mrg dnl  The GNU MP Library is free software; you can redistribute it and/or modify
      8  1.1.1.2  mrg dnl  it under the terms of either:
      9  1.1.1.2  mrg dnl
     10  1.1.1.2  mrg dnl    * the GNU Lesser General Public License as published by the Free
     11  1.1.1.2  mrg dnl      Software Foundation; either version 3 of the License, or (at your
     12  1.1.1.2  mrg dnl      option) any later version.
     13  1.1.1.2  mrg dnl
     14  1.1.1.2  mrg dnl  or
     15  1.1.1.2  mrg dnl
     16  1.1.1.2  mrg dnl    * the GNU General Public License as published by the Free Software
     17  1.1.1.2  mrg dnl      Foundation; either version 2 of the License, or (at your option) any
     18  1.1.1.2  mrg dnl      later version.
     19  1.1.1.2  mrg dnl
     20  1.1.1.2  mrg dnl  or both in parallel, as here.
     21  1.1.1.2  mrg dnl
     22      1.1  mrg dnl  The GNU MP Library is distributed in the hope that it will be useful, but
     23      1.1  mrg dnl  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
     24  1.1.1.2  mrg dnl  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
     25  1.1.1.2  mrg dnl  for more details.
     26  1.1.1.2  mrg dnl
     27  1.1.1.2  mrg dnl  You should have received copies of the GNU General Public License and the
     28  1.1.1.2  mrg dnl  GNU Lesser General Public License along with the GNU MP Library.  If not,
     29  1.1.1.2  mrg dnl  see https://www.gnu.org/licenses/.
     30      1.1  mrg 
     31      1.1  mrg include(`../config.m4')
     32      1.1  mrg 
     33      1.1  mrg C		   cycles/limb
     34      1.1  mrg C UltraSPARC T1:	74
     35      1.1  mrg C UltraSPARC T2:	 ?
     36      1.1  mrg 
     37      1.1  mrg C INPUT PARAMETERS
     38      1.1  mrg define(`rp', `%i0')
     39      1.1  mrg define(`up', `%i1')
     40      1.1  mrg define(`n',  `%i2')
     41      1.1  mrg define(`v0', `%i3')
     42      1.1  mrg 
     43      1.1  mrg ASM_START()
     44      1.1  mrg 	REGISTER(%g2,#scratch)
     45      1.1  mrg 	REGISTER(%g3,#scratch)
     46      1.1  mrg PROLOGUE(mpn_submul_1)
     47      1.1  mrg 	save	%sp, -176, %sp
     48      1.1  mrg 	mov	1, %o2
     49      1.1  mrg 	mov	%i0, %g2
     50      1.1  mrg 	srlx	%i3, 32, %o4
     51      1.1  mrg 	sllx	%o2, 32, %o2
     52      1.1  mrg 	srl	%i3, 0, %i3
     53      1.1  mrg 	mov	0, %g3
     54      1.1  mrg 	mov	0, %i0
     55      1.1  mrg 
     56      1.1  mrg L(top):	ldx	[%i1+%g3], %g1
     57      1.1  mrg 	srl	%g1, 0, %g4
     58      1.1  mrg 	mulx	%g4, %i3, %o5
     59      1.1  mrg 	srlx	%g1, 32, %g1
     60      1.1  mrg 	mulx	%g1, %i3, %g5
     61      1.1  mrg 	mulx	%g4, %o4, %g4
     62      1.1  mrg 	mulx	%g1, %o4, %g1
     63      1.1  mrg 	srlx	%o5, 32, %o1
     64      1.1  mrg 	add	%g5, %o1, %o1
     65      1.1  mrg 	addcc	%o1, %g4, %g4
     66      1.1  mrg 	srl	%o5, 0, %o0
     67      1.1  mrg 	ldx	[%g2+%g3], %o5
     68      1.1  mrg 	sllx	%g4, 32, %o1
     69      1.1  mrg 	add	%g1, %o2, %l1
     70      1.1  mrg 	movlu	%xcc, %l1, %g1
     71      1.1  mrg 	add	%o1, %o0, %l0
     72      1.1  mrg 	addcc	%l0, %i0, %g5
     73      1.1  mrg 	srlx	%g4, 32, %i0
     74      1.1  mrg 	add	%i0, 1, %g4
     75      1.1  mrg 	movlu	%xcc, %g4, %i0
     76      1.1  mrg 	subcc	%o5, %g5, %g5
     77      1.1  mrg 	stx	%g5, [%g2+%g3]
     78      1.1  mrg 	add	%i0, 1, %g4
     79      1.1  mrg 	movlu	%xcc, %g4, %i0
     80      1.1  mrg 	add	%i2, -1, %i2
     81      1.1  mrg 	add	%i0, %g1, %i0
     82      1.1  mrg 	brnz,pt	%i2, L(top)
     83      1.1  mrg 	 add	%g3, 8, %g3
     84      1.1  mrg 	return	%i7+8
     85      1.1  mrg 	 nop
     86      1.1  mrg EPILOGUE()
     87