1 dnl mc68020 mpn_addmul_1
, mpn_submul_1
-- add or subtract mpn multiple.
3 dnl Copyright
1992, 1994, 1996, 1999-2002, 2011 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
')
36 ifdef(`OPERATION_addmul_1',`
38 define
(M4_function_1
, mpn_addmul_1
)
39 ',`ifdef(`OPERATION_submul_1',`
41 define
(M4_function_1
, mpn_submul_1
)
43 `m4_error(`Need OPERATION_addmul_1 or OPERATION_submul_1
58 MULFUNC_PROLOGUE
(mpn_addmul_1 mpn_submul_1
)
60 PROLOGUE
(M4_function_1
)
62 C Save used registers on the stack.
65 C Copy the arguments to registers. Better use movem
?
66 movel M
(sp,20), res_ptr
67 movel M
(sp,24), s1_ptr
68 movel M
(sp,28), s1_size
69 movel M
(sp,32), s2_limb
77 subl d0
, d0 C
(d0
,cy
) <= (0,0)
84 M4_inst d3
, M
(res_ptr
,+)
85 L
(L1
): movel M
(s1_ptr
,+), d3
89 M4_inst d3
, M
(res_ptr
,+)
93 subl #
0x10000, s1_size
96 C Restore used registers from stack frame.
101 EPILOGUE
(M4_function_1
)