1 dnl SPARC v9 mpn_rshift
3 dnl Contributed to the GNU project by David Miller.
5 dnl Copyright
2013 Free Software Foundation
, Inc.
7 dnl
This file is part of the GNU MP Library.
9 dnl The GNU MP Library is free software
; you can redistribute it and/or modify
10 dnl it under the terms of
either:
12 dnl
* the GNU Lesser General
Public License as published by the Free
13 dnl Software Foundation
; either version 3 of the License, or (at your
14 dnl option
) any later version.
18 dnl
* the GNU General
Public License as published by the Free Software
19 dnl Foundation
; either version 2 of the License, or (at your option) any
22 dnl
or both
in parallel
, as here.
24 dnl The GNU MP Library is distributed
in the hope that it will be useful
, but
25 dnl WITHOUT ANY WARRANTY
; without even the implied warranty of MERCHANTABILITY
26 dnl
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License
29 dnl You should have received copies of the GNU General
Public License
and the
30 dnl GNU Lesser General
Public License along with the GNU MP Library. If
not,
31 dnl see
https://www.gnu.
org/licenses
/.
33 include(`..
/config.m4
')
49 define(`retval', `
%i5
')
54 define(`u0_off', `
%o0
')
55 define(`u1_off', `
%o1
')
56 define(`r0_off', `
%o2
')
57 define(`r1_off', `
%o3
')
60 REGISTER(%g2,#scratch)
61 REGISTER(%g3,#scratch)
72 sub up, (2 * 8), u0_off
73 sub rp, (5 * 8), r0_off
75 ldx [n + up], u1 C WAS: up + 0
76 sub u0_off, (1 * 8), u1_off
77 sub r0_off, (1 * 8), r1_off
85 ldx [n + u0_off], u0 C WAS: up + 0
88 ldx [n + u1_off], u1 C WAS: up + 8
99 ldx [n + u0_off], u0 C WAS: up + 0
102 stx r0, [n + r0_off] C WAS: rp + 0
108 ldx [n + u1_off], u1 C WAS: up + 8
112 stx r1, [n + r1_off] C WAS: rp + 8
119 stx r0, [n + r0_off] C WAS: rp + 0
125 stx r1, [%o5 + r1_off] C WAS: rp + 8
135 stx r0, [r0_off + 24]
138 stx %l3, [r0_off + 32]
141 restore retval, 0, %o0