github.com/aergoio/aergo@v1.3.1/libtool/src/gmp-6.1.2/mpn/vax/add_n.asm (about) 1 dnl VAX mpn_add_n -- Add two limb vectors of the same length > 0 and store sum 2 dnl in a third limb vector. 3 4 dnl Copyright 1999, 2000, 2012 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 ASM_START() 35 PROLOGUE(mpn_add_n) 36 .word 0x0 37 movl 16(ap), r0 38 movl 12(ap), r1 39 movl 8(ap), r2 40 movl 4(ap), r3 41 mnegl r0, r5 42 addl2 $3, r0 43 ashl $-2, r0, r0 C unroll loop count 44 bicl2 $-4, r5 C mask out low 2 bits 45 movaq (r5)[r5], r5 C 9x 46 jmp L(top)[r5] 47 48 L(top): movl (r2)+, r4 49 adwc (r1)+, r4 50 movl r4, (r3)+ 51 movl (r2)+, r4 52 adwc (r1)+, r4 53 movl r4, (r3)+ 54 movl (r2)+, r4 55 adwc (r1)+, r4 56 movl r4, (r3)+ 57 movl (r2)+, r4 58 adwc (r1)+, r4 59 movl r4, (r3)+ 60 sobgtr r0, L(top) 61 62 adwc r0, r0 63 ret 64 EPILOGUE()