github.com/aergoio/aergo@v1.3.1/libtool/src/gmp-6.1.2/mpn/pa32/hppa2_0/sqr_diagonal.asm (about) 1 dnl HP-PA 32-bit mpn_sqr_diagonal optimized for the PA8x00. 2 3 dnl Copyright 2001, 2002 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 This code runs at 6 cycles/limb on the PA7100 and 2 cycles/limb on PA8x00. 34 C The 2-way unrolling is actually not helping the PA7100. 35 36 C INPUT PARAMETERS 37 define(`rp',`%r26') 38 define(`up',`%r25') 39 define(`n',`%r24') 40 41 ASM_START() 42 PROLOGUE(mpn_sqr_diagonal) 43 44 fldws,ma 4(up),%fr4r 45 addib,= -1,n,L(end1) 46 ldo 4(rp),rp 47 48 fldws,ma 4(up),%fr6r 49 addib,= -1,n,L(end2) 50 xmpyu %fr4r,%fr4r,%fr5 51 52 fldws,ma 4(up),%fr4r 53 addib,= -1,n,L(end3) 54 xmpyu %fr6r,%fr6r,%fr7 55 56 57 LDEF(loop) 58 fldws,ma 4(up),%fr6r 59 fstws %fr5r,-4(rp) 60 fstws,ma %fr5l,8(rp) 61 addib,= -1,n,L(exite) 62 xmpyu %fr4r,%fr4r,%fr5 63 fldws,ma 4(up),%fr4r 64 fstws %fr7r,-4(rp) 65 fstws,ma %fr7l,8(rp) 66 addib,<> -1,n,L(loop) 67 xmpyu %fr6r,%fr6r,%fr7 68 69 LDEF(exito) 70 fstws %fr5r,-4(rp) 71 fstws %fr5l,0(rp) 72 xmpyu %fr4r,%fr4r,%fr5 73 fstws %fr7r,4(rp) 74 fstws %fr7l,8(rp) 75 fstws,mb %fr5r,12(rp) 76 bv 0(%r2) 77 fstws %fr5l,4(rp) 78 79 LDEF(exite) 80 fstws %fr7r,-4(rp) 81 fstws %fr7l,0(rp) 82 xmpyu %fr6r,%fr6r,%fr7 83 fstws %fr5r,4(rp) 84 fstws %fr5l,8(rp) 85 fstws,mb %fr7r,12(rp) 86 bv 0(%r2) 87 fstws %fr7l,4(rp) 88 89 LDEF(end1) 90 xmpyu %fr4r,%fr4r,%fr5 91 fstws %fr5r,-4(rp) 92 bv 0(%r2) 93 fstws,ma %fr5l,8(rp) 94 95 LDEF(end2) 96 xmpyu %fr6r,%fr6r,%fr7 97 fstws %fr5r,-4(rp) 98 fstws %fr5l,0(rp) 99 fstws %fr7r,4(rp) 100 bv 0(%r2) 101 fstws %fr7l,8(rp) 102 103 LDEF(end3) 104 fstws %fr5r,-4(rp) 105 fstws %fr5l,0(rp) 106 xmpyu %fr4r,%fr4r,%fr5 107 fstws %fr7r,4(rp) 108 fstws %fr7l,8(rp) 109 fstws,mb %fr5r,12(rp) 110 bv 0(%r2) 111 fstws %fr5l,4(rp) 112 EPILOGUE(mpn_sqr_diagonal)