Annotation of OpenXM_contrib/gmp/mpn/s390/addmul_1.asm, Revision 1.1.1.1
1.1 ohara 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.
3:
4: dnl Copyright 2001 Free Software Foundation, Inc.
5:
6: dnl This file is part of the GNU MP Library.
7:
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 2.1 of the License, or (at
11: dnl your option) any later version.
12:
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.
17:
18: dnl You should have received a copy of the GNU Lesser General Public License
19: dnl along with the GNU MP Library; see the file COPYING.LIB. If not, write to
20: dnl the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
21: dnl MA 02111-1307, USA.
22:
23: include(`../config.m4')
24:
25: define(`rp',2)
26: define(`up',3)
27: define(`n',4)
28: define(`vlimb',5)
29: define(`cylimb',7)
30:
31: ASM_START()
32: PROLOGUE(mpn_addmul_1)
33: stm 6,7,24(15)
34: slr cylimb,cylimb # clear cylimb
35: ltr vlimb,vlimb
36: jnl .Loopp
37:
38: .Loopn: l 1,0(up) # load from u
39: lr 6,1 #
40: mr 0,vlimb # multiply signed
41: alr 0,6 # add vlimb to phi
42: sra 6,31 # make mask
43: nr 6,vlimb # 0 or vlimb
44: alr 0,6 # conditionally add vlimb to phi
45: alr 1,cylimb # add carry limb to plo
46: brc 8+4,+8 # branch if not carry
47: ahi 0,1 # increment phi
48: l 6,0(rp) # load r limb
49: alr 6,1 # add u limb to plo
50: brc 8+4,+8 # branch if not carry
51: ahi 0,1 # increment phi
52: lr cylimb,0 # new cylimb
53: st 6,0(rp) # store
54: la up,4(,up)
55: la rp,4(,rp)
56: brct n,.Loopn
57:
58: lr 2,cylimb
59: lm 6,7,24(15)
60: br 14
61:
62: .Loopp: l 1,0(up) # load from u
63: lr 6,1 #
64: mr 0,vlimb # multiply signed
65: sra 6,31 # make mask
66: nr 6,vlimb # 0 or vlimb
67: alr 0,6 # conditionally add vlimb to phi
68: alr 1,cylimb # add carry limb to plo
69: brc 8+4,+8 # branch if not carry
70: ahi 0,1 # increment phi
71: l 6,0(rp) # load r limb
72: alr 6,1 # add u limb to plo
73: brc 8+4,+8 # branch if not carry
74: ahi 0,1 # increment phi
75: lr cylimb,0 # new cylimb
76: st 6,0(rp) # store
77: la up,4(,up)
78: la rp,4(,rp)
79: brct n,.Loopp
80:
81: lr 2,cylimb
82: lm 6,7,24(15)
83: br 14
84: EPILOGUE(mpn_addmul_1)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>