github.com/aergoio/aergo@v1.3.1/libtool/src/gmp-6.1.2/mpn/pa32/hppa2_0/sub_n.asm (about) 1 dnl HP-PA 2.0 32-bit mpn_sub_n -- Subtract two limb vectors of the same 2 dnl length > 0 and store difference in a third limb vector. 3 4 dnl Copyright 1997, 1998, 2000-2002 Free Software Foundation, Inc. 5 6 dnl This file is part of the GNU MP Library. 7 dnl 8 dnl The GNU MP Library is free software; you can redistribute it and/or modify 9 dnl it under the terms of either: 10 dnl 11 dnl * the GNU Lesser General Public License as published by the Free 12 dnl Software Foundation; either version 3 of the License, or (at your 13 dnl option) any later version. 14 dnl 15 dnl or 16 dnl 17 dnl * the GNU General Public License as published by the Free Software 18 dnl Foundation; either version 2 of the License, or (at your option) any 19 dnl later version. 20 dnl 21 dnl or both in parallel, as here. 22 dnl 23 dnl The GNU MP Library is distributed in the hope that it will be useful, but 24 dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 25 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 26 dnl for more details. 27 dnl 28 dnl You should have received copies of the GNU General Public License and the 29 dnl GNU Lesser General Public License along with the GNU MP Library. If not, 30 dnl see https://www.gnu.org/licenses/. 31 32 include(`../config.m4') 33 34 C INPUT PARAMETERS 35 C res_ptr gr26 36 C s1_ptr gr25 37 C s2_ptr gr24 38 C size gr23 39 40 C This runs at 2 cycles/limb on PA8000. 41 42 ASM_START() 43 PROLOGUE(mpn_sub_n) 44 sub %r0,%r23,%r22 45 zdep %r22,30,3,%r28 C r28 = 2 * (-n & 7) 46 zdep %r22,29,3,%r22 C r22 = 4 * (-n & 7) 47 sub %r25,%r22,%r25 C offset s1_ptr 48 sub %r24,%r22,%r24 C offset s2_ptr 49 blr %r28,%r0 C branch into loop 50 sub %r26,%r22,%r26 C offset res_ptr and set carry 51 52 LDEF(loop) 53 ldw 0(%r25),%r20 54 ldw 0(%r24),%r31 55 subb %r20,%r31,%r20 56 stw %r20,0(%r26) 57 58 LDEF(7) 59 ldw 4(%r25),%r21 60 ldw 4(%r24),%r19 61 subb %r21,%r19,%r21 62 stw %r21,4(%r26) 63 64 LDEF(6) 65 ldw 8(%r25),%r20 66 ldw 8(%r24),%r31 67 subb %r20,%r31,%r20 68 stw %r20,8(%r26) 69 70 LDEF(5) 71 ldw 12(%r25),%r21 72 ldw 12(%r24),%r19 73 subb %r21,%r19,%r21 74 stw %r21,12(%r26) 75 76 LDEF(4) 77 ldw 16(%r25),%r20 78 ldw 16(%r24),%r31 79 subb %r20,%r31,%r20 80 stw %r20,16(%r26) 81 82 LDEF(3) 83 ldw 20(%r25),%r21 84 ldw 20(%r24),%r19 85 subb %r21,%r19,%r21 86 stw %r21,20(%r26) 87 88 LDEF(2) 89 ldw 24(%r25),%r20 90 ldw 24(%r24),%r31 91 subb %r20,%r31,%r20 92 stw %r20,24(%r26) 93 94 LDEF(1) 95 ldw 28(%r25),%r21 96 ldo 32(%r25),%r25 97 ldw 28(%r24),%r19 98 subb %r21,%r19,%r21 99 stw %r21,28(%r26) 100 ldo 32(%r24),%r24 101 addib,> -8,%r23,L(loop) 102 ldo 32(%r26),%r26 103 104 addc %r0,%r0,%r28 105 bv (%r2) 106 subi 1,%r28,%r28 107 EPILOGUE()