1 dnl S/390 mpn_addmul_1 -- Multiply a limb vector with a limb and add the
2 dnl result to a second limb vector.
4 dnl Copyright 2001 Free Software Foundation, Inc.
6 dnl This file is part of the GNU MP Library.
8 dnl The GNU MP Library is free software; you can redistribute it and/or modify
9 dnl it under the terms of the GNU Lesser General Public License as published
10 dnl by the Free Software Foundation; either version 3 of the License, or (at
11 dnl your option) any later version.
13 dnl The GNU MP Library is distributed in the hope that it will be useful, but
14 dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
16 dnl License for more details.
18 dnl You should have received a copy of the GNU Lesser General Public License
19 dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
21 include(`../config.m4')
30 PROLOGUE(mpn_addmul_1)
32 slr cylimb,cylimb # clear cylimb
36 .Loopn: l 1,0(up) # load from u
38 mr 0,vlimb # multiply signed
39 alr 0,6 # add vlimb to phi
41 nr 6,vlimb # 0 or vlimb
42 alr 0,6 # conditionally add vlimb to phi
43 alr 1,cylimb # add carry limb to plo
44 brc 8+4,+8 # branch if not carry
45 ahi 0,1 # increment phi
46 l 6,0(rp) # load r limb
47 alr 6,1 # add u limb to plo
48 brc 8+4,+8 # branch if not carry
49 ahi 0,1 # increment phi
50 lr cylimb,0 # new cylimb
60 .Loopp: l 1,0(up) # load from u
62 mr 0,vlimb # multiply signed
64 nr 6,vlimb # 0 or vlimb
65 alr 0,6 # conditionally add vlimb to phi
66 alr 1,cylimb # add carry limb to plo
67 brc 8+4,+8 # branch if not carry
68 ahi 0,1 # increment phi
69 l 6,0(rp) # load r limb
70 alr 6,1 # add u limb to plo
71 brc 8+4,+8 # branch if not carry
72 ahi 0,1 # increment phi
73 lr cylimb,0 # new cylimb
82 EPILOGUE(mpn_addmul_1)