version 1.1.1.1, 2000/09/09 14:12:42 |
version 1.1.1.2, 2003/08/25 16:06:27 |
|
|
dnl x86 mpn_mod_1 -- mpn by limb remainder. |
dnl x86 mpn_mod_1 -- mpn by limb remainder. |
|
|
|
dnl Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
dnl Copyright (C) 1999, 2000 Free Software Foundation, Inc. |
|
dnl |
dnl |
dnl This file is part of the GNU MP Library. |
dnl This file is part of the GNU MP Library. |
dnl |
dnl |
Line 20 dnl License along with the GNU MP Library; see the fi |
|
Line 19 dnl License along with the GNU MP Library; see the fi |
|
dnl not, write to the Free Software Foundation, Inc., 59 Temple Place - |
dnl not, write to the Free Software Foundation, Inc., 59 Temple Place - |
dnl Suite 330, Boston, MA 02111-1307, USA. |
dnl Suite 330, Boston, MA 02111-1307, USA. |
|
|
|
include(`../config.m4') |
|
|
dnl cycles/limb |
|
dnl K6 20 |
|
dnl P5 44 |
|
dnl P6 39 |
|
dnl 486 approx 42 maybe |
|
dnl |
|
dnl The following have their own optimized mod_1 implementations, but for |
|
dnl reference the code here runs as follows. |
|
dnl |
|
dnl P6MMX 39 |
|
dnl K7 41 |
|
|
|
|
C cycles/limb |
|
C 486 42 approx, maybe |
|
C P5 44 |
|
C P6 39 |
|
C K6 20 |
|
C K7 41 |
|
C P4 58 |
|
|
include(`../config.m4') |
|
|
|
|
|
C mp_limb_t mpn_mod_1 (mp_srcptr src, mp_size_t size, mp_limb_t divisor); |
C mp_limb_t mpn_mod_1 (mp_srcptr src, mp_size_t size, mp_limb_t divisor); |
C mp_limb_t mpn_mod_1c (mp_srcptr src, mp_size_t size, mp_limb_t divisor, |
C mp_limb_t mpn_mod_1c (mp_srcptr src, mp_size_t size, mp_limb_t divisor, |
C mp_limb_t carry); |
C mp_limb_t carry); |
Line 51 defframe(PARAM_DIVISOR,12) |
|
Line 45 defframe(PARAM_DIVISOR,12) |
|
defframe(PARAM_SIZE, 8) |
defframe(PARAM_SIZE, 8) |
defframe(PARAM_SRC, 4) |
defframe(PARAM_SRC, 4) |
|
|
.text |
TEXT |
ALIGN(16) |
ALIGN(16) |
|
|
PROLOGUE(mpn_mod_1c) |
PROLOGUE(mpn_mod_1c) |
Line 67 deflit(`FRAME',0) |
|
Line 61 deflit(`FRAME',0) |
|
orl %ecx, %ecx |
orl %ecx, %ecx |
|
|
movl PARAM_CARRY, %edx |
movl PARAM_CARRY, %edx |
jnz LF(mpn_mod_1,top) |
jnz L(top) |
|
|
popl %esi |
popl %esi |
movl %edx, %eax |
movl %edx, %eax |