1 dnl Alpha mpn_addlsh1_n
/mpn_sublsh1_n
-- rp
[] = up
[] +- (vp
[] << 1).
3 dnl Copyright
2003, 2013 Free Software Foundation
, Inc.
5 dnl
This file is part of the GNU MP Library.
7 dnl The GNU MP Library is free software
; you can redistribute it and/or modify
8 dnl it under the terms of
either:
10 dnl
* the GNU Lesser General
Public License as published by the Free
11 dnl Software Foundation
; either version 3 of the License, or (at your
12 dnl option
) any later version.
16 dnl
* the GNU General
Public License as published by the Free Software
17 dnl Foundation
; either version 2 of the License, or (at your option) any
20 dnl
or both
in parallel
, as here.
22 dnl The GNU MP Library is distributed
in the hope that it will be useful
, but
23 dnl WITHOUT ANY WARRANTY
; without even the implied warranty of MERCHANTABILITY
24 dnl
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License
27 dnl You should have received copies of the GNU General
Public License
and the
28 dnl GNU Lesser General
Public License along with the GNU MP Library. If
not,
29 dnl see
https://www.gnu.
org/licenses
/.
31 include(`..
/config.m4
')
39 C * Tune to reach 3.75 c/l on ev6.
58 ifdef(`OPERATION_addlsh1_n',`
60 define
(CARRY
, `cmpult
$1,$2,$3')
61 define(func, mpn_addlsh1_n)
63 ifdef
(`OPERATION_sublsh1_n
',`
65 define(CARRY, `cmpult $2,$1,$3')
66 define
(func
, mpn_sublsh1_n
)
69 MULFUNC_PROLOGUE(mpn_addlsh1_n mpn_sublsh1_n)
80 L(b00): lda vp, 48(vp)
86 L(b10): lda vp, 32(vp)
96 L(b11): lda vp, 40(vp)
109 L(top): addq v0, v0, r6
111 addq r6, r3, sl C combined vlimb
113 ADDSUB u0, sl, ps C ulimb + (vlimb << 1)
114 cmplt v0, r31, r2 C high v bits
115 ADDSUB ps, cy1, rr C consume carry from previous operation
116 CARRY( ps, u0, cy0) C carry out #2
118 CARRY( rr, ps, cy) C carry out #3
119 lda vp, 32(vp) C bookkeeping
120 addq cy, cy0, cy0 C final carry out
121 L(lo0): addq v1, v1, r7
131 lda rp, 32(rp) C bookkeeping
133 L(lo3): addq v0, v0, r6
143 lda up, 32(up) C bookkeeping
145 L(lo2): addq v1, v1, r7
155 lda n, -4(n) C bookkeeping
159 L(end): addq v0, v0, r6