1dnl VAX mpn_addmul_1 -- Multiply a limb vector with a limb and add the result 2dnl to a second limb vector. 3 4dnl Copyright 1992, 1994, 1996, 2000, 2012 Free Software Foundation, Inc. 5 6dnl This file is part of the GNU MP Library. 7 8dnl The GNU MP Library is free software; you can redistribute it and/or modify 9dnl it under the terms of the GNU Lesser General Public License as published 10dnl by the Free Software Foundation; either version 3 of the License, or (at 11dnl your option) any later version. 12 13dnl The GNU MP Library is distributed in the hope that it will be useful, but 14dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 15dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 16dnl License for more details. 17 18dnl You should have received a copy of the GNU Lesser General Public License 19dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. 20 21include(`../config.m4') 22 23ASM_START() 24PROLOGUE(mpn_addmul_1) 25 .word 0xfc0 26 movl 12(ap), r4 27 movl 8(ap), r8 28 movl 4(ap), r9 29 clrl r3 30 incl r4 31 ashl $-1, r4, r7 32 clrl r11 33 movl 16(ap), r6 34 jlss L(v0_big) 35 jlbc r4, L(1) 36 37C Loop for v0 < 0x80000000 38L(tp1): movl (r8)+, r1 39 jlss L(1n0) 40 emul r1, r6, $0, r2 41 addl2 r11, r2 42 adwc $0, r3 43 addl2 r2, (r9)+ 44 adwc $0, r3 45L(1): movl (r8)+, r1 46 jlss L(1n1) 47L(1p1): emul r1, r6, $0, r10 48 addl2 r3, r10 49 adwc $0, r11 50 addl2 r10, (r9)+ 51 adwc $0, r11 52 53 sobgtr r7, L(tp1) 54 movl r11, r0 55 ret 56 57L(1n0): emul r1, r6, $0, r2 58 addl2 r11, r2 59 adwc r6, r3 60 addl2 r2, (r9)+ 61 adwc $0, r3 62 movl (r8)+, r1 63 jgeq L(1p1) 64L(1n1): emul r1, r6, $0, r10 65 addl2 r3, r10 66 adwc r6, r11 67 addl2 r10, (r9)+ 68 adwc $0, r11 69 70 sobgtr r7, L(tp1) 71 movl r11, r0 72 ret 73 74L(v0_big): 75 jlbc r4, L(2) 76 77C Loop for v0 >= 0x80000000 78L(tp2): movl (r8)+, r1 79 jlss L(2n0) 80 emul r1, r6, $0, r2 81 addl2 r11, r2 82 adwc r1, r3 83 addl2 r2, (r9)+ 84 adwc $0, r3 85L(2): movl (r8)+, r1 86 jlss L(2n1) 87L(2p1): emul r1, r6, $0, r10 88 addl2 r3, r10 89 adwc r1, r11 90 addl2 r10, (r9)+ 91 adwc $0, r11 92 93 sobgtr r7, L(tp2) 94 movl r11, r0 95 ret 96 97L(2n0): emul r1, r6, $0, r2 98 addl2 r11, r2 99 adwc r6, r3 100 addl2 r2, (r9)+ 101 adwc r1, r3 102 movl (r8)+, r1 103 jgeq L(2p1) 104L(2n1): emul r1, r6, $0, r10 105 addl2 r3, r10 106 adwc r6, r11 107 addl2 r10, (r9)+ 108 adwc r1, r11 109 110 sobgtr r7, L(tp2) 111 movl r11, r0 112 ret 113EPILOGUE() 114