Annotation of OpenXM_contrib/gmp/mpn/s390/mul_1.asm, Revision 1.1.1.1
1.1 ohara 1: dnl S/390 mpn_mul_1 -- Multiply a limb vector with a limb and store the
2: dnl result in 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_mul_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: lr cylimb,0 # new cylimb
49: st 1,0(rp) # store
50: la up,4(,up)
51: la rp,4(,rp)
52: brct n,.Loopn
53:
54: lr 2,cylimb
55: lm 6,7,24(15)
56: br 14
57:
58: .Loopp: l 1,0(up) # load from u
59: lr 6,1 #
60: mr 0,vlimb # multiply signed
61: sra 6,31 # make mask
62: nr 6,vlimb # 0 or vlimb
63: alr 0,6 # conditionally add vlimb to phi
64: alr 1,cylimb # add carry limb to plo
65: brc 8+4,+8 # branch if not carry
66: ahi 0,1 # increment phi
67: lr cylimb,0 # new cylimb
68: st 1,0(rp) # store
69: la up,4(,up)
70: la rp,4(,rp)
71: brct n,.Loopp
72:
73: lr 2,cylimb
74: lm 6,7,24(15)
75: br 14
76: EPILOGUE(mpn_mul_1)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>