1dnl S/390 mpn_mul_1 -- Multiply a limb vector with a limb and store the 2dnl result in a second limb vector. 3 4dnl Copyright 2001 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 23define(`rp',2) 24define(`up',3) 25define(`n',4) 26define(`vlimb',5) 27define(`cylimb',7) 28 29ASM_START() 30PROLOGUE(mpn_mul_1) 31 stm 6,7,24(15) 32 slr cylimb,cylimb # clear cylimb 33 ltr vlimb,vlimb 34 jnl .Loopp 35 36.Loopn: l 1,0(up) # load from u 37 lr 6,1 # 38 mr 0,vlimb # multiply signed 39 alr 0,6 # add vlimb to phi 40 sra 6,31 # make mask 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 lr cylimb,0 # new cylimb 47 st 1,0(rp) # store 48 la up,4(,up) 49 la rp,4(,rp) 50 brct n,.Loopn 51 52 lr 2,cylimb 53 lm 6,7,24(15) 54 br 14 55 56.Loopp: l 1,0(up) # load from u 57 lr 6,1 # 58 mr 0,vlimb # multiply signed 59 sra 6,31 # make mask 60 nr 6,vlimb # 0 or vlimb 61 alr 0,6 # conditionally add vlimb to phi 62 alr 1,cylimb # add carry limb to plo 63 brc 8+4,+8 # branch if not carry 64 ahi 0,1 # increment phi 65 lr cylimb,0 # new cylimb 66 st 1,0(rp) # store 67 la up,4(,up) 68 la rp,4(,rp) 69 brct n,.Loopp 70 71 lr 2,cylimb 72 lm 6,7,24(15) 73 br 14 74EPILOGUE(mpn_mul_1) 75