Blame sysdeps/alpha/add_n.S

Packit 6c4009
 # Alpha __mpn_add_n -- Add two limb vectors of the same length > 0 and
Packit 6c4009
 # store sum in a third limb vector.
Packit 6c4009
Packit 6c4009
 # Copyright (C) 1995-2018 Free Software Foundation, Inc.
Packit 6c4009
Packit 6c4009
 # This file is part of the GNU MP Library.
Packit 6c4009
Packit 6c4009
 # The GNU MP Library is free software; you can redistribute it and/or modify
Packit 6c4009
 # it under the terms of the GNU Lesser General Public License as published by
Packit 6c4009
 # the Free Software Foundation; either version 2.1 of the License, or (at your
Packit 6c4009
 # option) any later version.
Packit 6c4009
Packit 6c4009
 # The GNU MP Library is distributed in the hope that it will be useful, but
Packit 6c4009
 # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
Packit 6c4009
 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
Packit 6c4009
 # License for more details.
Packit 6c4009
Packit 6c4009
 # You should have received a copy of the GNU Lesser General Public License
Packit 6c4009
 # along with the GNU MP Library.  If not, see <http://www.gnu.org/licenses/>.
Packit 6c4009
Packit 6c4009
Packit 6c4009
 # INPUT PARAMETERS
Packit 6c4009
 # res_ptr	$16
Packit 6c4009
 # s1_ptr	$17
Packit 6c4009
 # s2_ptr	$18
Packit 6c4009
 # size		$19
Packit 6c4009
Packit 6c4009
	.set	noreorder
Packit 6c4009
	.set	noat
Packit 6c4009
.text
Packit 6c4009
	.align	3
Packit 6c4009
	.globl	__mpn_add_n
Packit 6c4009
	.ent	__mpn_add_n
Packit 6c4009
__mpn_add_n:
Packit 6c4009
	.frame	$30,0,$26,0
Packit 6c4009
Packit 6c4009
	ldq	$3,0($17)
Packit 6c4009
	ldq	$4,0($18)
Packit 6c4009
Packit 6c4009
	subq	$19,1,$19
Packit 6c4009
	and	$19,4-1,$2	# number of limbs in first loop
Packit 6c4009
	bis	$31,$31,$0
Packit 6c4009
	beq	$2,.L0		# if multiple of 4 limbs, skip first loop
Packit 6c4009
Packit 6c4009
	subq	$19,$2,$19
Packit 6c4009
Packit 6c4009
.Loop0:	subq	$2,1,$2
Packit 6c4009
	ldq	$5,8($17)
Packit 6c4009
	addq	$4,$0,$4
Packit 6c4009
	ldq	$6,8($18)
Packit 6c4009
	cmpult	$4,$0,$1
Packit 6c4009
	addq	$3,$4,$4
Packit 6c4009
	cmpult	$4,$3,$0
Packit 6c4009
	stq	$4,0($16)
Packit 6c4009
	or	$0,$1,$0
Packit 6c4009
Packit 6c4009
	addq	$17,8,$17
Packit 6c4009
	addq	$18,8,$18
Packit 6c4009
	bis	$5,$5,$3
Packit 6c4009
	bis	$6,$6,$4
Packit 6c4009
	addq	$16,8,$16
Packit 6c4009
	bne	$2,.Loop0
Packit 6c4009
Packit 6c4009
.L0:	beq	$19,.Lend
Packit 6c4009
Packit 6c4009
	.align	3
Packit 6c4009
.Loop:	subq	$19,4,$19
Packit 6c4009
Packit 6c4009
	ldq	$5,8($17)
Packit 6c4009
	addq	$4,$0,$4
Packit 6c4009
	ldq	$6,8($18)
Packit 6c4009
	cmpult	$4,$0,$1
Packit 6c4009
	addq	$3,$4,$4
Packit 6c4009
	cmpult	$4,$3,$0
Packit 6c4009
	stq	$4,0($16)
Packit 6c4009
	or	$0,$1,$0
Packit 6c4009
Packit 6c4009
	ldq	$3,16($17)
Packit 6c4009
	addq	$6,$0,$6
Packit 6c4009
	ldq	$4,16($18)
Packit 6c4009
	cmpult	$6,$0,$1
Packit 6c4009
	addq	$5,$6,$6
Packit 6c4009
	cmpult	$6,$5,$0
Packit 6c4009
	stq	$6,8($16)
Packit 6c4009
	or	$0,$1,$0
Packit 6c4009
Packit 6c4009
	ldq	$5,24($17)
Packit 6c4009
	addq	$4,$0,$4
Packit 6c4009
	ldq	$6,24($18)
Packit 6c4009
	cmpult	$4,$0,$1
Packit 6c4009
	addq	$3,$4,$4
Packit 6c4009
	cmpult	$4,$3,$0
Packit 6c4009
	stq	$4,16($16)
Packit 6c4009
	or	$0,$1,$0
Packit 6c4009
Packit 6c4009
	ldq	$3,32($17)
Packit 6c4009
	addq	$6,$0,$6
Packit 6c4009
	ldq	$4,32($18)
Packit 6c4009
	cmpult	$6,$0,$1
Packit 6c4009
	addq	$5,$6,$6
Packit 6c4009
	cmpult	$6,$5,$0
Packit 6c4009
	stq	$6,24($16)
Packit 6c4009
	or	$0,$1,$0
Packit 6c4009
Packit 6c4009
	addq	$17,32,$17
Packit 6c4009
	addq	$18,32,$18
Packit 6c4009
	addq	$16,32,$16
Packit 6c4009
	bne	$19,.Loop
Packit 6c4009
Packit 6c4009
.Lend:	addq	$4,$0,$4
Packit 6c4009
	cmpult	$4,$0,$1
Packit 6c4009
	addq	$3,$4,$4
Packit 6c4009
	cmpult	$4,$3,$0
Packit 6c4009
	stq	$4,0($16)
Packit 6c4009
	or	$0,$1,$0
Packit 6c4009
	ret	$31,($26),1
Packit 6c4009
Packit 6c4009
	.end	__mpn_add_n