1 dnl Copyright
1999, 2000, 2002, 2003 Free Software Foundation
, Inc.
3 dnl
This file is part of the GNU MP Library.
5 dnl The GNU MP Library is free software
; you can redistribute it and/or modify
6 dnl it under the terms of
either:
8 dnl
* the GNU Lesser General
Public License as published by the Free
9 dnl Software Foundation
; either version 3 of the License, or (at your
10 dnl option
) any later version.
14 dnl
* the GNU General
Public License as published by the Free Software
15 dnl Foundation
; either version 2 of the License, or (at your option) any
18 dnl
or both
in parallel
, as here.
20 dnl The GNU MP Library is distributed
in the hope that it will be useful
, but
21 dnl WITHOUT ANY WARRANTY
; without even the implied warranty of MERCHANTABILITY
22 dnl
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License
25 dnl You should have received copies of the GNU General
Public License
and the
26 dnl GNU Lesser General
Public License along with the GNU MP Library. If
not,
27 dnl see
https://www.gnu.
org/licenses
/.
31 dnl
* Avoid skip instructions
32 dnl
* Put carry
-generating
and carry
-consuming insns consecutively
33 dnl
* Don
't allocate any stack, "home" positions for parameters could be used.
35 include(`../config.m4')
46 ifdef
(`HAVE_ABI_2_0w
',
50 PROLOGUE(mpn_umul_ppmm_r)
52 ifdef(`HAVE_ABI_2_0w',
67 xmpyu
%fr5R
,%fr4R
,%fr6
69 xmpyu
%fr5R
,%fr4L
,%fr7
71 xmpyu
%fr5L
,%fr4R
,%fr8
73 xmpyu
%fr5L
,%fr4L
,%fr9
76 depdi
,z
1,31,1,t32 C t32
= 2^
32
78 ldd
-128(%r30
),p0 C lo
= low 64 bit of product
79 ldd
-120(%r30
),m0 C m0
= mid0
64 bit of product
80 ldd
-112(%r30
),m1 C m1
= mid1
64 bit of product
81 ldd
-104(%r30
),p1 C hi
= high 64 bit of product
83 add,l
,*nuv m0
,m1
,x C x
= m1
+m0
84 add,l t32
,p1
,p1 C propagate carry to mid of p1
85 depd
,z x
,31,32,t0 C lo32
(m1
+m0
)
87 extrd
,u x
,31,32,t1 C hi32
(m1
+m0
)
90 std p0
,0(%r31
) C store
low half of product
91 ifdef
(`HAVE_ABI_2_0w
',
92 ` copy p1,%r28 C return val in %r28
93 ',` extrd
,u p1
,31,32,%r28 C return val
in %r28
,%r29
97 EPILOGUE(mpn_umul_ppmm_r)