1 dnl Pentium-4 mpn_copyd -- copy limb vector, decrementing.
4 dnl Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
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/.
22 dnl The std/rep/movsl/cld is very slow for small blocks on pentium4. Its
23 dnl startup time seems to be about 165 cycles. It then needs 2.6 c/l.
24 dnl We therefore use an open-coded 2 c/l copying loop.
26 dnl Ultimately, we may want to use 64-bit movq or 128-bit movdqu in some
27 dnl nifty unrolled arrangement. Clearly, that could reach much higher
28 dnl speeds, at least for large blocks.
30 include(`../config.m4')
33 defframe(PARAM_SIZE, 12)
34 defframe(PARAM_SRC, 8)
35 defframe(PARAM_DST, 4)
52 movl (%eax,%ecx,4), %ebx
53 movl %ebx, (%edx,%ecx,4)