github.com/aergoio/aergo@v1.3.1/libtool/src/gmp-6.1.2/mpn/alpha/copyi.asm (about) 1 dnl Alpha mpn_copyi -- copy, incrementing. 2 3 dnl Copyright 2002, 2003 Free Software Foundation, Inc. 4 5 dnl This file is part of the GNU MP Library. 6 dnl 7 dnl The GNU MP Library is free software; you can redistribute it and/or modify 8 dnl it under the terms of either: 9 dnl 10 dnl * the GNU Lesser General Public License as published by the Free 11 dnl Software Foundation; either version 3 of the License, or (at your 12 dnl option) any later version. 13 dnl 14 dnl or 15 dnl 16 dnl * the GNU General Public License as published by the Free Software 17 dnl Foundation; either version 2 of the License, or (at your option) any 18 dnl later version. 19 dnl 20 dnl or both in parallel, as here. 21 dnl 22 dnl The GNU MP Library is distributed in the hope that it will be useful, but 23 dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 24 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 25 dnl for more details. 26 dnl 27 dnl You should have received copies of the GNU General Public License and the 28 dnl GNU Lesser General Public License along with the GNU MP Library. If not, 29 dnl see https://www.gnu.org/licenses/. 30 31 include(`../config.m4') 32 33 C cycles/limb 34 C EV4: 4 35 C EV5: 1.75 36 C EV6: 1 37 38 C INPUT PARAMETERS 39 C rp r16 40 C up r17 41 C n r18 42 43 44 ASM_START() 45 PROLOGUE(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 85 EPILOGUE(mpn_copyi) 86 ASM_END()