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