version 1.1, 2000/09/09 14:12:42 |
version 1.1.1.2, 2003/08/25 16:06:28 |
|
|
dnl AMD K6 mpn_divexact_by3 -- mpn division by 3, expecting no remainder. |
dnl AMD K6 mpn_divexact_by3 -- mpn division by 3, expecting no remainder. |
dnl |
|
dnl K6: 11.0 cycles/limb |
|
|
|
|
dnl Copyright 2000, 2001, 2002 Free Software Foundation, Inc. |
dnl Copyright (C) 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 22 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') |
include(`../config.m4') |
|
|
|
|
|
C K6: 11.0 cycles/limb |
|
|
|
|
C mp_limb_t mpn_divexact_by3c (mp_ptr dst, mp_srcptr src, mp_size_t size, |
C mp_limb_t mpn_divexact_by3c (mp_ptr dst, mp_srcptr src, mp_size_t size, |
C mp_limb_t carry); |
C mp_limb_t carry); |
C |
C |
Line 40 defframe(PARAM_DST, 4) |
|
Line 39 defframe(PARAM_DST, 4) |
|
dnl multiplicative inverse of 3, modulo 2^32 |
dnl multiplicative inverse of 3, modulo 2^32 |
deflit(INVERSE_3, 0xAAAAAAAB) |
deflit(INVERSE_3, 0xAAAAAAAB) |
|
|
.text |
TEXT |
ALIGN(32) |
ALIGN(32) |
|
|
PROLOGUE(mpn_divexact_by3c) |
PROLOGUE(mpn_divexact_by3c) |
Line 70 deflit(`FRAME',0) |
|
Line 69 deflit(`FRAME',0) |
|
ALIGN(32) |
ALIGN(32) |
L(top): |
L(top): |
C eax scratch, low product |
C eax scratch, low product |
C ebx carry limb (0 to 3) |
C ebx carry limb (0 to 2) |
C ecx counter, limbs, negative |
C ecx counter, limbs, negative |
C edx scratch, high product |
C edx scratch, high product |
C esi &src[size] |
C esi &src[size] |
Line 86 Zdisp( movl, 0,(%esi,%ecx,4), %eax) |
|
Line 85 Zdisp( movl, 0,(%esi,%ecx,4), %eax) |
|
|
|
setc %bl |
setc %bl |
|
|
imull $INVERSE_3, %eax |
imull $INVERSE_3, %eax, %eax |
|
|
movl %eax, (%edi,%ecx,4) |
movl %eax, (%edi,%ecx,4) |
addl $2, %ecx |
addl $2, %ecx |