1 dnl mc68020 mpn_addmul_1, mpn_submul_1 -- add or subtract mpn multiple.
3 dnl Copyright 1992, 1994, 1996, 1999, 2000, 2001, 2002 Free Software
6 dnl This file is part of the GNU MP Library.
8 dnl The GNU MP Library is free software; you can redistribute it and/or
9 dnl modify it under the terms of the GNU Lesser General Public License as
10 dnl published by the Free Software Foundation; either version 3 of the
11 dnl License, or (at your option) any later version.
13 dnl The GNU MP Library is distributed in the hope that it will be useful,
14 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
15 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 dnl Lesser General Public License for more details.
18 dnl You should have received a copy of the GNU Lesser General Public License
19 dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/.
21 include(`../config.m4')
26 ifdef(`OPERATION_addmul_1',`
28 define(M4_function_1, mpn_addmul_1)
29 ',`ifdef(`OPERATION_submul_1',`
31 define(M4_function_1, mpn_submul_1)
33 `m4_error(`Need OPERATION_addmul_1 or OPERATION_submul_1
49 PROLOGUE(M4_function_1)
51 C Save used registers on the stack.
54 C Copy the arguments to registers. Better use movem?
55 movel M(sp,20), res_ptr
56 movel M(sp,24), s1_ptr
57 movel M(sp,28), s1_size
58 movel M(sp,32), s2_limb
66 subl d0, d0 C (d0,cy) <= (0,0)
73 M4_inst d3, M(res_ptr,+)
74 L(L1): movel M(s1_ptr,+), d3
78 M4_inst d3, M(res_ptr,+)
82 subl #0x10000, s1_size
85 C Restore used registers from stack frame.
90 EPILOGUE(M4_function_1)