[Gmp-commit] /var/hg/gmp-5.0: 2 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Mon Mar 28 14:26:31 CEST 2011


details:   /var/hg/gmp-5.0/rev/75d7688a5874
changeset: 13447:75d7688a5874
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Mar 28 14:25:04 2011 +0200
description:
Protect movzwl register parameters from being interpreted as m4 macro parameters.

details:   /var/hg/gmp-5.0/rev/07045f11988e
changeset: 13448:07045f11988e
user:      Torbjorn Granlund <tege at gmplib.org>
date:      Mon Mar 28 14:26:04 2011 +0200
description:
*** empty log message ***

diffstat:

 ChangeLog               |   5 +++++
 mpn/x86/invert_limb.asm |  21 ++++++++++-----------
 2 files changed, 15 insertions(+), 11 deletions(-)

diffs (64 lines):

diff -r f3cf602c192f -r 07045f11988e ChangeLog
--- a/ChangeLog	Mon Mar 21 16:41:13 2011 +0100
+++ b/ChangeLog	Mon Mar 28 14:26:04 2011 +0200
@@ -1,3 +1,8 @@
+2011-03-28  Torbjorn Granlund  <tege at gmplib.org>
+
+	* mpn/x86/invert_limb.asm: Protect movzwl register parameters from
+	being interpreted as m4 macro parameters.
+
 2011-03-21  Torbjorn Granlund  <tege at gmplib.org>
 
 	* configure.in (hppa): Under linux, treat 64-bit processors as if they
diff -r f3cf602c192f -r 07045f11988e mpn/x86/invert_limb.asm
--- a/mpn/x86/invert_limb.asm	Mon Mar 21 16:41:13 2011 +0100
+++ b/mpn/x86/invert_limb.asm	Mon Mar 28 14:26:04 2011 +0200
@@ -1,8 +1,8 @@
- dnl  x86 mpn_invert_limb
+dnl  x86 mpn_invert_limb
 
 dnl  Contributed to the GNU project by Niels Möller
 
-dnl  Copyright 2009 Free Software Foundation, Inc.
+dnl  Copyright 2009, 2011 Free Software Foundation, Inc.
 dnl
 dnl  This file is part of the GNU MP Library.
 dnl
@@ -25,11 +25,10 @@
 C K7:		 46		53
 
 C Register usage:
-
-C Input D in %edi
-C Current approximation is in %eax and/or %ecx
-C %ebx and %edx are temporaries.
-C %esi and %ebp is unused.
+C   Input D in %edi
+C   Current approximation is in %eax and/or %ecx
+C   %ebx and %edx are temporaries
+C   %esi and %ebp are unused
 
 defframe(PARAM_DIVISOR,4)
 
@@ -44,9 +43,9 @@
 	ALIGN(16)
 PROLOGUE(mpn_invert_limb)
 deflit(`FRAME', 0)
-	C Adding the push of %ebp and the corresponding pop seems to
-	C reduce running time from 46 to 43 cycles on K7. Don't know
-	C if this is a benchmark artefact or some alignment issue.
+	C Adding the unnecessary push of %ebp and the corresponding pop seems
+	C to *reduce* running time from 46 to 43 cycles on K7.  Don't know if
+	C this is a benchmark artefact or some alignment issue.
 
 	push	%ebx	FRAME_pushl()
 	C push	%ebp	FRAME_pushl()
@@ -59,7 +58,7 @@
 	LEA(	approx_tab, %ebx)
 	movzwl	-1024(%ebx, %eax, 2), %eax
 ',`
-	movzwl	-1024+approx_tab(%eax, %eax), %eax	C %eax = v0
+	movzwl	-1024+approx_tab`'(%eax, %eax), %eax	C %eax = v0
 ')
 
 	C v1 = (v0 << 4) - ((v0*v0*d_21) >> 32) - 1


More information about the gmp-commit mailing list