1 dnl PowerPC
-64 mpn_lshiftc
-- rp
[] = ~up
[] << cnt
3 dnl Copyright
2003, 2005, 2010 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
')
41 C * Try to reduce the number of needed live registers
42 C * Micro-optimise header code
43 C * Keep in synch with lshift.asm and rshift.asm
44 C * Could the long-scheduled std insns be less scheduled?
62 sldi r7, n, 3 C byte count corresponding to n
63 add up, up, r7 C up = up + n
64 add rp, rp, r7 C rp = rp + n
65 rldicl. r30, n, 0,62 C r30 = n & 3, set cr0
67 addi r31, n, 3 C compute count...
68 ld r10, -8(up) C load 1st limb for b00...b11
70 srdi r31, r31, 2 C ...for ctr
71 mtctr r31 C copy count into ctr
74 ld r11, -16(up) C load 2nd limb for b10 and b11
78 L(b11): sld r8, r10, cnt
102 L(b10): sld r12, r10, cnt
112 L(gt2): ld u0, -24(up)
125 L(b00): ld u1, -16(up)
138 L(gt4): addi up, up, -32
150 L(gt1): ld u0, -16(up)
166 L(top): sld r12, u0, cnt
171 L(L00): sld r8, u1, cnt
176 L(L11): sld r12, u0, cnt
181 L(L10): sld r8, u1, cnt
191 L(end): sld r12, u0, cnt
194 L(cj4): nor r11, r8, r9
198 L(cj3): nor r10, r12, r7
200 L(cj2): std r10, -32(rp)
203 L(ret): ld r31, -8(r1)
205 ifdef(`HAVE_ABI_mode32',
206 ` srdi r3
, retval
, 32