diff options
author | Kevin Ryde <user42@zip.com.au> | 2001-11-02 00:48:48 +0100 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2001-11-02 00:48:48 +0100 |
commit | 8d8360ee93369f709b1b97121495a8236dd3fa75 (patch) | |
tree | 5ab8eec21ab67661f10b31373bd47084b996615a /mpn | |
parent | ee3a58d59e99744bba5f8e1b5a0877d299e3d12a (diff) | |
download | gmp-8d8360ee93369f709b1b97121495a8236dd3fa75.tar.gz |
* mpn/x86/x86-defs.m4 (psadbw): New macro.
* mpn/x86/k7/mmx/popham.asm: Use it.
Diffstat (limited to 'mpn')
-rw-r--r-- | mpn/x86/k7/mmx/popham.asm | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/mpn/x86/k7/mmx/popham.asm b/mpn/x86/k7/mmx/popham.asm index 701ce6191..baf0d3434 100644 --- a/mpn/x86/k7/mmx/popham.asm +++ b/mpn/x86/k7/mmx/popham.asm @@ -27,32 +27,6 @@ dnl Suite 330, Boston, MA 02111-1307, USA. include(`../config.m4') -dnl Only recent versions of gas know psadbw, in particular gas 2.9.1 on -dnl FreeBSD 3.3 and 3.4 doesn't recognise it. - -define(psadbw_mm4_mm0, -`ifelse(m4_ifdef_anyof_p(`HAVE_HOST_CPU_athlon', - `HAVE_HOST_CPU_pentium3'),1, - `.byte 0x0f,0xf6,0xc4 C psadbw %mm4, %mm0', - -`m4_warning(`warning, using simulated and only partly functional psadbw, use for testing only -') C this works enough for the sum of bytes done below, making it - C possible to test on an older cpu - leal -8(%esp), %esp - movq %mm4, (%esp) - movq %mm0, %mm4 -forloop(i,1,7, -` psrlq $ 8, %mm4 - paddb %mm4, %mm0 -') - pushl $ 0 - pushl $ 0xFF - pand (%esp), %mm0 - movq 8(%esp), %mm4 - leal 16(%esp), %esp -')') - - C unsigned long mpn_popcount (mp_srcptr src, mp_size_t size); C unsigned long mpn_hamdist (mp_srcptr src, mp_srcptr src2, mp_size_t size); C @@ -219,7 +193,7 @@ L(loaded): paddd %mm1, %mm0 C bytes - psadbw_mm4_mm0 + psadbw( %mm4, %mm0) paddd %mm0, %mm2 C add to total jnz L(top) |