1dnl Alpha mpn_copyi -- copy, incrementing. 2 3dnl Copyright 2002, 2003 Free Software Foundation, Inc. 4 5dnl This file is part of the GNU MP Library. 6dnl 7dnl The GNU MP Library is free software; you can redistribute it and/or modify 8dnl it under the terms of either: 9dnl 10dnl * the GNU Lesser General Public License as published by the Free 11dnl Software Foundation; either version 3 of the License, or (at your 12dnl option) any later version. 13dnl 14dnl or 15dnl 16dnl * the GNU General Public License as published by the Free Software 17dnl Foundation; either version 2 of the License, or (at your option) any 18dnl later version. 19dnl 20dnl or both in parallel, as here. 21dnl 22dnl The GNU MP Library is distributed in the hope that it will be useful, but 23dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 24dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 25dnl for more details. 26dnl 27dnl You should have received copies of the GNU General Public License and the 28dnl GNU Lesser General Public License along with the GNU MP Library. If not, 29dnl see https://www.gnu.org/licenses/. 30 31include(`../config.m4') 32 33C cycles/limb 34C EV4: 4 35C EV5: 1.75 36C EV6: 1 37 38C INPUT PARAMETERS 39C rp r16 40C up r17 41C n r18 42 43 44ASM_START() 45PROLOGUE(mpn_copyi) 46 lda r18,-8(r18) C E0 47 blt r18,$Lend C E1 48$Loop: ldq r0,0(r17) C E0 49 ldq r1,8(r17) C E1 50 ldq r2,16(r17) C E0 51 ldq r3,24(r17) C E1 52 ldq r4,32(r17) C E0 53 ldq r5,40(r17) C E1 54 ldq r6,48(r17) C E0 55 ldq r7,56(r17) C E1 56 stq r0,0(r16) C E0 57 lda r17,64(r17) C E1 58 stq r1,8(r16) C E0 59 bis r31, r31, r31 C E1 60 stq r2,16(r16) C E0 61 lda r18,-8(r18) C E1 62 stq r3,24(r16) C E0 63 bis r31, r31, r31 C E1 64 stq r4,32(r16) C E0 65 bis r31, r31, r31 C E1 66 stq r5,40(r16) C E0 67 bis r31, r31, r31 C E1 68 stq r6,48(r16) C E0 69 bis r31, r31, r31 C E1 70 stq r7,56(r16) C E0 71 lda r16,64(r16) C E1 72 bge r18,$Loop C E1 73$Lend: lda r18,7(r18) C E0 74 blt r18,$Lret C E1 75 ldq r0,0(r17) C E0 76 beq r18,$Lend0 C E1 77$Loop0: stq r0,0(r16) C E0 78 lda r16,8(r16) C E1 79 ldq r0,8(r17) C E0 80 lda r18,-1(r18) C E1 81 lda r17,8(r17) C E0 82 bgt r18,$Loop0 C E1 83$Lend0: stq r0,0(r16) C E0 84$Lret: ret r31,(r26),1 C E1 85EPILOGUE(mpn_copyi) 86ASM_END() 87