Blame mpn/alpha/copyi.asm

Packit 5c3484
dnl  Alpha mpn_copyi -- copy, incrementing.
Packit 5c3484
Packit 5c3484
dnl  Copyright 2002, 2003 Free Software Foundation, Inc.
Packit 5c3484
Packit 5c3484
dnl  This file is part of the GNU MP Library.
Packit 5c3484
dnl
Packit 5c3484
dnl  The GNU MP Library is free software; you can redistribute it and/or modify
Packit 5c3484
dnl  it under the terms of either:
Packit 5c3484
dnl
Packit 5c3484
dnl    * the GNU Lesser General Public License as published by the Free
Packit 5c3484
dnl      Software Foundation; either version 3 of the License, or (at your
Packit 5c3484
dnl      option) any later version.
Packit 5c3484
dnl
Packit 5c3484
dnl  or
Packit 5c3484
dnl
Packit 5c3484
dnl    * the GNU General Public License as published by the Free Software
Packit 5c3484
dnl      Foundation; either version 2 of the License, or (at your option) any
Packit 5c3484
dnl      later version.
Packit 5c3484
dnl
Packit 5c3484
dnl  or both in parallel, as here.
Packit 5c3484
dnl
Packit 5c3484
dnl  The GNU MP Library is distributed in the hope that it will be useful, but
Packit 5c3484
dnl  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
Packit 5c3484
dnl  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
Packit 5c3484
dnl  for more details.
Packit 5c3484
dnl
Packit 5c3484
dnl  You should have received copies of the GNU General Public License and the
Packit 5c3484
dnl  GNU Lesser General Public License along with the GNU MP Library.  If not,
Packit 5c3484
dnl  see https://www.gnu.org/licenses/.
Packit 5c3484
Packit 5c3484
include(`../config.m4')
Packit 5c3484
Packit 5c3484
C      cycles/limb
Packit 5c3484
C EV4:     4
Packit 5c3484
C EV5:     1.75
Packit 5c3484
C EV6:     1
Packit 5c3484
Packit 5c3484
C INPUT PARAMETERS
Packit 5c3484
C rp	r16
Packit 5c3484
C up	r17
Packit 5c3484
C n	r18
Packit 5c3484
Packit 5c3484
Packit 5c3484
ASM_START()
Packit 5c3484
PROLOGUE(mpn_copyi)
Packit 5c3484
	lda	r18,-8(r18)		C E0
Packit 5c3484
	blt	r18,$Lend		C E1
Packit 5c3484
$Loop:	ldq	r0,0(r17)		C E0
Packit 5c3484
	ldq	r1,8(r17)		C E1
Packit 5c3484
	ldq	r2,16(r17)		C E0
Packit 5c3484
	ldq	r3,24(r17)		C E1
Packit 5c3484
	ldq	r4,32(r17)		C E0
Packit 5c3484
	ldq	r5,40(r17)		C E1
Packit 5c3484
	ldq	r6,48(r17)		C E0
Packit 5c3484
	ldq	r7,56(r17)		C E1
Packit 5c3484
	stq	r0,0(r16)		C E0
Packit 5c3484
	lda	r17,64(r17)		C E1
Packit 5c3484
	stq	r1,8(r16)		C E0
Packit 5c3484
	bis	r31, r31, r31		C E1
Packit 5c3484
	stq	r2,16(r16)		C E0
Packit 5c3484
	lda	r18,-8(r18)		C E1
Packit 5c3484
	stq	r3,24(r16)		C E0
Packit 5c3484
	bis	r31, r31, r31		C E1
Packit 5c3484
	stq	r4,32(r16)		C E0
Packit 5c3484
	bis	r31, r31, r31		C E1
Packit 5c3484
	stq	r5,40(r16)		C E0
Packit 5c3484
	bis	r31, r31, r31		C E1
Packit 5c3484
	stq	r6,48(r16)		C E0
Packit 5c3484
	bis	r31, r31, r31		C E1
Packit 5c3484
	stq	r7,56(r16)		C E0
Packit 5c3484
	lda	r16,64(r16)		C E1
Packit 5c3484
	bge	r18,$Loop		C E1
Packit 5c3484
$Lend:	lda	r18,7(r18)		C E0
Packit 5c3484
	blt	r18,$Lret		C E1
Packit 5c3484
	ldq	r0,0(r17)		C E0
Packit 5c3484
	beq	r18,$Lend0		C E1
Packit 5c3484
$Loop0:	stq	r0,0(r16)		C E0
Packit 5c3484
	lda	r16,8(r16)		C E1
Packit 5c3484
	ldq	r0,8(r17)		C E0
Packit 5c3484
	lda	r18,-1(r18)		C E1
Packit 5c3484
	lda	r17,8(r17)		C E0
Packit 5c3484
	bgt	r18,$Loop0		C E1
Packit 5c3484
$Lend0:	stq	r0,0(r16)		C E0
Packit 5c3484
$Lret:	ret	r31,(r26),1		C E1
Packit 5c3484
EPILOGUE(mpn_copyi)
Packit 5c3484
ASM_END()